From e423d5e3d4059b3c16358fc5b6b2fe673f204f54 Mon Sep 17 00:00:00 2001 From: takashicompany Date: Tue, 4 Jul 2023 05:55:12 +0900 Subject: [PATCH] [Keyboard] Add Baumkuchen (#20766) Co-authored-by: Joel Challis Co-authored-by: Drashna Jaelre --- .../takashicompany/baumkuchen/baumkuchen.c | 19 +++++ keyboards/takashicompany/baumkuchen/info.json | 75 +++++++++++++++++++ .../baumkuchen/keymaps/build_test/keymap.c | 33 ++++++++ .../baumkuchen/keymaps/default/keymap.c | 19 +++++ .../baumkuchen/keymaps/via/config.h | 6 ++ .../baumkuchen/keymaps/via/keymap.c | 28 +++++++ .../baumkuchen/keymaps/via/rules.mk | 1 + keyboards/takashicompany/baumkuchen/readme.md | 31 ++++++++ keyboards/takashicompany/baumkuchen/rules.mk | 1 + 9 files changed, 213 insertions(+) create mode 100644 keyboards/takashicompany/baumkuchen/baumkuchen.c create mode 100644 keyboards/takashicompany/baumkuchen/info.json create mode 100644 keyboards/takashicompany/baumkuchen/keymaps/build_test/keymap.c create mode 100644 keyboards/takashicompany/baumkuchen/keymaps/default/keymap.c create mode 100644 keyboards/takashicompany/baumkuchen/keymaps/via/config.h create mode 100644 keyboards/takashicompany/baumkuchen/keymaps/via/keymap.c create mode 100644 keyboards/takashicompany/baumkuchen/keymaps/via/rules.mk create mode 100644 keyboards/takashicompany/baumkuchen/readme.md create mode 100644 keyboards/takashicompany/baumkuchen/rules.mk diff --git a/keyboards/takashicompany/baumkuchen/baumkuchen.c b/keyboards/takashicompany/baumkuchen/baumkuchen.c new file mode 100644 index 0000000000..7d4f26b73e --- /dev/null +++ b/keyboards/takashicompany/baumkuchen/baumkuchen.c @@ -0,0 +1,19 @@ +// Copyright 2023 takashicompany (@takashicompany) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +bool encoder_update_kb(uint8_t index, bool clockwise) { + + if (!encoder_update_user(index, clockwise)) { + return false; + } + + if (clockwise) { + tap_code(KC_WH_D); + } else { + tap_code(KC_WH_U); + } + + return true; +} \ No newline at end of file diff --git a/keyboards/takashicompany/baumkuchen/info.json b/keyboards/takashicompany/baumkuchen/info.json new file mode 100644 index 0000000000..e231834882 --- /dev/null +++ b/keyboards/takashicompany/baumkuchen/info.json @@ -0,0 +1,75 @@ +{ + "manufacturer": "takashicompany", + "keyboard_name": "Baumkuchen", + "maintainer": "takashicompany", + "development_board": "promicro", + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + { + "pin_a": "D1", + "pin_b": "D0" + } + ] + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "matrix_pins": { + "direct": [ + ["B2", "B6", "D4", "C6", "F4", "F5", "D7", "E6", "F6", "F7", "B1", "B3", "B4", "B5", "B5"] + ] + }, + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true + }, + "led_count": 6, + }, + "ws2812": { + "pin": "D3" + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0045", + "vid": "0x7463" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 0, "y": 1 }, + { "matrix": [0, 5], "x": 1, "y": 1 }, + { "matrix": [0, 6], "x": 2, "y": 1 }, + { "matrix": [0, 7], "x": 3, "y": 1 }, + { "matrix": [0, 8], "x": 0, "y": 2 }, + { "matrix": [0, 9], "x": 1, "y": 2 }, + { "matrix": [0, 10], "x": 2, "y": 2 }, + { "matrix": [0, 11], "x": 3, "y": 2 }, + { "matrix": [0, 12], "x": 4, "y": 2 }, + { "matrix": [0, 13], "x": 3.5, "y": 3.25 }, + { "matrix": [0, 14], "x": 4.5, "y": 3.25 } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/takashicompany/baumkuchen/keymaps/build_test/keymap.c b/keyboards/takashicompany/baumkuchen/keymaps/build_test/keymap.c new file mode 100644 index 0000000000..b99d3a3592 --- /dev/null +++ b/keyboards/takashicompany/baumkuchen/keymaps/build_test/keymap.c @@ -0,0 +1,33 @@ +// Copyright 2023 takashicompany (@takashicompany) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, + KC_A, KC_S, KC_D, KC_F, + KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_NO, KC_NO + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + if (record->event.pressed) { + rgblight_toggle_noeeprom(); // for test + } + + return true; +} + +bool encoder_update_user(uint8_t index, bool clockwise) { + + if (clockwise) { + tap_code(KC_1); + } else { + tap_code(KC_2); + } + + return false; +} diff --git a/keyboards/takashicompany/baumkuchen/keymaps/default/keymap.c b/keyboards/takashicompany/baumkuchen/keymaps/default/keymap.c new file mode 100644 index 0000000000..7ea01cbd5d --- /dev/null +++ b/keyboards/takashicompany/baumkuchen/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +// Copyright 2023 takashicompany (@takashicompany) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, + KC_A, KC_S, KC_D, KC_F, + KC_Z, KC_X, KC_C, LT(1, KC_V), KC_B, + KC_NO, KC_NO + ), + [1] = LAYOUT( + RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ) +}; \ No newline at end of file diff --git a/keyboards/takashicompany/baumkuchen/keymaps/via/config.h b/keyboards/takashicompany/baumkuchen/keymaps/via/config.h new file mode 100644 index 0000000000..1017b9cb4b --- /dev/null +++ b/keyboards/takashicompany/baumkuchen/keymaps/via/config.h @@ -0,0 +1,6 @@ +// Copyright 2023 takashicompany (@takashicompany) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 29 diff --git a/keyboards/takashicompany/baumkuchen/keymaps/via/keymap.c b/keyboards/takashicompany/baumkuchen/keymaps/via/keymap.c new file mode 100644 index 0000000000..1e4624ca88 --- /dev/null +++ b/keyboards/takashicompany/baumkuchen/keymaps/via/keymap.c @@ -0,0 +1,28 @@ +// Copyright 2023 takashicompany (@takashicompany) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + LT(1, KC_ESC), KC_Q, KC_W, KC_E, + KC_TAB, KC_A, KC_S, KC_D, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, + KC_WH_U, KC_WH_D + ), + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, + KC_TRNS,KC_TRNS + ), + + [2] = LAYOUT( + RGB_TOG, RGB_MOD, KC_TRNS, QK_BOOT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS + ) +}; diff --git a/keyboards/takashicompany/baumkuchen/keymaps/via/rules.mk b/keyboards/takashicompany/baumkuchen/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/takashicompany/baumkuchen/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/takashicompany/baumkuchen/readme.md b/keyboards/takashicompany/baumkuchen/readme.md new file mode 100644 index 0000000000..adc3f2e006 --- /dev/null +++ b/keyboards/takashicompany/baumkuchen/readme.md @@ -0,0 +1,31 @@ +# Baumkuchen + +![takashicompany/baumkuchen](https://i.imgur.com/NS39x44h.png) + +Baumkuchen is a 13-key macropad with a radial key layout. +The board can be used as a circuit or as a switch plate by cutting out the keyswitch Pro Micro part. +It is compatible with Cherry MX compatible keyswitches, and a rotary encoder can be optionally installed. +LEDs can also be mounted to make it glow. +The board is reversible, allowing you to choose the arrangement of keys and Pro Micro according to your usage style. + +* Keyboard Maintainer: [takashicompany](https://github.com/takashicompany) +* Hardware Supported: Baumkuchen PCB, Pro Micro +* Hardware Availability: https://github.com/takashicompany/baumkuchen + +Make example for this keyboard (after setting up your build environment): + + make takashicompany/baumkuchen:default + +Flashing example for this keyboard: + + make takashicompany/baumkuchen:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/takashicompany/baumkuchen/rules.mk b/keyboards/takashicompany/baumkuchen/rules.mk new file mode 100644 index 0000000000..7ff128fa69 --- /dev/null +++ b/keyboards/takashicompany/baumkuchen/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank \ No newline at end of file