From 2b251eb5b87d1f10a889989f40d9b66729dd023f Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Thu, 7 Nov 2024 18:06:06 +0300 Subject: [PATCH 01/18] Adding kolhoz keyboard --- keyboards/handwired/kolhoz/config.h | 9 ++ keyboards/handwired/kolhoz/halconf.h | 3 + keyboards/handwired/kolhoz/keyboard.json | 108 ++++++++++++++++++ .../handwired/kolhoz/keyboard_layout_editor | 7 ++ .../handwired/kolhoz/keymaps/default/keymap.c | 35 ++++++ keyboards/handwired/kolhoz/mcuconf.h | 7 ++ keyboards/handwired/kolhoz/readme.md | 23 ++++ keyboards/handwired/kolhoz/rules.mk | 1 + 8 files changed, 193 insertions(+) create mode 100644 keyboards/handwired/kolhoz/config.h create mode 100644 keyboards/handwired/kolhoz/halconf.h create mode 100644 keyboards/handwired/kolhoz/keyboard.json create mode 100644 keyboards/handwired/kolhoz/keyboard_layout_editor create mode 100644 keyboards/handwired/kolhoz/keymaps/default/keymap.c create mode 100644 keyboards/handwired/kolhoz/mcuconf.h create mode 100644 keyboards/handwired/kolhoz/readme.md create mode 100644 keyboards/handwired/kolhoz/rules.mk diff --git a/keyboards/handwired/kolhoz/config.h b/keyboards/handwired/kolhoz/config.h new file mode 100644 index 000000000000..ee2c6135543f --- /dev/null +++ b/keyboards/handwired/kolhoz/config.h @@ -0,0 +1,9 @@ +#pragma once + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U + +#define SERIAL_USART_TX_PIN GP0 + +#define TAPPING_TOGGLE 2 + diff --git a/keyboards/handwired/kolhoz/halconf.h b/keyboards/handwired/kolhoz/halconf.h new file mode 100644 index 000000000000..7691f8fd2880 --- /dev/null +++ b/keyboards/handwired/kolhoz/halconf.h @@ -0,0 +1,3 @@ +#pragma once + +#include_next diff --git a/keyboards/handwired/kolhoz/keyboard.json b/keyboards/handwired/kolhoz/keyboard.json new file mode 100644 index 000000000000..158e8d1b14b8 --- /dev/null +++ b/keyboards/handwired/kolhoz/keyboard.json @@ -0,0 +1,108 @@ +{ + "manufacturer": "Vitali Fomine", + "keyboard_name": "handwired/kolhoz", + "maintainer": "vf1", + "development_board": "promicro_rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "direct":[ + [ "GP14", "GP2", "GP6", "GP10", "GP27", "GP20", null, null], + [ "GP15", "GP3", "GP7", "GP11", "GP28", "GP21", null, null], + [ null, "GP4", "GP8", "GP12", "GP22", "GP18", null, null], + [ null, "GP5", "GP9", "GP13", "GP26", "GP19", "GP16", "GP17"] + ] + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "split": { + "enabled": true, + "handedness": { + "pin": "GP23" + } + "matrix_pins": { + "right": { + "direct": [ + [ "GP27", "GP20", "GP16", "GP10", "GP6", "GP2", null, null], + [ "GP28", "GP21", "GP17", "GP11", "GP7", "GP3", null, null], + [ null, "GP22", "GP18", "GP12", "GP8", "GP4", null, null], + [ null, "GP26", "GP19", "GP13", "GP9", "GP5", "GP14", "GP15"] + ] + } + } + }, + "layouts": { + "LAYOUT_split_2_3x5_4_3": { + "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":4, "y":0}, + {"matrix": [0, 5], "x":5, "y":0}, + + {"matrix": [4, 5], "x":12, "y":0}, + {"matrix": [4, 4], "x":13, "y":0}, + {"matrix": [4, 3], "x":14, "y":0}, + {"matrix": [4, 2], "x":15, "y":0}, + {"matrix": [4, 1], "x":16, "y":0}, + {"matrix": [4, 0], "x":17, "y":0}, + + {"matrix": [1, 0], "x":0, "y":1}, + {"matrix": [1, 1], "x":1, "y":1}, + {"matrix": [1, 2], "x":2, "y":1}, + {"matrix": [1, 3], "x":3, "y":1}, + {"matrix": [1, 4], "x":4, "y":1}, + {"matrix": [1, 5], "x":5, "y":1}, + + {"matrix": [5, 5], "x":12, "y":1}, + {"matrix": [5, 4], "x":13, "y":1}, + {"matrix": [5, 3], "x":14, "y":1}, + {"matrix": [5, 2], "x":15, "y":1}, + {"matrix": [5, 1], "x":16, "y":1}, + {"matrix": [5, 0], "x":17, "y":1}, + + {"matrix": [2, 1], "x":1, "y":2}, + {"matrix": [2, 2], "x":2, "y":2}, + {"matrix": [2, 3], "x":3, "y":2}, + {"matrix": [2, 4], "x":4, "y":2}, + {"matrix": [2, 5], "x":5, "y":2}, + + {"matrix": [6, 5], "x":12, "y":2}, + {"matrix": [6, 4], "x":13, "y":2}, + {"matrix": [6, 3], "x":14, "y":2}, + {"matrix": [6, 2], "x":15, "y":2}, + {"matrix": [6, 1], "x":16, "y":2}, + + {"matrix": [3, 1], "x":1, "y":3.25}, + {"matrix": [3, 2], "x":2, "y":3.25}, + {"matrix": [3, 3], "x":3, "y":3.25}, + {"matrix": [3, 4], "x":4, "y":3.25}, + + {"matrix": [3, 5], "x":5.25, "y":3.5}, + {"matrix": [3, 6], "x":6.25, "y":3.75}, + {"matrix": [3, 7], "x":7.25, "y":4}, + + {"matrix": [7, 7], "x":13, "y":3.25}, + {"matrix": [7, 6], "x":14, "y":3.25}, + {"matrix": [7, 5], "x":15, "y":3.25}, + {"matrix": [7, 4], "x":16, "y":3.25}, + + {"matrix": [7, 3], "x":9.75, "y":4}, + {"matrix": [7, 2], "x":10.75, "y":3.75}, + {"matrix": [7, 1], "x":11.75, "y":3.5} + ] + } + } +} diff --git a/keyboards/handwired/kolhoz/keyboard_layout_editor b/keyboards/handwired/kolhoz/keyboard_layout_editor new file mode 100644 index 000000000000..e4fe4cf554d6 --- /dev/null +++ b/keyboards/handwired/kolhoz/keyboard_layout_editor @@ -0,0 +1,7 @@ +[{a:7},"","","","","","",{x:6},"","","","","",""], +["","","","","","",{x:6},"","","","","",""], +[{x:1},"","","","","",{x:6},"","","","",""], +[{y:0.25,x:1},"","","","",{x:8},"","","",""], +[{y:-0.75,x:5.25},"",{x:5.5},""], +[{y:-0.75,x:6.25},"",{x:3.5},""], +[{y:-0.75,x:7.25},"",{x:1.5},""] diff --git a/keyboards/handwired/kolhoz/keymaps/default/keymap.c b/keyboards/handwired/kolhoz/keymaps/default/keymap.c new file mode 100644 index 000000000000..efc1f41d702a --- /dev/null +++ b/keyboards/handwired/kolhoz/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +#define LSYM 1 +#define LNUM 2 +#define LNAV 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_2_3x5_4_3( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_QUOTE, + OSM(MOD_LSFT), OSM(MOD_LCTL), OSM(MOD_LGUI), OSM(MOD_LALT), OSL(LNUM), LT(LSYM,KC_SPC), TT(LNAV), KC_NO, LT(LSYM,KC_SPC), KC_NO, OSM(MOD_RALT), OSM(MOD_RGUI), OSM(MOD_RCTL), OSM(MOD_RSFT) + ), + [LSYM] = LAYOUT_split_2_3x5_4_3( + KC_NO, KC_TILDE, KC_GRV, KC_NO, KC_NO, KC_NO, KC_PEQL, KC_LBRC, KC_RBRC, KC_QUES, KC_SLASH, KC_TRNS, + KC_NO, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_COLON, KC_BSPC, + KC_EXCLAIM, KC_UNDERSCORE, KC_MINUS, KC_PLUS, KC_PIPE, KC_LCBR, KC_RCBR, KC_LT, KC_GT, KC_DQUO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [LNUM] = LAYOUT_split_2_3x5_4_3( + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO, KC_TRNS, + KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, KC_BSPC, + KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [LNAV] = LAYOUT_split_2_3x5_4_3( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, KC_TRNS, + KC_NO, KC_NO, MS_BTN2, MS_BTN3, MS_BTN1, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, KC_BSPC, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RCTL(KC_LEFT), KC_NO, KC_NO, RCTL(KC_RIGHT), KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, TO(0), TO(0), KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/handwired/kolhoz/mcuconf.h b/keyboards/handwired/kolhoz/mcuconf.h new file mode 100644 index 000000000000..9487920b0636 --- /dev/null +++ b/keyboards/handwired/kolhoz/mcuconf.h @@ -0,0 +1,7 @@ +#pragma once + +#include_next + +#undef RP_SIO_USE_UART0 +#define RP_SIO_USE_UART0 TRUE + diff --git a/keyboards/handwired/kolhoz/readme.md b/keyboards/handwired/kolhoz/readme.md new file mode 100644 index 000000000000..8ff00fd516a5 --- /dev/null +++ b/keyboards/handwired/kolhoz/readme.md @@ -0,0 +1,23 @@ +# handwired/kolhoz + +![handwired/kolhoz](https://github.com/vf1/kolhoz_kbd/blob/main/IMG20241107173135.jpg) + +The layout is inspired by the [corne](https://github.com/foostan/crkbd), but has four additional vertical keys. + +* Keyboard Maintainer: [Vitali Fomine](https://github.com/vf1) +* Hardware Supported: yd-2040 + +Make example for this keyboard (after setting up your build environment): + + qmk clean -a && qmk compile -kb handwired/kolhoz -km default + +Flashing example for this keyboard: + + qmk flash -kb handwired/kolhoz -km default + +## Bootloader + +Enter the bootloader: + +* **Physical reset button**: Briefly press the reset button on the case twice + diff --git a/keyboards/handwired/kolhoz/rules.mk b/keyboards/handwired/kolhoz/rules.mk new file mode 100644 index 000000000000..161ec22b16e2 --- /dev/null +++ b/keyboards/handwired/kolhoz/rules.mk @@ -0,0 +1 @@ +SERIAL_DRIVER = vendor From acee74d1c12cabfc22c1bb734125e23e6620a983 Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Thu, 7 Nov 2024 18:18:55 +0300 Subject: [PATCH 02/18] Remove kle file --- keyboards/handwired/kolhoz/keyboard_layout_editor | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 keyboards/handwired/kolhoz/keyboard_layout_editor diff --git a/keyboards/handwired/kolhoz/keyboard_layout_editor b/keyboards/handwired/kolhoz/keyboard_layout_editor deleted file mode 100644 index e4fe4cf554d6..000000000000 --- a/keyboards/handwired/kolhoz/keyboard_layout_editor +++ /dev/null @@ -1,7 +0,0 @@ -[{a:7},"","","","","","",{x:6},"","","","","",""], -["","","","","","",{x:6},"","","","","",""], -[{x:1},"","","","","",{x:6},"","","","",""], -[{y:0.25,x:1},"","","","",{x:8},"","","",""], -[{y:-0.75,x:5.25},"",{x:5.5},""], -[{y:-0.75,x:6.25},"",{x:3.5},""], -[{y:-0.75,x:7.25},"",{x:1.5},""] From e752624da37760bcf0a460ba59a58c3f57ba9a2e Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Thu, 7 Nov 2024 18:31:54 +0300 Subject: [PATCH 03/18] Adding licenses headers --- keyboards/handwired/kolhoz/config.h | 3 +++ keyboards/handwired/kolhoz/halconf.h | 3 +++ keyboards/handwired/kolhoz/mcuconf.h | 3 +++ 3 files changed, 9 insertions(+) diff --git a/keyboards/handwired/kolhoz/config.h b/keyboards/handwired/kolhoz/config.h index ee2c6135543f..105798cc2143 100644 --- a/keyboards/handwired/kolhoz/config.h +++ b/keyboards/handwired/kolhoz/config.h @@ -1,3 +1,6 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + #pragma once #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET diff --git a/keyboards/handwired/kolhoz/halconf.h b/keyboards/handwired/kolhoz/halconf.h index 7691f8fd2880..8af49343da2e 100644 --- a/keyboards/handwired/kolhoz/halconf.h +++ b/keyboards/handwired/kolhoz/halconf.h @@ -1,3 +1,6 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + #pragma once #include_next diff --git a/keyboards/handwired/kolhoz/mcuconf.h b/keyboards/handwired/kolhoz/mcuconf.h index 9487920b0636..c61e9f6c36f7 100644 --- a/keyboards/handwired/kolhoz/mcuconf.h +++ b/keyboards/handwired/kolhoz/mcuconf.h @@ -1,3 +1,6 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + #pragma once #include_next From b7cbf802b3b1feb5ec466785ef033bfcbf44802f Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Thu, 7 Nov 2024 20:07:49 +0300 Subject: [PATCH 04/18] Remove unnecessary files --- keyboards/handwired/kolhoz/config.h | 2 -- keyboards/handwired/kolhoz/halconf.h | 6 ------ keyboards/handwired/kolhoz/keyboard.json | 8 +++++++- keyboards/handwired/kolhoz/keymaps/default/keymap.c | 8 +++++--- keyboards/handwired/kolhoz/mcuconf.h | 10 ---------- keyboards/handwired/kolhoz/readme.md | 4 ++-- keyboards/handwired/kolhoz/rules.mk | 1 - 7 files changed, 14 insertions(+), 25 deletions(-) delete mode 100644 keyboards/handwired/kolhoz/halconf.h delete mode 100644 keyboards/handwired/kolhoz/mcuconf.h delete mode 100644 keyboards/handwired/kolhoz/rules.mk diff --git a/keyboards/handwired/kolhoz/config.h b/keyboards/handwired/kolhoz/config.h index 105798cc2143..de9158c12591 100644 --- a/keyboards/handwired/kolhoz/config.h +++ b/keyboards/handwired/kolhoz/config.h @@ -8,5 +8,3 @@ #define SERIAL_USART_TX_PIN GP0 -#define TAPPING_TOGGLE 2 - diff --git a/keyboards/handwired/kolhoz/halconf.h b/keyboards/handwired/kolhoz/halconf.h deleted file mode 100644 index 8af49343da2e..000000000000 --- a/keyboards/handwired/kolhoz/halconf.h +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2023 QMK -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include_next diff --git a/keyboards/handwired/kolhoz/keyboard.json b/keyboards/handwired/kolhoz/keyboard.json index 158e8d1b14b8..aee2d02312da 100644 --- a/keyboards/handwired/kolhoz/keyboard.json +++ b/keyboards/handwired/kolhoz/keyboard.json @@ -30,7 +30,10 @@ "enabled": true, "handedness": { "pin": "GP23" - } + }, + "serial": { + "driver": "vendor" + }, "matrix_pins": { "right": { "direct": [ @@ -42,6 +45,9 @@ } } }, + "tapping": { + "toggle": 2 + }, "layouts": { "LAYOUT_split_2_3x5_4_3": { "layout": [ diff --git a/keyboards/handwired/kolhoz/keymaps/default/keymap.c b/keyboards/handwired/kolhoz/keymaps/default/keymap.c index efc1f41d702a..83e19f8b3268 100644 --- a/keyboards/handwired/kolhoz/keymaps/default/keymap.c +++ b/keyboards/handwired/kolhoz/keymaps/default/keymap.c @@ -3,9 +3,11 @@ #include QMK_KEYBOARD_H -#define LSYM 1 -#define LNUM 2 -#define LNAV 3 +enum layers { + LSYM = 1, + LNUM, + LNAV +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_split_2_3x5_4_3( diff --git a/keyboards/handwired/kolhoz/mcuconf.h b/keyboards/handwired/kolhoz/mcuconf.h deleted file mode 100644 index c61e9f6c36f7..000000000000 --- a/keyboards/handwired/kolhoz/mcuconf.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2023 QMK -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include_next - -#undef RP_SIO_USE_UART0 -#define RP_SIO_USE_UART0 TRUE - diff --git a/keyboards/handwired/kolhoz/readme.md b/keyboards/handwired/kolhoz/readme.md index 8ff00fd516a5..0e88011948a5 100644 --- a/keyboards/handwired/kolhoz/readme.md +++ b/keyboards/handwired/kolhoz/readme.md @@ -9,11 +9,11 @@ The layout is inspired by the [corne](https://github.com/foostan/crkbd), but has Make example for this keyboard (after setting up your build environment): - qmk clean -a && qmk compile -kb handwired/kolhoz -km default + make handwired/kolhoz:default Flashing example for this keyboard: - qmk flash -kb handwired/kolhoz -km default + make handwired/kolhoz:default:flash ## Bootloader diff --git a/keyboards/handwired/kolhoz/rules.mk b/keyboards/handwired/kolhoz/rules.mk deleted file mode 100644 index 161ec22b16e2..000000000000 --- a/keyboards/handwired/kolhoz/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor From e585e6ea983c94db06de9578db544593b7fe5c79 Mon Sep 17 00:00:00 2001 From: vf1 Date: Thu, 7 Nov 2024 21:34:46 +0300 Subject: [PATCH 05/18] Update keyboards/handwired/kolhoz/readme.md Co-authored-by: jack --- keyboards/handwired/kolhoz/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/kolhoz/readme.md b/keyboards/handwired/kolhoz/readme.md index 0e88011948a5..1717ab9ede9c 100644 --- a/keyboards/handwired/kolhoz/readme.md +++ b/keyboards/handwired/kolhoz/readme.md @@ -1,6 +1,6 @@ # handwired/kolhoz -![handwired/kolhoz](https://github.com/vf1/kolhoz_kbd/blob/main/IMG20241107173135.jpg) +![handwired/kolhoz](https://i.imgur.com/XXT1MdY.jpeg) The layout is inspired by the [corne](https://github.com/foostan/crkbd), but has four additional vertical keys. From 1e69719dbfd403810a51e832174c209aba946eef Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Sat, 9 Nov 2024 10:36:56 +0300 Subject: [PATCH 06/18] Add default level enum const --- keyboards/handwired/kolhoz/keymaps/default/keymap.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/keyboards/handwired/kolhoz/keymaps/default/keymap.c b/keyboards/handwired/kolhoz/keymaps/default/keymap.c index 83e19f8b3268..719046cea7e3 100644 --- a/keyboards/handwired/kolhoz/keymaps/default/keymap.c +++ b/keyboards/handwired/kolhoz/keymaps/default/keymap.c @@ -4,13 +4,14 @@ #include QMK_KEYBOARD_H enum layers { - LSYM = 1, + LDEF, + LSYM, LNUM, LNAV }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split_2_3x5_4_3( + [LDEF] = LAYOUT_split_2_3x5_4_3( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_QUOTE, @@ -20,18 +21,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_TILDE, KC_GRV, KC_NO, KC_NO, KC_NO, KC_PEQL, KC_LBRC, KC_RBRC, KC_QUES, KC_SLASH, KC_TRNS, KC_NO, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_COLON, KC_BSPC, KC_EXCLAIM, KC_UNDERSCORE, KC_MINUS, KC_PLUS, KC_PIPE, KC_LCBR, KC_RCBR, KC_LT, KC_GT, KC_DQUO, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(LDEF), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [LNUM] = LAYOUT_split_2_3x5_4_3( KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO, KC_TRNS, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, KC_BSPC, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(LDEF), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [LNAV] = LAYOUT_split_2_3x5_4_3( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, KC_TRNS, KC_NO, KC_NO, MS_BTN2, MS_BTN3, MS_BTN1, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RCTL(KC_LEFT), KC_NO, KC_NO, RCTL(KC_RIGHT), KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, TO(0), TO(0), KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, TO(LDEF), TO(LDEF), KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; From 208796ad96a25a27bcc39f29c0fca706687787ed Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Sat, 9 Nov 2024 10:43:06 +0300 Subject: [PATCH 07/18] Add missing comma --- keyboards/handwired/kolhoz/keyboard.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/kolhoz/keyboard.json b/keyboards/handwired/kolhoz/keyboard.json index aee2d02312da..4449edd6086f 100644 --- a/keyboards/handwired/kolhoz/keyboard.json +++ b/keyboards/handwired/kolhoz/keyboard.json @@ -32,7 +32,7 @@ "pin": "GP23" }, "serial": { - "driver": "vendor" + "driver": "vendor", }, "matrix_pins": { "right": { From c5901737e50093c03c2e1509ce2f42b98ec10e5f Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Sat, 9 Nov 2024 10:47:21 +0300 Subject: [PATCH 08/18] Move tx pin config to json --- keyboards/handwired/kolhoz/config.h | 2 -- keyboards/handwired/kolhoz/keyboard.json | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/handwired/kolhoz/config.h b/keyboards/handwired/kolhoz/config.h index de9158c12591..dba5b0f5d753 100644 --- a/keyboards/handwired/kolhoz/config.h +++ b/keyboards/handwired/kolhoz/config.h @@ -6,5 +6,3 @@ #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U -#define SERIAL_USART_TX_PIN GP0 - diff --git a/keyboards/handwired/kolhoz/keyboard.json b/keyboards/handwired/kolhoz/keyboard.json index 4449edd6086f..23e8008fad9b 100644 --- a/keyboards/handwired/kolhoz/keyboard.json +++ b/keyboards/handwired/kolhoz/keyboard.json @@ -33,6 +33,7 @@ }, "serial": { "driver": "vendor", + "pin": "GP0" }, "matrix_pins": { "right": { From e33b3c98794567465d1cec98cfaae009c6372285 Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Sat, 9 Nov 2024 11:20:06 +0300 Subject: [PATCH 09/18] Add print screen key --- keyboards/handwired/kolhoz/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/kolhoz/keymaps/default/keymap.c b/keyboards/handwired/kolhoz/keymaps/default/keymap.c index 719046cea7e3..66c64d0ab101 100644 --- a/keyboards/handwired/kolhoz/keymaps/default/keymap.c +++ b/keyboards/handwired/kolhoz/keymaps/default/keymap.c @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(LDEF), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [LNUM] = LAYOUT_split_2_3x5_4_3( - KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO, KC_TRNS, + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_PSCR, KC_0, KC_1, KC_2, KC_3, KC_NO, KC_TRNS, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, KC_BSPC, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(LDEF), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS From fdeb0bfb08671fe23d71362dcee77d97236b489a Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Sat, 9 Nov 2024 13:17:35 +0300 Subject: [PATCH 10/18] Format json --- keyboards/handwired/kolhoz/keyboard.json | 144 +++++++++++------------ 1 file changed, 67 insertions(+), 77 deletions(-) diff --git a/keyboards/handwired/kolhoz/keyboard.json b/keyboards/handwired/kolhoz/keyboard.json index 23e8008fad9b..967cd1fe6912 100644 --- a/keyboards/handwired/kolhoz/keyboard.json +++ b/keyboards/handwired/kolhoz/keyboard.json @@ -3,7 +3,6 @@ "keyboard_name": "handwired/kolhoz", "maintainer": "vf1", "development_board": "promicro_rp2040", - "diode_direction": "COL2ROW", "features": { "bootmagic": true, "command": false, @@ -13,102 +12,93 @@ "nkro": true }, "matrix_pins": { - "direct":[ - [ "GP14", "GP2", "GP6", "GP10", "GP27", "GP20", null, null], - [ "GP15", "GP3", "GP7", "GP11", "GP28", "GP21", null, null], - [ null, "GP4", "GP8", "GP12", "GP22", "GP18", null, null], - [ null, "GP5", "GP9", "GP13", "GP26", "GP19", "GP16", "GP17"] + "direct": [ + ["GP14", "GP2", "GP6", "GP10", "GP27", "GP20", null, null], + ["GP15", "GP3", "GP7", "GP11", "GP28", "GP21", null, null], + [null, "GP4", "GP8", "GP12", "GP22", "GP18", null, null], + [null, "GP5", "GP9", "GP13", "GP26", "GP19", "GP16", "GP17"] ] }, - "url": "", - "usb": { - "device_version": "1.0.0", - "pid": "0x0000", - "vid": "0xFEED" - }, "split": { "enabled": true, "handedness": { "pin": "GP23" }, - "serial": { - "driver": "vendor", - "pin": "GP0" - }, "matrix_pins": { "right": { "direct": [ - [ "GP27", "GP20", "GP16", "GP10", "GP6", "GP2", null, null], - [ "GP28", "GP21", "GP17", "GP11", "GP7", "GP3", null, null], - [ null, "GP22", "GP18", "GP12", "GP8", "GP4", null, null], - [ null, "GP26", "GP19", "GP13", "GP9", "GP5", "GP14", "GP15"] + ["GP27", "GP20", "GP16", "GP10", "GP6", "GP2", null, null], + ["GP28", "GP21", "GP17", "GP11", "GP7", "GP3", null, null], + [null, "GP22", "GP18", "GP12", "GP8", "GP4", null, null], + [null, "GP26", "GP19", "GP13", "GP9", "GP5", "GP14", "GP15"] ] } + }, + "serial": { + "driver": "vendor", + "pin": "GP0" } }, "tapping": { "toggle": 2 }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, "layouts": { "LAYOUT_split_2_3x5_4_3": { "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":4, "y":0}, - {"matrix": [0, 5], "x":5, "y":0}, - - {"matrix": [4, 5], "x":12, "y":0}, - {"matrix": [4, 4], "x":13, "y":0}, - {"matrix": [4, 3], "x":14, "y":0}, - {"matrix": [4, 2], "x":15, "y":0}, - {"matrix": [4, 1], "x":16, "y":0}, - {"matrix": [4, 0], "x":17, "y":0}, - - {"matrix": [1, 0], "x":0, "y":1}, - {"matrix": [1, 1], "x":1, "y":1}, - {"matrix": [1, 2], "x":2, "y":1}, - {"matrix": [1, 3], "x":3, "y":1}, - {"matrix": [1, 4], "x":4, "y":1}, - {"matrix": [1, 5], "x":5, "y":1}, - - {"matrix": [5, 5], "x":12, "y":1}, - {"matrix": [5, 4], "x":13, "y":1}, - {"matrix": [5, 3], "x":14, "y":1}, - {"matrix": [5, 2], "x":15, "y":1}, - {"matrix": [5, 1], "x":16, "y":1}, - {"matrix": [5, 0], "x":17, "y":1}, - - {"matrix": [2, 1], "x":1, "y":2}, - {"matrix": [2, 2], "x":2, "y":2}, - {"matrix": [2, 3], "x":3, "y":2}, - {"matrix": [2, 4], "x":4, "y":2}, - {"matrix": [2, 5], "x":5, "y":2}, - - {"matrix": [6, 5], "x":12, "y":2}, - {"matrix": [6, 4], "x":13, "y":2}, - {"matrix": [6, 3], "x":14, "y":2}, - {"matrix": [6, 2], "x":15, "y":2}, - {"matrix": [6, 1], "x":16, "y":2}, - - {"matrix": [3, 1], "x":1, "y":3.25}, - {"matrix": [3, 2], "x":2, "y":3.25}, - {"matrix": [3, 3], "x":3, "y":3.25}, - {"matrix": [3, 4], "x":4, "y":3.25}, - - {"matrix": [3, 5], "x":5.25, "y":3.5}, - {"matrix": [3, 6], "x":6.25, "y":3.75}, - {"matrix": [3, 7], "x":7.25, "y":4}, - - {"matrix": [7, 7], "x":13, "y":3.25}, - {"matrix": [7, 6], "x":14, "y":3.25}, - {"matrix": [7, 5], "x":15, "y":3.25}, - {"matrix": [7, 4], "x":16, "y":3.25}, - - {"matrix": [7, 3], "x":9.75, "y":4}, - {"matrix": [7, 2], "x":10.75, "y":3.75}, - {"matrix": [7, 1], "x":11.75, "y":3.5} + {"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": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [4, 5], "x": 12, "y": 0}, + {"matrix": [4, 4], "x": 13, "y": 0}, + {"matrix": [4, 3], "x": 14, "y": 0}, + {"matrix": [4, 2], "x": 15, "y": 0}, + {"matrix": [4, 1], "x": 16, "y": 0}, + {"matrix": [4, 0], "x": 17, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [5, 5], "x": 12, "y": 1}, + {"matrix": [5, 4], "x": 13, "y": 1}, + {"matrix": [5, 3], "x": 14, "y": 1}, + {"matrix": [5, 2], "x": 15, "y": 1}, + {"matrix": [5, 1], "x": 16, "y": 1}, + {"matrix": [5, 0], "x": 17, "y": 1}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [6, 5], "x": 12, "y": 2}, + {"matrix": [6, 4], "x": 13, "y": 2}, + {"matrix": [6, 3], "x": 14, "y": 2}, + {"matrix": [6, 2], "x": 15, "y": 2}, + {"matrix": [6, 1], "x": 16, "y": 2}, + {"matrix": [3, 1], "x": 1, "y": 3.25}, + {"matrix": [3, 2], "x": 2, "y": 3.25}, + {"matrix": [3, 3], "x": 3, "y": 3.25}, + {"matrix": [3, 4], "x": 4, "y": 3.25}, + {"matrix": [3, 5], "x": 5.25, "y": 3.5}, + {"matrix": [3, 6], "x": 6.25, "y": 3.75}, + {"matrix": [3, 7], "x": 7.25, "y": 4}, + {"matrix": [7, 7], "x": 13, "y": 3.25}, + {"matrix": [7, 6], "x": 14, "y": 3.25}, + {"matrix": [7, 5], "x": 15, "y": 3.25}, + {"matrix": [7, 4], "x": 16, "y": 3.25}, + {"matrix": [7, 3], "x": 9.75, "y": 4}, + {"matrix": [7, 2], "x": 10.75, "y": 3.75}, + {"matrix": [7, 1], "x": 11.75, "y": 3.5} ] } } From 56b9d8142a7d9ee342a9572bf90e94f1372f8671 Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Thu, 14 Nov 2024 17:22:01 +0300 Subject: [PATCH 11/18] Update layout --- keyboards/handwired/kolhoz/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/kolhoz/keymaps/default/keymap.c b/keyboards/handwired/kolhoz/keymaps/default/keymap.c index 66c64d0ab101..76ddd965f681 100644 --- a/keyboards/handwired/kolhoz/keymaps/default/keymap.c +++ b/keyboards/handwired/kolhoz/keymaps/default/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { OSM(MOD_LSFT), OSM(MOD_LCTL), OSM(MOD_LGUI), OSM(MOD_LALT), OSL(LNUM), LT(LSYM,KC_SPC), TT(LNAV), KC_NO, LT(LSYM,KC_SPC), KC_NO, OSM(MOD_RALT), OSM(MOD_RGUI), OSM(MOD_RCTL), OSM(MOD_RSFT) ), [LSYM] = LAYOUT_split_2_3x5_4_3( - KC_NO, KC_TILDE, KC_GRV, KC_NO, KC_NO, KC_NO, KC_PEQL, KC_LBRC, KC_RBRC, KC_QUES, KC_SLASH, KC_TRNS, + KC_NO, KC_TILDE, KC_GRV, KC_NO, KC_NO, KC_BSLS, KC_PEQL, KC_LBRC, KC_RBRC, KC_QUES, KC_SLASH, KC_TRNS, KC_NO, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_COLON, KC_BSPC, KC_EXCLAIM, KC_UNDERSCORE, KC_MINUS, KC_PLUS, KC_PIPE, KC_LCBR, KC_RCBR, KC_LT, KC_GT, KC_DQUO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(LDEF), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS From 7049452bdf1c8e8560179ee05bbcc3d3624bd122 Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Fri, 15 Nov 2024 07:37:39 +0300 Subject: [PATCH 12/18] Update layout, enable extra features --- .../handwired/kolhoz/keymaps/default/keymap.c | 31 ++++++++++++++----- keyboards/handwired/kolhoz/rules.mk | 3 ++ 2 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 keyboards/handwired/kolhoz/rules.mk diff --git a/keyboards/handwired/kolhoz/keymaps/default/keymap.c b/keyboards/handwired/kolhoz/keymaps/default/keymap.c index 76ddd965f681..7b5574d64941 100644 --- a/keyboards/handwired/kolhoz/keymaps/default/keymap.c +++ b/keyboards/handwired/kolhoz/keymaps/default/keymap.c @@ -12,27 +12,42 @@ enum layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LDEF] = LAYOUT_split_2_3x5_4_3( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_QUOTE, - OSM(MOD_LSFT), OSM(MOD_LCTL), OSM(MOD_LGUI), OSM(MOD_LALT), OSL(LNUM), LT(LSYM,KC_SPC), TT(LNAV), KC_NO, LT(LSYM,KC_SPC), KC_NO, OSM(MOD_RALT), OSM(MOD_RGUI), OSM(MOD_RCTL), OSM(MOD_RSFT) + OSM(MOD_LSFT), OSM(MOD_LCTL), OSM(MOD_LGUI), OSM(MOD_LALT), OSL(LNUM), LT(LNAV,KC_SPC), OSL(LSYM), OSL(LSYM), LT(LNAV,KC_SPC), KC_NO, OSM(MOD_RALT), OSM(MOD_RGUI), OSM(MOD_RCTL), OSM(MOD_RSFT) ), [LSYM] = LAYOUT_split_2_3x5_4_3( - KC_NO, KC_TILDE, KC_GRV, KC_NO, KC_NO, KC_BSLS, KC_PEQL, KC_LBRC, KC_RBRC, KC_QUES, KC_SLASH, KC_TRNS, - KC_NO, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_COLON, KC_BSPC, + KC_NO, KC_TILDE, KC_GRV, KC_NO, KC_SLASH, KC_BSLS, KC_PEQL, KC_LBRC, KC_RBRC, KC_QUES, KC_NO, KC_TRNS, + KC_NO, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_COLON, KC_TRNS, KC_EXCLAIM, KC_UNDERSCORE, KC_MINUS, KC_PLUS, KC_PIPE, KC_LCBR, KC_RCBR, KC_LT, KC_GT, KC_DQUO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(LDEF), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [LNUM] = LAYOUT_split_2_3x5_4_3( - KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_PSCR, KC_0, KC_1, KC_2, KC_3, KC_NO, KC_TRNS, - KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, KC_BSPC, + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_PSCR, KC_NO, KC_1, KC_2, KC_3, KC_NO, KC_TRNS, + KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, CW_TOGG, KC_NO, KC_4, KC_5, KC_6, KC_0, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(LDEF), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [LNAV] = LAYOUT_split_2_3x5_4_3( - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, KC_TRNS, - KC_NO, KC_NO, MS_BTN2, MS_BTN3, MS_BTN1, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, KC_BSPC, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_DEL, KC_TRNS, + KC_NO, KC_NO, MS_BTN2, MS_BTN3, MS_BTN1, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RCTL(KC_LEFT), KC_NO, KC_NO, RCTL(KC_RIGHT), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, TO(LDEF), TO(LDEF), KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; + +const key_override_t delete_key_override1 = ko_make_basic(MOD_MASK_GUI, KC_BSPC, KC_DEL); +const key_override_t delete_key_override2 = ko_make_basic(MOD_MASK_ALT, KC_BSPC, KC_DEL); + +const key_override_t *key_overrides[] = { + &delete_key_override1, + &delete_key_override2, +}; + +const uint16_t PROGMEM mouse_layer_enable_combo[] = {KC_S, KC_D, KC_F, COMBO_END}; +const uint16_t PROGMEM mouse_layer_disable_combo[] = {MS_BTN2, MS_BTN3, MS_BTN1, COMBO_END}; +combo_t key_combos[] = { + COMBO(mouse_layer_enable_combo, TG(LNAV)), + COMBO(mouse_layer_disable_combo, TG(LNAV)), +}; diff --git a/keyboards/handwired/kolhoz/rules.mk b/keyboards/handwired/kolhoz/rules.mk new file mode 100644 index 000000000000..1bf483b48458 --- /dev/null +++ b/keyboards/handwired/kolhoz/rules.mk @@ -0,0 +1,3 @@ +KEY_OVERRIDE_ENABLE = yes +CAPS_WORD_ENABLE = yes +COMBO_ENABLE = yes From f6aa7ca9834c0997d3d644086f0669fb9157308d Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Fri, 15 Nov 2024 22:02:22 +0300 Subject: [PATCH 13/18] Fix linter error --- keyboards/handwired/kolhoz/keymaps/default/rules.mk | 1 + keyboards/handwired/kolhoz/rules.mk | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 keyboards/handwired/kolhoz/keymaps/default/rules.mk diff --git a/keyboards/handwired/kolhoz/keymaps/default/rules.mk b/keyboards/handwired/kolhoz/keymaps/default/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/handwired/kolhoz/keymaps/default/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/handwired/kolhoz/rules.mk b/keyboards/handwired/kolhoz/rules.mk index 1bf483b48458..c5fe0914c817 100644 --- a/keyboards/handwired/kolhoz/rules.mk +++ b/keyboards/handwired/kolhoz/rules.mk @@ -1,3 +1,2 @@ KEY_OVERRIDE_ENABLE = yes CAPS_WORD_ENABLE = yes -COMBO_ENABLE = yes From 69734310994f1f410684576a4c4e3ef71500b7b6 Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Sat, 16 Nov 2024 16:53:40 +0300 Subject: [PATCH 14/18] Format layout --- keyboards/handwired/kolhoz/keymaps/default/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/handwired/kolhoz/keymaps/default/keymap.c b/keyboards/handwired/kolhoz/keymaps/default/keymap.c index 7b5574d64941..ceca93ee2eea 100644 --- a/keyboards/handwired/kolhoz/keymaps/default/keymap.c +++ b/keyboards/handwired/kolhoz/keymaps/default/keymap.c @@ -12,10 +12,10 @@ enum layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LDEF] = LAYOUT_split_2_3x5_4_3( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_QUOTE, - OSM(MOD_LSFT), OSM(MOD_LCTL), OSM(MOD_LGUI), OSM(MOD_LALT), OSL(LNUM), LT(LNAV,KC_SPC), OSL(LSYM), OSL(LSYM), LT(LNAV,KC_SPC), KC_NO, OSM(MOD_RALT), OSM(MOD_RGUI), OSM(MOD_RCTL), OSM(MOD_RSFT) + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_QUOTE, + OSM(MOD_LSFT), OSM(MOD_LCTL), OSM(MOD_LGUI), OSM(MOD_LALT), OSL(LNUM), LT(LNAV,KC_SPC), OSL(LSYM), OSL(LSYM), LT(LNAV,KC_SPC), KC_NO, OSM(MOD_RALT), OSM(MOD_RGUI), OSM(MOD_RCTL), OSM(MOD_RSFT) ), [LSYM] = LAYOUT_split_2_3x5_4_3( KC_NO, KC_TILDE, KC_GRV, KC_NO, KC_SLASH, KC_BSLS, KC_PEQL, KC_LBRC, KC_RBRC, KC_QUES, KC_NO, KC_TRNS, From e4fb81da9c1630bea7fd10d4128b6857406f4a9c Mon Sep 17 00:00:00 2001 From: vf1 Date: Sat, 16 Nov 2024 17:09:36 +0300 Subject: [PATCH 15/18] Apply suggestions from code review Co-authored-by: Ryan --- keyboards/handwired/kolhoz/keyboard.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboards/handwired/kolhoz/keyboard.json b/keyboards/handwired/kolhoz/keyboard.json index 967cd1fe6912..91672172617c 100644 --- a/keyboards/handwired/kolhoz/keyboard.json +++ b/keyboards/handwired/kolhoz/keyboard.json @@ -13,10 +13,10 @@ }, "matrix_pins": { "direct": [ - ["GP14", "GP2", "GP6", "GP10", "GP27", "GP20", null, null], - ["GP15", "GP3", "GP7", "GP11", "GP28", "GP21", null, null], - [null, "GP4", "GP8", "GP12", "GP22", "GP18", null, null], - [null, "GP5", "GP9", "GP13", "GP26", "GP19", "GP16", "GP17"] + ["GP14", "GP2", "GP6", "GP10", "GP27", "GP20"], + ["GP15", "GP3", "GP7", "GP11", "GP28", "GP21"], + ["GP16", "GP4", "GP8", "GP12", "GP22", "GP18"], + ["GP17", "GP5", "GP9", "GP13", "GP26", "GP19"] ] }, "split": { @@ -27,10 +27,10 @@ "matrix_pins": { "right": { "direct": [ - ["GP27", "GP20", "GP16", "GP10", "GP6", "GP2", null, null], - ["GP28", "GP21", "GP17", "GP11", "GP7", "GP3", null, null], - [null, "GP22", "GP18", "GP12", "GP8", "GP4", null, null], - [null, "GP26", "GP19", "GP13", "GP9", "GP5", "GP14", "GP15"] + ["GP27", "GP20", "GP16", "GP10", "GP6", "GP2"], + ["GP28", "GP21", "GP17", "GP11", "GP7", "GP3"], + ["GP14", "GP22", "GP18", "GP12", "GP8", "GP4"], + ["GP15", "GP26", "GP19", "GP13", "GP9", "GP5"] ] } }, @@ -90,10 +90,10 @@ {"matrix": [3, 3], "x": 3, "y": 3.25}, {"matrix": [3, 4], "x": 4, "y": 3.25}, {"matrix": [3, 5], "x": 5.25, "y": 3.5}, - {"matrix": [3, 6], "x": 6.25, "y": 3.75}, - {"matrix": [3, 7], "x": 7.25, "y": 4}, - {"matrix": [7, 7], "x": 13, "y": 3.25}, - {"matrix": [7, 6], "x": 14, "y": 3.25}, + {"matrix": [2, 0], "x": 6.25, "y": 3.75}, + {"matrix": [3, 0], "x": 7.25, "y": 4}, + {"matrix": [7, 0], "x": 13, "y": 3.25}, + {"matrix": [6, 0], "x": 14, "y": 3.25}, {"matrix": [7, 5], "x": 15, "y": 3.25}, {"matrix": [7, 4], "x": 16, "y": 3.25}, {"matrix": [7, 3], "x": 9.75, "y": 4}, From f6d225b003bc7a428ff16f65dc9a2e656928e9c3 Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Sun, 17 Nov 2024 19:31:08 +0300 Subject: [PATCH 16/18] Add layer rgblight --- keyboards/handwired/kolhoz/keyboard.json | 16 ++++++++++- .../handwired/kolhoz/keymaps/default/keymap.c | 28 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/kolhoz/keyboard.json b/keyboards/handwired/kolhoz/keyboard.json index 91672172617c..5f76017a81f9 100644 --- a/keyboards/handwired/kolhoz/keyboard.json +++ b/keyboards/handwired/kolhoz/keyboard.json @@ -9,7 +9,8 @@ "console": false, "extrakey": true, "mousekey": true, - "nkro": true + "nkro": true, + "rgblight": true }, "matrix_pins": { "direct": [ @@ -39,6 +40,19 @@ "pin": "GP0" } }, + "rgblight":{ + "led_count": 2, + "split": true, + "split_count": [1, 1], + "layers": { + "enabled": true + }, + "max_brightness": 127 + }, + "ws2812": { + "driver": "vendor", + "pin": "GP23" + }, "tapping": { "toggle": 2 }, diff --git a/keyboards/handwired/kolhoz/keymaps/default/keymap.c b/keyboards/handwired/kolhoz/keymaps/default/keymap.c index ceca93ee2eea..3a335436e39b 100644 --- a/keyboards/handwired/kolhoz/keymaps/default/keymap.c +++ b/keyboards/handwired/kolhoz/keymaps/default/keymap.c @@ -51,3 +51,31 @@ combo_t key_combos[] = { COMBO(mouse_layer_enable_combo, TG(LNAV)), COMBO(mouse_layer_disable_combo, TG(LNAV)), }; + +const rgblight_segment_t PROGMEM rgb_layer_0[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_OFF}); +const rgblight_segment_t PROGMEM rgb_layer_1[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_GREEN}); +const rgblight_segment_t PROGMEM rgb_layer_2[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_RED}); +const rgblight_segment_t PROGMEM rgb_layer_3[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_BLUE}); + +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( + rgb_layer_0, + rgb_layer_1, + rgb_layer_2, + rgb_layer_3 +); + +layer_state_t default_layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(0, layer_state_cmp(state, LDEF)); + return state; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(1, layer_state_cmp(state, LSYM)); + rgblight_set_layer_state(2, layer_state_cmp(state, LNUM)); + rgblight_set_layer_state(3, layer_state_cmp(state, LNAV)); + return state; +} + +void keyboard_post_init_user(void) { + rgblight_layers = rgb_layers; +} From bc36f408637159a5981245e3aa2968dbc9886181 Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Tue, 19 Nov 2024 20:22:29 +0300 Subject: [PATCH 17/18] Add blink on modifiers --- keyboards/handwired/kolhoz/config.h | 1 + .../handwired/kolhoz/keymaps/default/keymap.c | 40 ++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/kolhoz/config.h b/keyboards/handwired/kolhoz/config.h index dba5b0f5d753..71996350dc76 100644 --- a/keyboards/handwired/kolhoz/config.h +++ b/keyboards/handwired/kolhoz/config.h @@ -6,3 +6,4 @@ #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U +#define RGBLIGHT_LAYER_BLINK diff --git a/keyboards/handwired/kolhoz/keymaps/default/keymap.c b/keyboards/handwired/kolhoz/keymaps/default/keymap.c index 3a335436e39b..fbd45916eafc 100644 --- a/keyboards/handwired/kolhoz/keymaps/default/keymap.c +++ b/keyboards/handwired/kolhoz/keymaps/default/keymap.c @@ -56,14 +56,52 @@ const rgblight_segment_t PROGMEM rgb_layer_0[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, const rgblight_segment_t PROGMEM rgb_layer_1[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_GREEN}); const rgblight_segment_t PROGMEM rgb_layer_2[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_RED}); const rgblight_segment_t PROGMEM rgb_layer_3[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_BLUE}); +const rgblight_segment_t PROGMEM rgb_layer_4[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_SPRINGGREEN}); +const rgblight_segment_t PROGMEM rgb_layer_5[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_CHARTREUSE}); +const rgblight_segment_t PROGMEM rgb_layer_6[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_PINK}); +const rgblight_segment_t PROGMEM rgb_layer_7[] = RGBLIGHT_LAYER_SEGMENTS({0, 2, HSV_CYAN}); const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( rgb_layer_0, rgb_layer_1, rgb_layer_2, - rgb_layer_3 + rgb_layer_3, + rgb_layer_4, + rgb_layer_5, + rgb_layer_6, + rgb_layer_7 ); +const uint16_t MOD_BLINK_DELAY = 50; +const uint8_t MOD_BLINK_COUNT = 4; + +void oneshot_mods_changed_user(uint8_t mods) { + if(mods & MOD_MASK_CTRL) { + rgblight_blink_layer_repeat(4, MOD_BLINK_DELAY, MOD_BLINK_COUNT); + } + else { + rgblight_unblink_layer(4); + } + if(mods & MOD_MASK_SHIFT) { + rgblight_blink_layer_repeat(5, MOD_BLINK_DELAY, MOD_BLINK_COUNT); + } + else { + rgblight_unblink_layer(5); + } + if(mods & MOD_MASK_GUI) { + rgblight_blink_layer_repeat(6, MOD_BLINK_DELAY, MOD_BLINK_COUNT); + } + else { + rgblight_unblink_layer(6); + } + if(mods & MOD_MASK_ALT) { + rgblight_blink_layer_repeat(7, MOD_BLINK_DELAY, MOD_BLINK_COUNT); + } + else { + rgblight_unblink_layer(7); + } +} + layer_state_t default_layer_state_set_user(layer_state_t state) { rgblight_set_layer_state(0, layer_state_cmp(state, LDEF)); return state; From 5abe82bb8072ad591b592028f246d97afbde3b75 Mon Sep 17 00:00:00 2001 From: Vitali Fomine Date: Tue, 19 Nov 2024 20:32:14 +0300 Subject: [PATCH 18/18] Update keymap --- keyboards/handwired/kolhoz/keymaps/default/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/handwired/kolhoz/keymaps/default/keymap.c b/keyboards/handwired/kolhoz/keymaps/default/keymap.c index fbd45916eafc..3d7ae3341289 100644 --- a/keyboards/handwired/kolhoz/keymaps/default/keymap.c +++ b/keyboards/handwired/kolhoz/keymaps/default/keymap.c @@ -21,19 +21,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_TILDE, KC_GRV, KC_NO, KC_SLASH, KC_BSLS, KC_PEQL, KC_LBRC, KC_RBRC, KC_QUES, KC_NO, KC_TRNS, KC_NO, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_COLON, KC_TRNS, KC_EXCLAIM, KC_UNDERSCORE, KC_MINUS, KC_PLUS, KC_PIPE, KC_LCBR, KC_RCBR, KC_LT, KC_GT, KC_DQUO, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(LDEF), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [LNUM] = LAYOUT_split_2_3x5_4_3( KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_PSCR, KC_NO, KC_1, KC_2, KC_3, KC_NO, KC_TRNS, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, CW_TOGG, KC_NO, KC_4, KC_5, KC_6, KC_0, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(LDEF), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [LNAV] = LAYOUT_split_2_3x5_4_3( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_DEL, KC_TRNS, KC_NO, KC_NO, MS_BTN2, MS_BTN3, MS_BTN1, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RCTL(KC_LEFT), KC_NO, KC_NO, RCTL(KC_RIGHT), KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, TO(LDEF), TO(LDEF), KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_NO, KC_NO, KC_NO, KC_NO, TO(LDEF), TO(LDEF), TO(LDEF), KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) };