From 20d61fcb373354dc17d6ecad8f8176be469743da Mon Sep 17 00:00:00 2001 From: Takuya Urakawa Date: Thu, 21 Nov 2024 00:42:50 +0900 Subject: [PATCH 1/2] fix line ending to LF in rorian04_kbd (#818) --- keyboards/rorian04_kbd/keyboard.json | 110 ++++---- .../rorian04_kbd/keymaps/default/keymap.c | 24 +- keyboards/rorian04_kbd/keymaps/vial/keymap.c | 250 +++++++++--------- keyboards/rorian04_kbd/keymaps/vial/rules.mk | 8 +- keyboards/rorian04_kbd/keymaps/vial/vial.json | 44 +-- 5 files changed, 218 insertions(+), 218 deletions(-) diff --git a/keyboards/rorian04_kbd/keyboard.json b/keyboards/rorian04_kbd/keyboard.json index 2a12f77d33..3798a943b8 100644 --- a/keyboards/rorian04_kbd/keyboard.json +++ b/keyboards/rorian04_kbd/keyboard.json @@ -1,56 +1,56 @@ -{ - "manufacturer": "Rorian04", - "keyboard_name": "R4_onehand", - "maintainer": "Rorian04", - "bootloader": "rp2040", - "diode_direction": "COL2ROW", - "features": { - "bootmagic": true, - "command": false, - "console": false, - "extrakey": true, - "mousekey": true, - "nkro": true - }, - "matrix_pins": { - "cols": ["GP8", "GP9", "GP12", "GP27", "GP26", "GP29"], - "rows": ["GP28", "GP15", "GP14", "GP11"] - }, - "processor": "RP2040", - "url": "", - "usb": { - "device_version": "1.0.0", - "pid": "0x0000", - "vid": "0xFEED" - }, - "layouts": { - "LAYOUT_split_3x6_3": { - "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0.3}, - {"matrix": [0, 1], "x": 1, "y": 0.3}, - {"matrix": [0, 2], "x": 2, "y": 0.1}, - {"matrix": [0, 3], "x": 3, "y": 0}, - {"matrix": [0, 4], "x": 4, "y": 0.1}, - {"matrix": [0, 5], "x": 5, "y": 0.2}, - - {"matrix": [1, 0], "x": 0, "y": 1.3}, - {"matrix": [1, 1], "x": 1, "y": 1.3}, - {"matrix": [1, 2], "x": 2, "y": 1.1}, - {"matrix": [1, 3], "x": 3, "y": 1}, - {"matrix": [1, 4], "x": 4, "y": 1.1}, - {"matrix": [1, 5], "x": 5, "y": 1.2}, - - {"matrix": [2, 0], "x": 0, "y": 2.3}, - {"matrix": [2, 1], "x": 1, "y": 2.3}, - {"matrix": [2, 2], "x": 2, "y": 2.1}, - {"matrix": [2, 3], "x": 3, "y": 2}, - {"matrix": [2, 4], "x": 4, "y": 2.1}, - {"matrix": [2, 5], "x": 5, "y": 2.2}, - - {"matrix": [3, 3], "x": 4, "y": 3.7}, - {"matrix": [3, 4], "x": 5, "y": 3.7}, - {"matrix": [3, 5], "x": 6, "y": 3.2, "h": 1.5} - ] - } - } +{ + "manufacturer": "Rorian04", + "keyboard_name": "R4_onehand", + "maintainer": "Rorian04", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["GP8", "GP9", "GP12", "GP27", "GP26", "GP29"], + "rows": ["GP28", "GP15", "GP14", "GP11"] + }, + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_split_3x6_3": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0.3}, + {"matrix": [0, 1], "x": 1, "y": 0.3}, + {"matrix": [0, 2], "x": 2, "y": 0.1}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0.1}, + {"matrix": [0, 5], "x": 5, "y": 0.2}, + + {"matrix": [1, 0], "x": 0, "y": 1.3}, + {"matrix": [1, 1], "x": 1, "y": 1.3}, + {"matrix": [1, 2], "x": 2, "y": 1.1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1.1}, + {"matrix": [1, 5], "x": 5, "y": 1.2}, + + {"matrix": [2, 0], "x": 0, "y": 2.3}, + {"matrix": [2, 1], "x": 1, "y": 2.3}, + {"matrix": [2, 2], "x": 2, "y": 2.1}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.1}, + {"matrix": [2, 5], "x": 5, "y": 2.2}, + + {"matrix": [3, 3], "x": 4, "y": 3.7}, + {"matrix": [3, 4], "x": 5, "y": 3.7}, + {"matrix": [3, 5], "x": 6, "y": 3.2, "h": 1.5} + ] + } + } } \ No newline at end of file diff --git a/keyboards/rorian04_kbd/keymaps/default/keymap.c b/keyboards/rorian04_kbd/keymaps/default/keymap.c index b6001752a9..7343457069 100644 --- a/keyboards/rorian04_kbd/keymaps/default/keymap.c +++ b/keyboards/rorian04_kbd/keymaps/default/keymap.c @@ -1,13 +1,13 @@ -// Copyright 2023 QMK -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split_3x6_3( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, - KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, - KC_LALT, KC_SPC, KC_TAB - ) +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_3x6_3( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, + KC_LALT, KC_SPC, KC_TAB + ) }; \ No newline at end of file diff --git a/keyboards/rorian04_kbd/keymaps/vial/keymap.c b/keyboards/rorian04_kbd/keymaps/vial/keymap.c index 52ed949e73..75912194df 100644 --- a/keyboards/rorian04_kbd/keymaps/vial/keymap.c +++ b/keyboards/rorian04_kbd/keymaps/vial/keymap.c @@ -1,126 +1,126 @@ -// Copyright 2023 QMK -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split_3x6_3( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, QK_BOOT, - KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_LALT, KC_SPC, KC_TAB - ), - [1] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [2] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [3] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [4] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [5] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [6] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ), - [7] = LAYOUT_split_3x6_3( - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______ - ) -}; - -#define value 40 -// Change LED color based on layer -const rgblight_segment_t PROGMEM layer0_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 85, 255, value} // color if layer 0 -); - -const rgblight_segment_t PROGMEM layer1_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 125, 255, value} // color if layer 1 -); - -const rgblight_segment_t PROGMEM layer2_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 170, 255, value} // color if layer 2 -); - -const rgblight_segment_t PROGMEM layer3_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 200, 255, value} // color if layer 3 -); - -const rgblight_segment_t PROGMEM layer4_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 45, 255, value} // color if layer 4 -); - -const rgblight_segment_t PROGMEM layer5_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 85, 0, value} // color if layer 5 -); - -const rgblight_segment_t PROGMEM layer6_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, 0, 255, value} // color if layer 6 -); - -const rgblight_segment_t PROGMEM layer7_rgb[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_OFF} // color if layer 6 -); - - -// Now define the array of layers. Later layers take precedence -const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( - layer0_rgb, // Bottom layer - layer1_rgb, // Overrides above layers - layer2_rgb, // Overrides above layers - layer3_rgb, // Overrides above layers - layer4_rgb, // Overrides above layers - layer5_rgb, // Overrides above layers - layer6_rgb, // Overrides above layers - layer7_rgb // Overrides above layers -); - -void keyboard_post_init_user(void) { - // Enable the LED layers - rgblight_layers = rgb_layers; -} - - -//bellow code block checks and changes state of LED -layer_state_t default_layer_state_set_user(layer_state_t state) { - rgblight_set_layer_state(0, layer_state_cmp(state, 0)); - return state; -} - -layer_state_t layer_state_set_user(layer_state_t state) { - rgblight_set_layer_state(1, layer_state_cmp(state, 1)); - rgblight_set_layer_state(2, layer_state_cmp(state, 2)); - rgblight_set_layer_state(3, layer_state_cmp(state, 3)); - rgblight_set_layer_state(4, layer_state_cmp(state, 4)); - rgblight_set_layer_state(5, layer_state_cmp(state, 5)); - rgblight_set_layer_state(6, layer_state_cmp(state, 6)); - rgblight_set_layer_state(7, layer_state_cmp(state, 7)); - return state; +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_3x6_3( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, QK_BOOT, + KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_LALT, KC_SPC, KC_TAB + ), + [1] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [2] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [3] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [4] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [5] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [6] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ), + [7] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ) +}; + +#define value 40 +// Change LED color based on layer +const rgblight_segment_t PROGMEM layer0_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 85, 255, value} // color if layer 0 +); + +const rgblight_segment_t PROGMEM layer1_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 125, 255, value} // color if layer 1 +); + +const rgblight_segment_t PROGMEM layer2_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 170, 255, value} // color if layer 2 +); + +const rgblight_segment_t PROGMEM layer3_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 200, 255, value} // color if layer 3 +); + +const rgblight_segment_t PROGMEM layer4_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 45, 255, value} // color if layer 4 +); + +const rgblight_segment_t PROGMEM layer5_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 85, 0, value} // color if layer 5 +); + +const rgblight_segment_t PROGMEM layer6_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, 0, 255, value} // color if layer 6 +); + +const rgblight_segment_t PROGMEM layer7_rgb[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF} // color if layer 6 +); + + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( + layer0_rgb, // Bottom layer + layer1_rgb, // Overrides above layers + layer2_rgb, // Overrides above layers + layer3_rgb, // Overrides above layers + layer4_rgb, // Overrides above layers + layer5_rgb, // Overrides above layers + layer6_rgb, // Overrides above layers + layer7_rgb // Overrides above layers +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = rgb_layers; +} + + +//bellow code block checks and changes state of LED +layer_state_t default_layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(0, layer_state_cmp(state, 0)); + return state; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(1, layer_state_cmp(state, 1)); + rgblight_set_layer_state(2, layer_state_cmp(state, 2)); + rgblight_set_layer_state(3, layer_state_cmp(state, 3)); + rgblight_set_layer_state(4, layer_state_cmp(state, 4)); + rgblight_set_layer_state(5, layer_state_cmp(state, 5)); + rgblight_set_layer_state(6, layer_state_cmp(state, 6)); + rgblight_set_layer_state(7, layer_state_cmp(state, 7)); + return state; } \ No newline at end of file diff --git a/keyboards/rorian04_kbd/keymaps/vial/rules.mk b/keyboards/rorian04_kbd/keymaps/vial/rules.mk index 565e3da69c..3f106562fc 100644 --- a/keyboards/rorian04_kbd/keymaps/vial/rules.mk +++ b/keyboards/rorian04_kbd/keymaps/vial/rules.mk @@ -1,5 +1,5 @@ -VIA_ENABLE = yes -VIAL_ENABLE = yes -KEY_LOCK_ENABLE = yes -RGBLIGHT_ENABLE = yes +VIA_ENABLE = yes +VIAL_ENABLE = yes +KEY_LOCK_ENABLE = yes +RGBLIGHT_ENABLE = yes WS2812_DRIVER = vendor \ No newline at end of file diff --git a/keyboards/rorian04_kbd/keymaps/vial/vial.json b/keyboards/rorian04_kbd/keymaps/vial/vial.json index 19258310fe..f7c065b00e 100644 --- a/keyboards/rorian04_kbd/keymaps/vial/vial.json +++ b/keyboards/rorian04_kbd/keymaps/vial/vial.json @@ -1,23 +1,23 @@ -{ - "name": "rorian04_kbd", - "matrix": { - "rows": 4, - "cols": 6 - }, - "layouts": { - "keymap": [ - [{"x":3},"0,3"], - [{"y":-0.75,"x":2},"0,2",{"x":1},"0,4"], - [{"y":-0.75},"0,0","0,1",{"x":3},"0,5"], - [{"y":-0.5,"x":3},"1,3"], - [{"y":-0.75,"x":2},"1,2",{"x":1},"1,4"], - [{"y":-0.75},"1,0","1,1",{"x":3},"1,5"], - [{"y":-0.5,"x":3},"2,3"], - [{"y":-0.75,"x":2},"2,2",{"x":1},"2,4"], - [{"y":-0.75},"2,0","2,1",{"x":3},"2,5"], - [{"x":4},"3,3"], - [{"y":-0.75,"x":5},"3,4"], - [{"y":-0.75,"x":6},"3,5"] - ] - } +{ + "name": "rorian04_kbd", + "matrix": { + "rows": 4, + "cols": 6 + }, + "layouts": { + "keymap": [ + [{"x":3},"0,3"], + [{"y":-0.75,"x":2},"0,2",{"x":1},"0,4"], + [{"y":-0.75},"0,0","0,1",{"x":3},"0,5"], + [{"y":-0.5,"x":3},"1,3"], + [{"y":-0.75,"x":2},"1,2",{"x":1},"1,4"], + [{"y":-0.75},"1,0","1,1",{"x":3},"1,5"], + [{"y":-0.5,"x":3},"2,3"], + [{"y":-0.75,"x":2},"2,2",{"x":1},"2,4"], + [{"y":-0.75},"2,0","2,1",{"x":3},"2,5"], + [{"x":4},"3,3"], + [{"y":-0.75,"x":5},"3,4"], + [{"y":-0.75,"x":6},"3,5"] + ] + } } \ No newline at end of file From d2e952ee92b58fe6a6ea571e137e6fc33e1fead4 Mon Sep 17 00:00:00 2001 From: Matt Petiteau Date: Mon, 25 Nov 2024 04:30:43 +0000 Subject: [PATCH 2/2] Add support for the Smallcat (#810) * Add Smallcat * Add support for led * Do not use alt repeat * Add another layer for led * A bit of clean up * Update keyboard.json * Update keymap by making rgb non mandatory * Clean up * Fix inconsistencies * Add default keymap --- keyboards/smallcat/keyboard.json | 88 ++++++++++++ keyboards/smallcat/keymaps/default/keymap.c | 27 ++++ keyboards/smallcat/keymaps/default/rules.mk | 1 + keyboards/smallcat/keymaps/vial/config.h | 25 ++++ keyboards/smallcat/keymaps/vial/keymap.c | 31 +++++ keyboards/smallcat/keymaps/vial/rules.mk | 15 ++ keyboards/smallcat/keymaps/vial/vial.json | 144 ++++++++++++++++++++ keyboards/smallcat/readme.md | 13 ++ 8 files changed, 344 insertions(+) create mode 100644 keyboards/smallcat/keyboard.json create mode 100644 keyboards/smallcat/keymaps/default/keymap.c create mode 100644 keyboards/smallcat/keymaps/default/rules.mk 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 0000000000..8fc77719e7 --- /dev/null +++ b/keyboards/smallcat/keyboard.json @@ -0,0 +1,88 @@ +{ + "manufacturer": "Matt Petiteau", + "keyboard_name": "smallcat", + "url": "https://github.com/smallwat3r/smallcat", + "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/default/keymap.c b/keyboards/smallcat/keymaps/default/keymap.c new file mode 100644 index 0000000000..2f99c07e2f --- /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 0000000000..ab1e438182 --- /dev/null +++ b/keyboards/smallcat/keymaps/default/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/smallcat/keymaps/vial/config.h b/keyboards/smallcat/keymaps/vial/config.h new file mode 100644 index 0000000000..3df605a182 --- /dev/null +++ b/keyboards/smallcat/keymaps/vial/config.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#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_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 */ +#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 new file mode 100644 index 0000000000..bd3b721899 --- /dev/null +++ b/keyboards/smallcat/keymaps/vial/keymap.c @@ -0,0 +1,31 @@ +#include QMK_KEYBOARD_H + +#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; } + + /* 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); } + } +#endif + +/* default empty layout */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [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 + ) +}; diff --git a/keyboards/smallcat/keymaps/vial/rules.mk b/keyboards/smallcat/keymaps/vial/rules.mk new file mode 100644 index 0000000000..b32a55da7a --- /dev/null +++ b/keyboards/smallcat/keymaps/vial/rules.mk @@ -0,0 +1,15 @@ +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 + +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = vendor + +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 0000000000..d75a3c0261 --- /dev/null +++ b/keyboards/smallcat/keymaps/vial/vial.json @@ -0,0 +1,144 @@ +{ + "name": "smallcat", + "firmwareVersion": 0, + "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 0000000000..98535edaec --- /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).