summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorMatt Petiteau <mpetiteau.pro@gmail.com>2024-11-25 04:30:43 +0000
committerGitHub <noreply@github.com>2024-11-24 22:30:43 -0600
commitd2e952ee92b58fe6a6ea571e137e6fc33e1fead4 (patch)
tree6a8e737ee4a356f438d8af5da4c42bdc4b440077 /keyboards
parent20d61fcb373354dc17d6ecad8f8176be469743da (diff)
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
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/smallcat/keyboard.json88
-rw-r--r--keyboards/smallcat/keymaps/default/keymap.c27
-rw-r--r--keyboards/smallcat/keymaps/default/rules.mk1
-rw-r--r--keyboards/smallcat/keymaps/vial/config.h25
-rw-r--r--keyboards/smallcat/keymaps/vial/keymap.c31
-rw-r--r--keyboards/smallcat/keymaps/vial/rules.mk15
-rw-r--r--keyboards/smallcat/keymaps/vial/vial.json144
-rw-r--r--keyboards/smallcat/readme.md13
8 files changed, 344 insertions, 0 deletions
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).