From 490a4252ee08ce610392a761bfe7769ef9537849 Mon Sep 17 00:00:00 2001 From: Matthieu Petiteau Date: Thu, 31 Oct 2024 15:18:47 +0000 Subject: [PATCH 01/10] Add Smallcat --- keyboards/smallcat/keyboard.json | 88 +++++++++++++ keyboards/smallcat/keymaps/vial/config.h | 11 ++ keyboards/smallcat/keymaps/vial/keymap.c | 11 ++ keyboards/smallcat/keymaps/vial/rules.mk | 11 ++ keyboards/smallcat/keymaps/vial/vial.json | 145 ++++++++++++++++++++++ keyboards/smallcat/readme.md | 13 ++ 6 files changed, 279 insertions(+) create mode 100644 keyboards/smallcat/keyboard.json create mode 100644 keyboards/smallcat/keymaps/vial/config.h create mode 100644 keyboards/smallcat/keymaps/vial/keymap.c create mode 100644 keyboards/smallcat/keymaps/vial/rules.mk create mode 100644 keyboards/smallcat/keymaps/vial/vial.json create mode 100644 keyboards/smallcat/readme.md diff --git a/keyboards/smallcat/keyboard.json b/keyboards/smallcat/keyboard.json new file mode 100644 index 00000000000..77e184031da --- /dev/null +++ b/keyboards/smallcat/keyboard.json @@ -0,0 +1,88 @@ +{ + "keyboard_name": "Smallcat", + "manufacturer": "smallwat3r", + "url": "", + "maintainer": "smallwat3r", + "usb": { + "vid": "0xFEED", + "pid": "0x0000", + "device_version": "1.0.0" + }, + "board": "GENERIC_RP_RP2040", + "bootloader": "rp2040", + "processor": "RP2040", + "features": { + "extrakey": true, + "mousekey": true, + "unicode": true + }, + "matrix_pins": { + "direct": [ + [null, "GP26", "GP27", "GP28", null], + ["GP15", "GP14", "GP13", "GP12", "GP0"], + [null, "GP5", "GP6", "GP7", null], + ["GP10", "GP11", null, null, null] + ] + }, + "split": { + "enabled": true, + "matrix_pins": { + "right": { + "direct": [ + [null, "GP28", "GP27", "GP26", null], + ["GP0", "GP12", "GP13", "GP14", "GP15"], + [null, "GP7", "GP6", "GP5", null], + ["GP11", "GP10", null, null, null] + ] + } + }, + "serial": { + "pin": "GP1", + "driver": "vendor" + } + }, + "community_layouts": ["split_3x5_2"], + "layout_aliases": { + "LAYOUT": "LAYOUT_split_3x5_2" + }, + "layouts": { + "LAYOUT_split_3x5_2": { + "layout": + [ + {"x": 1, "y": 0.31, "matrix": [0, 1]}, + {"x": 2, "y": 0, "matrix": [0, 2]}, + {"x": 3, "y": 0.28, "matrix": [0, 3]}, + + {"x": 8, "y": 0.28, "matrix": [4, 1]}, + {"x": 9, "y": 0, "matrix": [4, 2]}, + {"x": 10, "y": 0.31, "matrix": [4, 3]}, + + {"x": 0, "y": 1.93, "matrix": [1, 0]}, + {"x": 1, "y": 1.31, "matrix": [1, 1]}, + {"x": 2, "y": 1, "matrix": [1, 2]}, + {"x": 3, "y": 1.28, "matrix": [1, 3]}, + {"x": 4, "y": 1.42, "matrix": [1, 4]}, + + {"x": 7, "y": 1.42, "matrix": [5, 0]}, + {"x": 8, "y": 1.28, "matrix": [5, 1]}, + {"x": 9, "y": 1, "matrix": [5, 2]}, + {"x": 10, "y": 1.31, "matrix": [5, 3]}, + {"x": 11, "y": 1.93, "matrix": [5, 4]}, + + {"x": 1, "y": 2.31, "matrix": [2, 1]}, + {"x": 2, "y": 2, "matrix": [2, 2]}, + {"x": 3, "y": 2.28, "matrix": [2, 3]}, + + {"x": 8, "y": 2.28, "matrix": [6, 1]}, + {"x": 9, "y": 2, "matrix": [6, 2]}, + {"x": 10, "y": 2.31, "matrix": [6, 3]}, + + {"x": 3.5, "y": 3.75, "matrix": [3, 0]}, + {"x": 4.5, "y": 4, "matrix": [3, 1]}, + + {"x": 6.5, "y": 4, "matrix": [7, 0]}, + {"x": 7.5, "y": 3.75, "matrix": [7, 1]} + ] + } + } +} diff --git a/keyboards/smallcat/keymaps/vial/config.h b/keyboards/smallcat/keymaps/vial/config.h new file mode 100644 index 00000000000..3029c5baea5 --- /dev/null +++ b/keyboards/smallcat/keymaps/vial/config.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 6 +#define VIAL_TAP_DANCE_ENTRIES 15 +#define VIAL_COMBO_ENTRIES 40 +#define VIAL_KEYBOARD_UID {0xDA, 0x2A, 0xFA, 0x9D, 0x66, 0xE4, 0x31, 0x52} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 1 } +#define VIAL_UNLOCK_COMBO_COLS { 1, 4 } diff --git a/keyboards/smallcat/keymaps/vial/keymap.c b/keyboards/smallcat/keymaps/vial/keymap.c new file mode 100644 index 00000000000..2fd1def71b1 --- /dev/null +++ b/keyboards/smallcat/keymaps/vial/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +/* default empty layout */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/smallcat/keymaps/vial/rules.mk b/keyboards/smallcat/keymaps/vial/rules.mk new file mode 100644 index 00000000000..97d26c29148 --- /dev/null +++ b/keyboards/smallcat/keymaps/vial/rules.mk @@ -0,0 +1,11 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +LTO_ENABLE = yes +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +REPEAT_KEY_ENABLE = yes +COMBO_ENABLE = yes +QMK_SETTINGS = yes +KEY_OVERRIDE_ENABLE = no +VIAL_INSECURE = no diff --git a/keyboards/smallcat/keymaps/vial/vial.json b/keyboards/smallcat/keymaps/vial/vial.json new file mode 100644 index 00000000000..95e2ca899cb --- /dev/null +++ b/keyboards/smallcat/keymaps/vial/vial.json @@ -0,0 +1,145 @@ +{ + "name": "Small Cat", + "firmwareVersion": 0, + "lighting": "none", + "keycodes": [ + "via/keycodes" + ], + "menus": [ + "via/keymap", + "via/layouts", + "via/macros", + "via/save_load" + ], + "matrix": { + "rows": 8, + "cols": 5 + }, + "layouts": { + "keymap": [ + [ + { + "x": 2 + }, + "0,2", + { + "x": 5.25 + }, + "4,2" + ], + [ + { + "y": -0.75, + "x": 1 + }, + "0,1", + { + "x": 1 + }, + "0,3", + { + "x": 3.25 + }, + "4,1", + { + "x": 1 + }, + "4,3" + ], + [ + { + "y": -0.25, + "x": 2 + }, + "1,2", + { + "x": 5.25 + }, + "5,2" + ], + [ + { + "y": -0.75, + "x": 1 + }, + "1,1", + { + "x": 1 + }, + "1,3", + "1,4", + { + "x": 1.25 + }, + "5,0", + "5,1", + { + "x": 1 + }, + "5,3" + ], + [ + { + "y": -0.5 + }, + "1,0", + { + "x": 9.25 + }, + "5,4" + ], + [ + { + "y": -0.75, + "x": 2 + }, + "2,2", + { + "x": 5.25 + }, + "6,2" + ], + [ + { + "y": -0.75, + "x": 1 + }, + "2,1", + { + "x": 1 + }, + "2,3", + { + "x": 3.25 + }, + "6,1", + { + "x": 1 + }, + "6,3" + ], + [ + { + "y": 0.25, + "x": 3.5 + }, + "3,0", + { + "x": 2.25 + }, + "7,1" + ], + [ + { + "y": -0.75, + "x": 4.5 + }, + "3,1", + { + "x": 0.25 + }, + "7,0" + ] + ] + } +} diff --git a/keyboards/smallcat/readme.md b/keyboards/smallcat/readme.md new file mode 100644 index 00000000000..98535edaec7 --- /dev/null +++ b/keyboards/smallcat/readme.md @@ -0,0 +1,13 @@ +# Smallcat + +![smallcat](https://raw.githubusercontent.com/smallwat3r/smallcat/refs/heads/main/images/smallcat.png) + +A 26-key split keyboard. [More info](https://github.com/smallwat3r/smallcat). + +* Keyboard Maintainer: [Matt Petiteau](https://github.com/smallwat3r/) + +Make example for this keyboard (after setting up your build environment): + + make smallcat:vial + +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). From 65f59029bfd4a682ca49877a2b3a755b91bcfbe0 Mon Sep 17 00:00:00 2001 From: Matthieu Petiteau Date: Sat, 2 Nov 2024 10:01:27 +0000 Subject: [PATCH 02/10] Add support for led --- keyboards/smallcat/keymaps/vial/config.h | 9 +++++++++ keyboards/smallcat/keymaps/vial/keymap.c | 9 +++++++++ keyboards/smallcat/keymaps/vial/rules.mk | 2 ++ 3 files changed, 20 insertions(+) diff --git a/keyboards/smallcat/keymaps/vial/config.h b/keyboards/smallcat/keymaps/vial/config.h index 3029c5baea5..3c6d2519098 100644 --- a/keyboards/smallcat/keymaps/vial/config.h +++ b/keyboards/smallcat/keymaps/vial/config.h @@ -9,3 +9,12 @@ #define VIAL_UNLOCK_COMBO_ROWS { 0, 1 } #define VIAL_UNLOCK_COMBO_COLS { 1, 4 } + +#define RGBLIGHT_LED_COUNT 1 +#define RGBLIGHT_SPLIT +#define RGBLIGHT_DEFAULT_HUE 110 +#define RGBLIGHT_LIMIT_VAL 10 +#define RGBLIGHT_SLEEP +#define RGBLIGHT_LAYERS +#define RGBLIGHT_HUE_STEP 20 +#define WS2812_DI_PIN GP16 diff --git a/keyboards/smallcat/keymaps/vial/keymap.c b/keyboards/smallcat/keymaps/vial/keymap.c index 2fd1def71b1..99c7ae69320 100644 --- a/keyboards/smallcat/keymaps/vial/keymap.c +++ b/keyboards/smallcat/keymaps/vial/keymap.c @@ -1,5 +1,14 @@ #include QMK_KEYBOARD_H +/* light up led in red when caps lock in on */ +const rgblight_segment_t PROGMEM capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_RED}); +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(capslock_layer); +void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; } +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(0, led_state.caps_lock); + return true; +} + /* default empty layout */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( diff --git a/keyboards/smallcat/keymaps/vial/rules.mk b/keyboards/smallcat/keymaps/vial/rules.mk index 97d26c29148..25a4b086fc2 100644 --- a/keyboards/smallcat/keymaps/vial/rules.mk +++ b/keyboards/smallcat/keymaps/vial/rules.mk @@ -5,6 +5,8 @@ TAP_DANCE_ENABLE = yes MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes REPEAT_KEY_ENABLE = yes +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = vendor COMBO_ENABLE = yes QMK_SETTINGS = yes KEY_OVERRIDE_ENABLE = no From 0adb50a678c506268406374065a5b858c8742cd9 Mon Sep 17 00:00:00 2001 From: Matthieu Petiteau Date: Sat, 2 Nov 2024 13:27:47 +0000 Subject: [PATCH 03/10] Do not use alt repeat --- keyboards/smallcat/keymaps/vial/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/smallcat/keymaps/vial/config.h b/keyboards/smallcat/keymaps/vial/config.h index 3c6d2519098..c164a09fef7 100644 --- a/keyboards/smallcat/keymaps/vial/config.h +++ b/keyboards/smallcat/keymaps/vial/config.h @@ -10,6 +10,8 @@ #define VIAL_UNLOCK_COMBO_ROWS { 0, 1 } #define VIAL_UNLOCK_COMBO_COLS { 1, 4 } +#define NO_ALT_REPEAT_KEY + #define RGBLIGHT_LED_COUNT 1 #define RGBLIGHT_SPLIT #define RGBLIGHT_DEFAULT_HUE 110 From c9b7cd71c3fc5104ce730bcc9a53b4e5d8ae4c2d Mon Sep 17 00:00:00 2001 From: Matthieu Petiteau Date: Sat, 2 Nov 2024 22:36:22 +0000 Subject: [PATCH 04/10] Add another layer for led --- keyboards/smallcat/keymaps/vial/config.h | 4 ++-- keyboards/smallcat/keymaps/vial/keymap.c | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/keyboards/smallcat/keymaps/vial/config.h b/keyboards/smallcat/keymaps/vial/config.h index c164a09fef7..b7d4e46d310 100644 --- a/keyboards/smallcat/keymaps/vial/config.h +++ b/keyboards/smallcat/keymaps/vial/config.h @@ -2,8 +2,8 @@ #pragma once -#define DYNAMIC_KEYMAP_LAYER_COUNT 6 -#define VIAL_TAP_DANCE_ENTRIES 15 +#define DYNAMIC_KEYMAP_LAYER_COUNT 8 +#define VIAL_TAP_DANCE_ENTRIES 20 #define VIAL_COMBO_ENTRIES 40 #define VIAL_KEYBOARD_UID {0xDA, 0x2A, 0xFA, 0x9D, 0x66, 0xE4, 0x31, 0x52} diff --git a/keyboards/smallcat/keymaps/vial/keymap.c b/keyboards/smallcat/keymaps/vial/keymap.c index 99c7ae69320..93e1773e93a 100644 --- a/keyboards/smallcat/keymaps/vial/keymap.c +++ b/keyboards/smallcat/keymaps/vial/keymap.c @@ -2,12 +2,17 @@ /* light up led in red when caps lock in on */ const rgblight_segment_t PROGMEM capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_RED}); -const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(capslock_layer); +const rgblight_segment_t PROGMEM osm_shift_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_YELLOW}); +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(capslock_layer, osm_shift_layer); void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; } bool led_update_user(led_t led_state) { rgblight_set_layer_state(0, led_state.caps_lock); return true; } +void oneshot_mods_changed_user(uint8_t mods) { + if (mods & MOD_MASK_SHIFT) { rgblight_set_layer_state(1, true); } + if (!mods) { rgblight_set_layer_state(1, false); } +} /* default empty layout */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { From d99a3e620ddbd63c1b06f6450e1eb52b9bcca068 Mon Sep 17 00:00:00 2001 From: Matthieu Petiteau Date: Sun, 3 Nov 2024 01:01:09 +0000 Subject: [PATCH 05/10] A bit of clean up --- keyboards/smallcat/keymaps/vial/config.h | 3 ++- keyboards/smallcat/keymaps/vial/keymap.c | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/keyboards/smallcat/keymaps/vial/config.h b/keyboards/smallcat/keymaps/vial/config.h index b7d4e46d310..e7eb0a55192 100644 --- a/keyboards/smallcat/keymaps/vial/config.h +++ b/keyboards/smallcat/keymaps/vial/config.h @@ -5,13 +5,14 @@ #define DYNAMIC_KEYMAP_LAYER_COUNT 8 #define VIAL_TAP_DANCE_ENTRIES 20 #define VIAL_COMBO_ENTRIES 40 -#define VIAL_KEYBOARD_UID {0xDA, 0x2A, 0xFA, 0x9D, 0x66, 0xE4, 0x31, 0x52} +#define VIAL_KEYBOARD_UID {0xDA, 0x2A, 0xFA, 0x9D, 0x66, 0xE4, 0x31, 0x52} #define VIAL_UNLOCK_COMBO_ROWS { 0, 1 } #define VIAL_UNLOCK_COMBO_COLS { 1, 4 } #define NO_ALT_REPEAT_KEY +/* make use of the mounted WS2812 led from the Waveshare RP2040-zero */ #define RGBLIGHT_LED_COUNT 1 #define RGBLIGHT_SPLIT #define RGBLIGHT_DEFAULT_HUE 110 diff --git a/keyboards/smallcat/keymaps/vial/keymap.c b/keyboards/smallcat/keymaps/vial/keymap.c index 93e1773e93a..202c0ddef21 100644 --- a/keyboards/smallcat/keymaps/vial/keymap.c +++ b/keyboards/smallcat/keymaps/vial/keymap.c @@ -1,14 +1,18 @@ #include QMK_KEYBOARD_H -/* light up led in red when caps lock in on */ const rgblight_segment_t PROGMEM capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_RED}); const rgblight_segment_t PROGMEM osm_shift_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_YELLOW}); + const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(capslock_layer, osm_shift_layer); void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; } + +/* light up led in red when caps lock in on */ bool led_update_user(led_t led_state) { rgblight_set_layer_state(0, led_state.caps_lock); return true; } + +/* light up led in yellow when sticky shift is activated */ void oneshot_mods_changed_user(uint8_t mods) { if (mods & MOD_MASK_SHIFT) { rgblight_set_layer_state(1, true); } if (!mods) { rgblight_set_layer_state(1, false); } From 2898df3fbcc22959e3b0bf47afe7e3cb55bf26eb Mon Sep 17 00:00:00 2001 From: Matthieu Petiteau Date: Sun, 3 Nov 2024 11:12:54 +0000 Subject: [PATCH 06/10] Update keyboard.json --- keyboards/smallcat/keyboard.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/keyboards/smallcat/keyboard.json b/keyboards/smallcat/keyboard.json index 77e184031da..5e15350e078 100644 --- a/keyboards/smallcat/keyboard.json +++ b/keyboards/smallcat/keyboard.json @@ -1,7 +1,8 @@ { - "keyboard_name": "Smallcat", + "manufacturer": "Matt Petiteau", + "keyboard_name": "smallcat", "manufacturer": "smallwat3r", - "url": "", + "url": "https://github.com/smallwat3r/smallcat", "maintainer": "smallwat3r", "usb": { "vid": "0xFEED", From a5207b4b47844cb787fc3ef1c73c5071fcd1bd70 Mon Sep 17 00:00:00 2001 From: Matthieu Petiteau Date: Sun, 3 Nov 2024 11:31:09 +0000 Subject: [PATCH 07/10] Update keymap by making rgb non mandatory --- keyboards/smallcat/keymaps/vial/config.h | 18 +++++++------- keyboards/smallcat/keymaps/vial/keymap.c | 30 +++++++++++++----------- keyboards/smallcat/keymaps/vial/rules.mk | 6 +++-- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/keyboards/smallcat/keymaps/vial/config.h b/keyboards/smallcat/keymaps/vial/config.h index e7eb0a55192..3df605a1829 100644 --- a/keyboards/smallcat/keymaps/vial/config.h +++ b/keyboards/smallcat/keymaps/vial/config.h @@ -13,11 +13,13 @@ #define NO_ALT_REPEAT_KEY /* make use of the mounted WS2812 led from the Waveshare RP2040-zero */ -#define RGBLIGHT_LED_COUNT 1 -#define RGBLIGHT_SPLIT -#define RGBLIGHT_DEFAULT_HUE 110 -#define RGBLIGHT_LIMIT_VAL 10 -#define RGBLIGHT_SLEEP -#define RGBLIGHT_LAYERS -#define RGBLIGHT_HUE_STEP 20 -#define WS2812_DI_PIN GP16 +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_LED_COUNT 1 +# define RGBLIGHT_SPLIT +# define RGBLIGHT_DEFAULT_HUE 110 +# define RGBLIGHT_LIMIT_VAL 10 +# define RGBLIGHT_SLEEP +# define RGBLIGHT_LAYERS +# define RGBLIGHT_HUE_STEP 20 +# define WS2812_DI_PIN GP16 +#endif diff --git a/keyboards/smallcat/keymaps/vial/keymap.c b/keyboards/smallcat/keymaps/vial/keymap.c index 202c0ddef21..87d2fba2547 100644 --- a/keyboards/smallcat/keymaps/vial/keymap.c +++ b/keyboards/smallcat/keymaps/vial/keymap.c @@ -1,22 +1,24 @@ #include QMK_KEYBOARD_H -const rgblight_segment_t PROGMEM capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_RED}); -const rgblight_segment_t PROGMEM osm_shift_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_YELLOW}); +#ifdef RGBLIGHT_ENABLE + const rgblight_segment_t PROGMEM capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_RED}); + const rgblight_segment_t PROGMEM osm_shift_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_YELLOW}); -const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(capslock_layer, osm_shift_layer); -void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; } + const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(capslock_layer, osm_shift_layer); + void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; } -/* light up led in red when caps lock in on */ -bool led_update_user(led_t led_state) { - rgblight_set_layer_state(0, led_state.caps_lock); - return true; -} + /* light up led in red when caps lock in on */ + bool led_update_user(led_t led_state) { + rgblight_set_layer_state(0, led_state.caps_lock); + return true; + } -/* light up led in yellow when sticky shift is activated */ -void oneshot_mods_changed_user(uint8_t mods) { - if (mods & MOD_MASK_SHIFT) { rgblight_set_layer_state(1, true); } - if (!mods) { rgblight_set_layer_state(1, false); } -} + /* light up led in yellow when sticky shift is activated */ + void oneshot_mods_changed_user(uint8_t mods) { + if (mods & MOD_MASK_SHIFT) { rgblight_set_layer_state(1, true); } + if (!mods) { rgblight_set_layer_state(1, false); } + } +#endif /* default empty layout */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/smallcat/keymaps/vial/rules.mk b/keyboards/smallcat/keymaps/vial/rules.mk index 25a4b086fc2..b32a55da7a8 100644 --- a/keyboards/smallcat/keymaps/vial/rules.mk +++ b/keyboards/smallcat/keymaps/vial/rules.mk @@ -5,9 +5,11 @@ TAP_DANCE_ENABLE = yes MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes REPEAT_KEY_ENABLE = yes -RGBLIGHT_ENABLE = yes -WS2812_DRIVER = vendor COMBO_ENABLE = yes QMK_SETTINGS = yes + +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = vendor + KEY_OVERRIDE_ENABLE = no VIAL_INSECURE = no From 4af4971a493ee7d4f4de7764a54e212d54e75582 Mon Sep 17 00:00:00 2001 From: Matthieu Petiteau Date: Sun, 3 Nov 2024 11:36:43 +0000 Subject: [PATCH 08/10] Clean up --- keyboards/smallcat/keyboard.json | 1 - keyboards/smallcat/keymaps/vial/keymap.c | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/keyboards/smallcat/keyboard.json b/keyboards/smallcat/keyboard.json index 5e15350e078..8fc77719e7e 100644 --- a/keyboards/smallcat/keyboard.json +++ b/keyboards/smallcat/keyboard.json @@ -1,7 +1,6 @@ { "manufacturer": "Matt Petiteau", "keyboard_name": "smallcat", - "manufacturer": "smallwat3r", "url": "https://github.com/smallwat3r/smallcat", "maintainer": "smallwat3r", "usb": { diff --git a/keyboards/smallcat/keymaps/vial/keymap.c b/keyboards/smallcat/keymaps/vial/keymap.c index 87d2fba2547..bd3b721899e 100644 --- a/keyboards/smallcat/keymaps/vial/keymap.c +++ b/keyboards/smallcat/keymaps/vial/keymap.c @@ -22,10 +22,10 @@ /* default empty layout */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), + [0] = LAYOUT_split_3x5_2( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) }; From 5a8ea79f4fa3f788053f1c7535f2a9a3c0c5906c Mon Sep 17 00:00:00 2001 From: Matthieu Petiteau Date: Sun, 3 Nov 2024 11:52:37 +0000 Subject: [PATCH 09/10] Fix inconsistencies --- keyboards/smallcat/keymaps/vial/vial.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/smallcat/keymaps/vial/vial.json b/keyboards/smallcat/keymaps/vial/vial.json index 95e2ca899cb..d75a3c02613 100644 --- a/keyboards/smallcat/keymaps/vial/vial.json +++ b/keyboards/smallcat/keymaps/vial/vial.json @@ -1,7 +1,6 @@ { - "name": "Small Cat", + "name": "smallcat", "firmwareVersion": 0, - "lighting": "none", "keycodes": [ "via/keycodes" ], From db2d9ea4573a0b1dfd3c3f544280acf231d08c4f Mon Sep 17 00:00:00 2001 From: Matthieu Petiteau Date: Mon, 18 Nov 2024 21:06:44 +0000 Subject: [PATCH 10/10] Add default keymap --- keyboards/smallcat/keymaps/default/keymap.c | 27 +++++++++++++++++++++ keyboards/smallcat/keymaps/default/rules.mk | 1 + 2 files changed, 28 insertions(+) create mode 100644 keyboards/smallcat/keymaps/default/keymap.c create mode 100644 keyboards/smallcat/keymaps/default/rules.mk diff --git a/keyboards/smallcat/keymaps/default/keymap.c b/keyboards/smallcat/keymaps/default/keymap.c new file mode 100644 index 00000000000..2f99c07e2fc --- /dev/null +++ b/keyboards/smallcat/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +#include QMK_KEYBOARD_H + +/* default generic keymap */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_3x5_2( + KC_W, KC_F, KC_P, KC_L, KC_U, KC_Y, + KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, + KC_Q, KC_C, KC_D, KC_H, KC_COMM, KC_DOT, + KC_TRNS, KC_SPC, KC_BSPC, KC_ENT + ) +}; + +/* combo definitions */ +const uint16_t PROGMEM combo_x[] = {KC_W, KC_F, COMBO_END}; +const uint16_t PROGMEM combo_b[] = {KC_F, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_z[] = {KC_Q, KC_C, COMBO_END}; +const uint16_t PROGMEM combo_v[] = {KC_C, KC_D, COMBO_END}; +const uint16_t PROGMEM combo_j[] = {KC_L, KC_U, COMBO_END}; +const uint16_t PROGMEM combo_k[] = {KC_H, KC_COMM, COMBO_END}; +combo_t key_combos[] = { + COMBO(combo_x, KC_X), + COMBO(combo_b, KC_B), + COMBO(combo_z, KC_Z), + COMBO(combo_v, KC_V), + COMBO(combo_j, KC_J), + COMBO(combo_k, KC_K), +}; diff --git a/keyboards/smallcat/keymaps/default/rules.mk b/keyboards/smallcat/keymaps/default/rules.mk new file mode 100644 index 00000000000..ab1e438182a --- /dev/null +++ b/keyboards/smallcat/keymaps/default/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes