Skip to content

Commit d2e952e

Browse files
authored
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
1 parent 20d61fc commit d2e952e

File tree

8 files changed

+344
-0
lines changed

8 files changed

+344
-0
lines changed

keyboards/smallcat/keyboard.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"manufacturer": "Matt Petiteau",
3+
"keyboard_name": "smallcat",
4+
"url": "https://github.com/smallwat3r/smallcat",
5+
"maintainer": "smallwat3r",
6+
"usb": {
7+
"vid": "0xFEED",
8+
"pid": "0x0000",
9+
"device_version": "1.0.0"
10+
},
11+
"board": "GENERIC_RP_RP2040",
12+
"bootloader": "rp2040",
13+
"processor": "RP2040",
14+
"features": {
15+
"extrakey": true,
16+
"mousekey": true,
17+
"unicode": true
18+
},
19+
"matrix_pins": {
20+
"direct": [
21+
[null, "GP26", "GP27", "GP28", null],
22+
["GP15", "GP14", "GP13", "GP12", "GP0"],
23+
[null, "GP5", "GP6", "GP7", null],
24+
["GP10", "GP11", null, null, null]
25+
]
26+
},
27+
"split": {
28+
"enabled": true,
29+
"matrix_pins": {
30+
"right": {
31+
"direct": [
32+
[null, "GP28", "GP27", "GP26", null],
33+
["GP0", "GP12", "GP13", "GP14", "GP15"],
34+
[null, "GP7", "GP6", "GP5", null],
35+
["GP11", "GP10", null, null, null]
36+
]
37+
}
38+
},
39+
"serial": {
40+
"pin": "GP1",
41+
"driver": "vendor"
42+
}
43+
},
44+
"community_layouts": ["split_3x5_2"],
45+
"layout_aliases": {
46+
"LAYOUT": "LAYOUT_split_3x5_2"
47+
},
48+
"layouts": {
49+
"LAYOUT_split_3x5_2": {
50+
"layout":
51+
[
52+
{"x": 1, "y": 0.31, "matrix": [0, 1]},
53+
{"x": 2, "y": 0, "matrix": [0, 2]},
54+
{"x": 3, "y": 0.28, "matrix": [0, 3]},
55+
56+
{"x": 8, "y": 0.28, "matrix": [4, 1]},
57+
{"x": 9, "y": 0, "matrix": [4, 2]},
58+
{"x": 10, "y": 0.31, "matrix": [4, 3]},
59+
60+
{"x": 0, "y": 1.93, "matrix": [1, 0]},
61+
{"x": 1, "y": 1.31, "matrix": [1, 1]},
62+
{"x": 2, "y": 1, "matrix": [1, 2]},
63+
{"x": 3, "y": 1.28, "matrix": [1, 3]},
64+
{"x": 4, "y": 1.42, "matrix": [1, 4]},
65+
66+
{"x": 7, "y": 1.42, "matrix": [5, 0]},
67+
{"x": 8, "y": 1.28, "matrix": [5, 1]},
68+
{"x": 9, "y": 1, "matrix": [5, 2]},
69+
{"x": 10, "y": 1.31, "matrix": [5, 3]},
70+
{"x": 11, "y": 1.93, "matrix": [5, 4]},
71+
72+
{"x": 1, "y": 2.31, "matrix": [2, 1]},
73+
{"x": 2, "y": 2, "matrix": [2, 2]},
74+
{"x": 3, "y": 2.28, "matrix": [2, 3]},
75+
76+
{"x": 8, "y": 2.28, "matrix": [6, 1]},
77+
{"x": 9, "y": 2, "matrix": [6, 2]},
78+
{"x": 10, "y": 2.31, "matrix": [6, 3]},
79+
80+
{"x": 3.5, "y": 3.75, "matrix": [3, 0]},
81+
{"x": 4.5, "y": 4, "matrix": [3, 1]},
82+
83+
{"x": 6.5, "y": 4, "matrix": [7, 0]},
84+
{"x": 7.5, "y": 3.75, "matrix": [7, 1]}
85+
]
86+
}
87+
}
88+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include QMK_KEYBOARD_H
2+
3+
/* default generic keymap */
4+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
5+
[0] = LAYOUT_split_3x5_2(
6+
KC_W, KC_F, KC_P, KC_L, KC_U, KC_Y,
7+
KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O,
8+
KC_Q, KC_C, KC_D, KC_H, KC_COMM, KC_DOT,
9+
KC_TRNS, KC_SPC, KC_BSPC, KC_ENT
10+
)
11+
};
12+
13+
/* combo definitions */
14+
const uint16_t PROGMEM combo_x[] = {KC_W, KC_F, COMBO_END};
15+
const uint16_t PROGMEM combo_b[] = {KC_F, KC_P, COMBO_END};
16+
const uint16_t PROGMEM combo_z[] = {KC_Q, KC_C, COMBO_END};
17+
const uint16_t PROGMEM combo_v[] = {KC_C, KC_D, COMBO_END};
18+
const uint16_t PROGMEM combo_j[] = {KC_L, KC_U, COMBO_END};
19+
const uint16_t PROGMEM combo_k[] = {KC_H, KC_COMM, COMBO_END};
20+
combo_t key_combos[] = {
21+
COMBO(combo_x, KC_X),
22+
COMBO(combo_b, KC_B),
23+
COMBO(combo_z, KC_Z),
24+
COMBO(combo_v, KC_V),
25+
COMBO(combo_j, KC_J),
26+
COMBO(combo_k, KC_K),
27+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
COMBO_ENABLE = yes
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* SPDX-License-Identifier: GPL-2.0-or-later */
2+
3+
#pragma once
4+
5+
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
6+
#define VIAL_TAP_DANCE_ENTRIES 20
7+
#define VIAL_COMBO_ENTRIES 40
8+
9+
#define VIAL_KEYBOARD_UID {0xDA, 0x2A, 0xFA, 0x9D, 0x66, 0xE4, 0x31, 0x52}
10+
#define VIAL_UNLOCK_COMBO_ROWS { 0, 1 }
11+
#define VIAL_UNLOCK_COMBO_COLS { 1, 4 }
12+
13+
#define NO_ALT_REPEAT_KEY
14+
15+
/* make use of the mounted WS2812 led from the Waveshare RP2040-zero */
16+
#ifdef RGBLIGHT_ENABLE
17+
# define RGBLIGHT_LED_COUNT 1
18+
# define RGBLIGHT_SPLIT
19+
# define RGBLIGHT_DEFAULT_HUE 110
20+
# define RGBLIGHT_LIMIT_VAL 10
21+
# define RGBLIGHT_SLEEP
22+
# define RGBLIGHT_LAYERS
23+
# define RGBLIGHT_HUE_STEP 20
24+
# define WS2812_DI_PIN GP16
25+
#endif
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#include QMK_KEYBOARD_H
2+
3+
#ifdef RGBLIGHT_ENABLE
4+
const rgblight_segment_t PROGMEM capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_RED});
5+
const rgblight_segment_t PROGMEM osm_shift_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_YELLOW});
6+
7+
const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(capslock_layer, osm_shift_layer);
8+
void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; }
9+
10+
/* light up led in red when caps lock in on */
11+
bool led_update_user(led_t led_state) {
12+
rgblight_set_layer_state(0, led_state.caps_lock);
13+
return true;
14+
}
15+
16+
/* light up led in yellow when sticky shift is activated */
17+
void oneshot_mods_changed_user(uint8_t mods) {
18+
if (mods & MOD_MASK_SHIFT) { rgblight_set_layer_state(1, true); }
19+
if (!mods) { rgblight_set_layer_state(1, false); }
20+
}
21+
#endif
22+
23+
/* default empty layout */
24+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25+
[0] = LAYOUT_split_3x5_2(
26+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
27+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
28+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
29+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
30+
)
31+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
VIA_ENABLE = yes
2+
VIAL_ENABLE = yes
3+
LTO_ENABLE = yes
4+
TAP_DANCE_ENABLE = yes
5+
MOUSEKEY_ENABLE = yes
6+
EXTRAKEY_ENABLE = yes
7+
REPEAT_KEY_ENABLE = yes
8+
COMBO_ENABLE = yes
9+
QMK_SETTINGS = yes
10+
11+
RGBLIGHT_ENABLE = yes
12+
WS2812_DRIVER = vendor
13+
14+
KEY_OVERRIDE_ENABLE = no
15+
VIAL_INSECURE = no
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
{
2+
"name": "smallcat",
3+
"firmwareVersion": 0,
4+
"keycodes": [
5+
"via/keycodes"
6+
],
7+
"menus": [
8+
"via/keymap",
9+
"via/layouts",
10+
"via/macros",
11+
"via/save_load"
12+
],
13+
"matrix": {
14+
"rows": 8,
15+
"cols": 5
16+
},
17+
"layouts": {
18+
"keymap": [
19+
[
20+
{
21+
"x": 2
22+
},
23+
"0,2",
24+
{
25+
"x": 5.25
26+
},
27+
"4,2"
28+
],
29+
[
30+
{
31+
"y": -0.75,
32+
"x": 1
33+
},
34+
"0,1",
35+
{
36+
"x": 1
37+
},
38+
"0,3",
39+
{
40+
"x": 3.25
41+
},
42+
"4,1",
43+
{
44+
"x": 1
45+
},
46+
"4,3"
47+
],
48+
[
49+
{
50+
"y": -0.25,
51+
"x": 2
52+
},
53+
"1,2",
54+
{
55+
"x": 5.25
56+
},
57+
"5,2"
58+
],
59+
[
60+
{
61+
"y": -0.75,
62+
"x": 1
63+
},
64+
"1,1",
65+
{
66+
"x": 1
67+
},
68+
"1,3",
69+
"1,4",
70+
{
71+
"x": 1.25
72+
},
73+
"5,0",
74+
"5,1",
75+
{
76+
"x": 1
77+
},
78+
"5,3"
79+
],
80+
[
81+
{
82+
"y": -0.5
83+
},
84+
"1,0",
85+
{
86+
"x": 9.25
87+
},
88+
"5,4"
89+
],
90+
[
91+
{
92+
"y": -0.75,
93+
"x": 2
94+
},
95+
"2,2",
96+
{
97+
"x": 5.25
98+
},
99+
"6,2"
100+
],
101+
[
102+
{
103+
"y": -0.75,
104+
"x": 1
105+
},
106+
"2,1",
107+
{
108+
"x": 1
109+
},
110+
"2,3",
111+
{
112+
"x": 3.25
113+
},
114+
"6,1",
115+
{
116+
"x": 1
117+
},
118+
"6,3"
119+
],
120+
[
121+
{
122+
"y": 0.25,
123+
"x": 3.5
124+
},
125+
"3,0",
126+
{
127+
"x": 2.25
128+
},
129+
"7,1"
130+
],
131+
[
132+
{
133+
"y": -0.75,
134+
"x": 4.5
135+
},
136+
"3,1",
137+
{
138+
"x": 0.25
139+
},
140+
"7,0"
141+
]
142+
]
143+
}
144+
}

keyboards/smallcat/readme.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Smallcat
2+
3+
![smallcat](https://raw.githubusercontent.com/smallwat3r/smallcat/refs/heads/main/images/smallcat.png)
4+
5+
A 26-key split keyboard. [More info](https://github.com/smallwat3r/smallcat).
6+
7+
* Keyboard Maintainer: [Matt Petiteau](https://github.com/smallwat3r/)
8+
9+
Make example for this keyboard (after setting up your build environment):
10+
11+
make smallcat:vial
12+
13+
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).

0 commit comments

Comments
 (0)