Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new keyboard "Baumkuchen" #20766

Merged
merged 36 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2846cc3
Merge remote-tracking branch 'qmk/master'
takashicompany Sep 27, 2022
998aee1
Merge branch 'master' of github.com:qmk/qmk_firmware
takashicompany Oct 20, 2022
377db38
Merge branch 'master' of github.com:qmk/qmk_firmware
takashicompany Oct 28, 2022
cafe9a8
Merge branch 'master' of github.com:qmk/qmk_firmware
takashicompany Oct 31, 2022
934d59d
baumkuchen
takashicompany May 3, 2023
6fd26bc
fix
takashicompany May 6, 2023
479f380
一旦修正
takashicompany May 6, 2023
269b866
via
takashicompany May 6, 2023
95b243e
fix configs
takashicompany May 6, 2023
1731c8b
もろもろ修正
takashicompany May 6, 2023
7fa18da
update keyboard name
takashicompany May 7, 2023
3482cc0
for test
takashicompany May 7, 2023
8029991
pressed
takashicompany May 7, 2023
22c67c3
readme
takashicompany May 7, 2023
6f6a773
fix license
takashicompany May 7, 2023
24bfd59
fix comment out. this is mistake
takashicompany May 7, 2023
94e3e02
Update keyboards/takashicompany/baumkuchen/rules.mk
takashicompany May 8, 2023
3ee33d0
Update keyboards/takashicompany/baumkuchen/keymaps/via/rules.mk
takashicompany May 8, 2023
c384939
Update keyboards/takashicompany/baumkuchen/info.json
takashicompany May 8, 2023
b023b8f
fix json
takashicompany May 8, 2023
4ad5162
keymap
takashicompany May 8, 2023
55f62ac
encoder update kb
takashicompany May 8, 2023
c8c0cb4
fix end line
takashicompany May 8, 2023
cb7612d
fix mo
takashicompany May 8, 2023
08ea938
remove via rotary encoder
takashicompany May 8, 2023
26887e2
format json
takashicompany May 8, 2023
7023ca1
license
takashicompany May 8, 2023
af595bf
Update keyboards/takashicompany/baumkuchen/keymaps/via/keymap.c
takashicompany May 8, 2023
3e721dd
Update keyboards/takashicompany/baumkuchen/info.json
takashicompany May 8, 2023
16e21f5
Update keyboards/takashicompany/baumkuchen/info.json
takashicompany May 8, 2023
7a412ca
delete baumkuchen.h
takashicompany May 8, 2023
f3f32b7
Merge branch 'baumkuchen/rev1' of github.com:takashicompany/qmk_firmw…
takashicompany May 8, 2023
4aaa3fc
Update keyboards/takashicompany/baumkuchen/keymaps/test/keymap.c
takashicompany May 14, 2023
92771c1
rename
takashicompany May 14, 2023
df4242e
Fix typo.
takashicompany May 14, 2023
cf32281
Update keyboards/takashicompany/baumkuchen/info.json
takashicompany Jun 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 173 additions & 0 deletions keyboards/takashicompany/baumkuchen/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
{
"manufacturer": "takashicompany",
"keyboard_name": "Baumkuchen",
"maintainer": "takashicompany",
"bootloader": "caterina",
takashicompany marked this conversation as resolved.
Show resolved Hide resolved
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgblight": true
takashicompany marked this conversation as resolved.
Show resolved Hide resolved
},
"matrix_pins": {
"direct": [["B2", "B6", "D4", "C6", "F4", "F5", "D7", "E6", "F6", "F7", "B1", "B3", "B4", "B5", "B5"]]
},
"processor": "atmega32u4",
takashicompany marked this conversation as resolved.
Show resolved Hide resolved
"url": "",
"usb": {
"device_version": "1.0.0",
"pid": "0x0045",
"vid": "0x7463"
},
"encoder": {
"rotary": [
{"pin_a": "D1", "pin_b": "D0"}
]
},
"rgblight": {
"led_count": 6,
"pin": "D3",
"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
}
},
"layouts": {
"LAYOUT": {
"layout": [
{
"matrix": [
0,
0
],
"x": 3,
"y": 0
},
{
"matrix": [
0,
1
],
"x": 3,
"y": 0
},
{
"matrix": [
0,
2
],
"x": 3,
"y": 0
},
{
"matrix": [
0,
3
],
"x": 3,
"y": 0
},
{
"matrix": [
0,
4
],
"x": 3,
"y": 1
},
{
"matrix": [
0,
5
],
"x": 3,
"y": 1
},
{
"matrix": [
0,
6
],
"x": 3,
"y": 1
},
{
"matrix": [
0,
7
],
"x": 3,
"y": 1
},
{
"matrix": [
0,
8
],
"x": 3,
"y": 2
},
{
"matrix": [
0,
9
],
"x": 3,
"y": 2
},
{
"matrix": [
0,
10
],
"x": 3,
"y": 2
},
{
"matrix": [
0,
11
],
"x": 3,
"y": 2
},
{
"matrix": [
0,
12
],
"x": 3,
"y": 2
},
{
"matrix": [
0,
13
],
"x": 4.5,
"y": 3.75
},
{
"matrix": [
0,
14
],
"x": 5.5,
"y": 3.75
}
]
}
}
}
30 changes: 30 additions & 0 deletions keyboards/takashicompany/baumkuchen/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// 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
)
};

bool encoder_update_user(uint8_t index, bool clockwise) {

if (clockwise) {
tap_code(KC_WH_D);
} else {
tap_code(KC_WH_U);
}

return true;
}
33 changes: 33 additions & 0 deletions keyboards/takashicompany/baumkuchen/keymaps/test/keymap.c
drashna marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -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(); // for test
takashicompany marked this conversation as resolved.
Show resolved Hide resolved
}

return true;
}

bool encoder_update_user(uint8_t index, bool clockwise) {

if (clockwise) {
tap_code(KC_1);
} else {
tap_code(KC_2);
}

return true;
}
9 changes: 9 additions & 0 deletions keyboards/takashicompany/baumkuchen/keymaps/via/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2023 takashicompany (@takashicompany)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define DYNAMIC_KEYMAP_LAYER_COUNT 24

#define ENCODERS_CW_KEY { { 13, 0 }}
#define ENCODERS_CCW_KEY { { 14, 0 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define ENCODERS_CW_KEY { { 13, 0 }}
#define ENCODERS_CCW_KEY { { 14, 0 }}

68 changes: 68 additions & 0 deletions keyboards/takashicompany/baumkuchen/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// 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(0), 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
)
};

//------------------------------------------------------------------------------
// Rotary Encoder
//------------------------------------------------------------------------------
static uint8_t encoder_state[NUM_ENCODERS] = {0};
static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY;
static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY;

void encoder_action_unregister(void) {
for (int index = 0; index < NUM_ENCODERS; ++index) {
if (encoder_state[index]) {
keyevent_t encoder_event = (keyevent_t) {
.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
.pressed = false,
.time = (timer_read() | 1)
};
encoder_state[index] = 0;
action_exec(encoder_event);
}
}
}

void encoder_action_register(uint8_t index, bool clockwise) {
keyevent_t encoder_event = (keyevent_t) {
.key = clockwise ? encoder_cw[index] : encoder_ccw[index],
.pressed = true,
.time = (timer_read() | 1)
};
encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
action_exec(encoder_event);
}

void matrix_scan_kb(void) {
encoder_action_unregister();
matrix_scan_user();
}
Copy link
Member

@zvecr zvecr May 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not allowed in the repo now, and https://docs.qmk.fm/#/feature_encoders?id=encoder-map used instead.

Its also not the first time this has been requested on one of your PRs, we didn't allow it then so why would we allow it now?


bool encoder_update_user(uint8_t index, bool clockwise) {
encoder_action_register(index, clockwise);
return true;
}
2 changes: 2 additions & 0 deletions keyboards/takashicompany/baumkuchen/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file intentionally left blank
takashicompany marked this conversation as resolved.
Show resolved Hide resolved
VIA_ENABLE = yes
31 changes: 31 additions & 0 deletions keyboards/takashicompany/baumkuchen/readme.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions keyboards/takashicompany/baumkuchen/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file intentionally left blank
ENCODER_ENABLE = yes
takashicompany marked this conversation as resolved.
Show resolved Hide resolved