summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSneakboxKB <67670271+SneakboxKB@users.noreply.github.com>2025-10-30 15:05:52 -0500
committerGitHub <noreply@github.com>2025-10-30 20:05:52 +0000
commit8e5550dbb219591eee97f533568ba9a6271f5d84 (patch)
tree4b5be261b33a8b93e1570a9eeab3e6f501ff330b
parentf4123acc725346caadeb49eb873a3ca93c263a25 (diff)
Add M4m5 support (#25499)
-rw-r--r--keyboards/sneakbox/m4m5/keyboard.json203
-rw-r--r--keyboards/sneakbox/m4m5/keymaps/alice/keymap.c32
-rw-r--r--keyboards/sneakbox/m4m5/keymaps/default/keymap.c32
-rw-r--r--keyboards/sneakbox/m4m5/readme.md27
4 files changed, 294 insertions, 0 deletions
diff --git a/keyboards/sneakbox/m4m5/keyboard.json b/keyboards/sneakbox/m4m5/keyboard.json
new file mode 100644
index 0000000000..ba56a6c85d
--- /dev/null
+++ b/keyboards/sneakbox/m4m5/keyboard.json
@@ -0,0 +1,203 @@
1{
2 "manufacturer": "Sneakbox",
3 "keyboard_name": "M4 & M5",
4 "maintainer": "mujimanic",
5 "bootloader": "atmel-dfu",
6 "bootmagic": {
7 "matrix": [2, 0]
8 },
9 "build": {
10 "lto": true
11 },
12 "diode_direction": "COL2ROW",
13 "encoder": {
14 "rotary": [
15 {"pin_a": "D3", "pin_b": "D2"}
16 ]
17 },
18 "features": {
19 "bootmagic": true,
20 "encoder": true,
21 "extrakey": true,
22 "mousekey": true,
23 "nkro": true,
24 "rgblight": true
25 },
26 "indicators": {
27 "caps_lock": "D6",
28 "num_lock": "D4",
29 "scroll_lock": "D7"
30 },
31 "matrix_pins": {
32 "cols": ["F0", "D0", "C7", "C6", "B6", "B5", "B4", "D1"],
33 "rows": ["F1", "E6", "F4", "B1", "F5", "B2", "F6", "B3", "F7", "B7"]
34 },
35 "processor": "atmega32u4",
36 "rgblight": {
37 "animations": {
38 "alternating": true,
39 "breathing": true,
40 "christmas": true,
41 "knight": true,
42 "rainbow_mood": true,
43 "rainbow_swirl": true,
44 "rgb_test": true,
45 "snake": true,
46 "static_gradient": true,
47 "twinkle": true
48 },
49 "led_count": 16
50 },
51 "url": "https://sneakbox.design",
52 "usb": {
53 "device_version": "0.0.1",
54 "pid": "0x0005",
55 "vid": "0x5342"
56 },
57 "ws2812": {
58 "pin": "D5"
59 },
60 "layouts": {
61 "LAYOUT_alice": {
62 "layout": [
63 {"matrix": [2, 0], "x": 0, "y": 0},
64 {"matrix": [0, 0], "x": 1.25, "y": 0},
65 {"matrix": [0, 1], "x": 2.25, "y": 0},
66 {"matrix": [0, 2], "x": 3.25, "y": 0},
67 {"matrix": [0, 3], "x": 4.25, "y": 0},
68 {"matrix": [0, 4], "x": 5.25, "y": 0},
69 {"matrix": [0, 5], "x": 6.25, "y": 0},
70 {"matrix": [0, 6], "x": 7.25, "y": 0},
71 {"matrix": [1, 0], "x": 10.25, "y": 0},
72 {"matrix": [1, 1], "x": 11.25, "y": 0},
73 {"matrix": [1, 2], "x": 12.25, "y": 0},
74 {"matrix": [1, 3], "x": 13.25, "y": 0},
75 {"matrix": [1, 4], "x": 14.25, "y": 0},
76 {"matrix": [1, 5], "x": 15.25, "y": 0},
77 {"matrix": [1, 6], "x": 16.25, "y": 0, "w": 2},
78 {"matrix": [4, 0], "x": 0, "y": 1},
79 {"matrix": [2, 1], "x": 1.25, "y": 1, "w": 1.5},
80 {"matrix": [2, 2], "x": 2.75, "y": 1},
81 {"matrix": [2, 3], "x": 3.75, "y": 1},
82 {"matrix": [2, 4], "x": 4.75, "y": 1},
83 {"matrix": [2, 5], "x": 5.75, "y": 1},
84 {"matrix": [2, 6], "x": 6.75, "y": 1},
85 {"matrix": [3, 0], "x": 9.75, "y": 1},
86 {"matrix": [3, 1], "x": 10.75, "y": 1},
87 {"matrix": [3, 2], "x": 11.75, "y": 1},
88 {"matrix": [3, 3], "x": 12.75, "y": 1},
89 {"matrix": [3, 4], "x": 13.75, "y": 1},
90 {"matrix": [3, 5], "x": 14.75, "y": 1},
91 {"matrix": [3, 6], "x": 15.75, "y": 1},
92 {"matrix": [3, 7], "x": 16.75, "y": 1, "w": 1.5},
93 {"matrix": [6, 0], "x": 0, "y": 2},
94 {"matrix": [4, 1], "x": 1.25, "y": 2, "w": 1.75},
95 {"matrix": [4, 2], "x": 3, "y": 2},
96 {"matrix": [4, 3], "x": 4, "y": 2},
97 {"matrix": [4, 4], "x": 5, "y": 2},
98 {"matrix": [4, 5], "x": 6, "y": 2},
99 {"matrix": [4, 6], "x": 7, "y": 2},
100 {"matrix": [5, 0], "x": 10, "y": 2},
101 {"matrix": [5, 1], "x": 11, "y": 2},
102 {"matrix": [5, 2], "x": 12, "y": 2},
103 {"matrix": [5, 3], "x": 13, "y": 2},
104 {"matrix": [5, 4], "x": 14, "y": 2},
105 {"matrix": [5, 5], "x": 15, "y": 2},
106 {"matrix": [5, 6], "x": 16, "y": 2, "w": 2.25},
107 {"matrix": [6, 1], "x": 1.25, "y": 3, "w": 2.25},
108 {"matrix": [6, 2], "x": 3.5, "y": 3},
109 {"matrix": [6, 3], "x": 4.5, "y": 3},
110 {"matrix": [6, 4], "x": 5.5, "y": 3},
111 {"matrix": [6, 5], "x": 6.5, "y": 3},
112 {"matrix": [6, 6], "x": 7.5, "y": 3},
113 {"matrix": [7, 0], "x": 9.5, "y": 3},
114 {"matrix": [7, 1], "x": 10.5, "y": 3},
115 {"matrix": [7, 2], "x": 11.5, "y": 3},
116 {"matrix": [7, 3], "x": 12.5, "y": 3},
117 {"matrix": [7, 4], "x": 13.5, "y": 3},
118 {"matrix": [7, 5], "x": 14.5, "y": 3},
119 {"matrix": [7, 6], "x": 15.5, "y": 3, "w": 1.75},
120 {"matrix": [7, 7], "x": 17.25, "y": 3},
121 {"matrix": [8, 1], "x": 1.25, "y": 4, "w": 1.5},
122 {"matrix": [8, 3], "x": 4, "y": 4, "w": 1.5},
123 {"matrix": [8, 5], "x": 5.5, "y": 4, "w": 2.25},
124 {"matrix": [8, 6], "x": 7.75, "y": 4},
125 {"matrix": [9, 1], "x": 9.75, "y": 4, "w": 1.25},
126 {"matrix": [9, 2], "x": 11, "y": 4, "w": 1.5},
127 {"matrix": [9, 3], "x": 12.5, "y": 4, "w": 1.5},
128 {"matrix": [9, 7], "x": 16.75, "y": 4, "w": 1.5}
129 ]
130 },
131 "LAYOUT_alice_split_bs": {
132 "layout": [
133 {"matrix": [2, 0], "x": 0, "y": 0},
134 {"matrix": [0, 0], "x": 1.25, "y": 0},
135 {"matrix": [0, 1], "x": 2.25, "y": 0},
136 {"matrix": [0, 2], "x": 3.25, "y": 0},
137 {"matrix": [0, 3], "x": 4.25, "y": 0},
138 {"matrix": [0, 4], "x": 5.25, "y": 0},
139 {"matrix": [0, 5], "x": 6.25, "y": 0},
140 {"matrix": [0, 6], "x": 7.25, "y": 0},
141 {"matrix": [1, 0], "x": 10.25, "y": 0},
142 {"matrix": [1, 1], "x": 11.25, "y": 0},
143 {"matrix": [1, 2], "x": 12.25, "y": 0},
144 {"matrix": [1, 3], "x": 13.25, "y": 0},
145 {"matrix": [1, 4], "x": 14.25, "y": 0},
146 {"matrix": [1, 5], "x": 15.25, "y": 0},
147 {"matrix": [1, 6], "x": 16.25, "y": 0},
148 {"matrix": [1, 7], "x": 17.25, "y": 0},
149 {"matrix": [4, 0], "x": 0, "y": 1},
150 {"matrix": [2, 1], "x": 1.25, "y": 1, "w": 1.5},
151 {"matrix": [2, 2], "x": 2.75, "y": 1},
152 {"matrix": [2, 3], "x": 3.75, "y": 1},
153 {"matrix": [2, 4], "x": 4.75, "y": 1},
154 {"matrix": [2, 5], "x": 5.75, "y": 1},
155 {"matrix": [2, 6], "x": 6.75, "y": 1},
156 {"matrix": [3, 0], "x": 9.75, "y": 1},
157 {"matrix": [3, 1], "x": 10.75, "y": 1},
158 {"matrix": [3, 2], "x": 11.75, "y": 1},
159 {"matrix": [3, 3], "x": 12.75, "y": 1},
160 {"matrix": [3, 4], "x": 13.75, "y": 1},
161 {"matrix": [3, 5], "x": 14.75, "y": 1},
162 {"matrix": [3, 6], "x": 15.75, "y": 1},
163 {"matrix": [3, 7], "x": 16.75, "y": 1, "w": 1.5},
164 {"matrix": [6, 0], "x": 0, "y": 2},
165 {"matrix": [4, 1], "x": 1.25, "y": 2, "w": 1.75},
166 {"matrix": [4, 2], "x": 3, "y": 2},
167 {"matrix": [4, 3], "x": 4, "y": 2},
168 {"matrix": [4, 4], "x": 5, "y": 2},
169 {"matrix": [4, 5], "x": 6, "y": 2},
170 {"matrix": [4, 6], "x": 7, "y": 2},
171 {"matrix": [5, 0], "x": 10, "y": 2},
172 {"matrix": [5, 1], "x": 11, "y": 2},
173 {"matrix": [5, 2], "x": 12, "y": 2},
174 {"matrix": [5, 3], "x": 13, "y": 2},
175 {"matrix": [5, 4], "x": 14, "y": 2},
176 {"matrix": [5, 5], "x": 15, "y": 2},
177 {"matrix": [5, 6], "x": 16, "y": 2, "w": 2.25},
178 {"matrix": [6, 1], "x": 1.25, "y": 3, "w": 2.25},
179 {"matrix": [6, 2], "x": 3.5, "y": 3},
180 {"matrix": [6, 3], "x": 4.5, "y": 3},
181 {"matrix": [6, 4], "x": 5.5, "y": 3},
182 {"matrix": [6, 5], "x": 6.5, "y": 3},
183 {"matrix": [6, 6], "x": 7.5, "y": 3},
184 {"matrix": [7, 0], "x": 9.5, "y": 3},
185 {"matrix": [7, 1], "x": 10.5, "y": 3},
186 {"matrix": [7, 2], "x": 11.5, "y": 3},
187 {"matrix": [7, 3], "x": 12.5, "y": 3},
188 {"matrix": [7, 4], "x": 13.5, "y": 3},
189 {"matrix": [7, 5], "x": 14.5, "y": 3},
190 {"matrix": [7, 6], "x": 15.5, "y": 3, "w": 1.75},
191 {"matrix": [7, 7], "x": 17.25, "y": 3},
192 {"matrix": [8, 1], "x": 1.25, "y": 4, "w": 1.5},
193 {"matrix": [8, 3], "x": 4, "y": 4, "w": 1.5},
194 {"matrix": [8, 5], "x": 5.5, "y": 4, "w": 2.25},
195 {"matrix": [8, 6], "x": 7.75, "y": 4},
196 {"matrix": [9, 1], "x": 9.75, "y": 4, "w": 1.25},
197 {"matrix": [9, 2], "x": 11, "y": 4, "w": 1.5},
198 {"matrix": [9, 3], "x": 12.5, "y": 4, "w": 1.5},
199 {"matrix": [9, 7], "x": 16.75, "y": 4, "w": 1.5}
200 ]
201 }
202 }
203}
diff --git a/keyboards/sneakbox/m4m5/keymaps/alice/keymap.c b/keyboards/sneakbox/m4m5/keymaps/alice/keymap.c
new file mode 100644
index 0000000000..113ebfd8b6
--- /dev/null
+++ b/keyboards/sneakbox/m4m5/keymaps/alice/keymap.c
@@ -0,0 +1,32 @@
1// Copyright 2023 Bryan Ong
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include QMK_KEYBOARD_H
5
6// Defines names for use in layer keycodes and the keymap
7enum layer_names {
8 _BASE,
9 _FN
10};
11
12const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
13 [_BASE] = LAYOUT_alice(
14 KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
15 KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
16 KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
17 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI,
18 KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_SPC, KC_RALT, KC_RCTL),
19 [_FN] = LAYOUT_alice(
20 KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
21 KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UG_PREV, UG_NEXT, UG_TOGG,
22 QK_BOOT, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UG_VALD, UG_VALU, KC_TRNS,
23 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UG_SATD, UG_SATU, KC_TRNS, UG_HUEU,
24 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
25};
26
27#if defined(ENCODER_MAP_ENABLE)
28const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
29 [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
30 [_FN] = { ENCODER_CCW_CW(_______, _______)}
31};
32#endif
diff --git a/keyboards/sneakbox/m4m5/keymaps/default/keymap.c b/keyboards/sneakbox/m4m5/keymaps/default/keymap.c
new file mode 100644
index 0000000000..938f073837
--- /dev/null
+++ b/keyboards/sneakbox/m4m5/keymaps/default/keymap.c
@@ -0,0 +1,32 @@
1// Copyright 2023 Bryan Ong
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include QMK_KEYBOARD_H
5
6// Defines names for use in layer keycodes and the keymap
7enum layer_names {
8 _BASE,
9 _FN
10};
11
12const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
13 [_BASE] = LAYOUT_alice_split_bs(
14 KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
15 KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
16 KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
17 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI,
18 KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_SPC, KC_RALT, KC_RCTL),
19 [_FN] = LAYOUT_alice_split_bs(
20 KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
21 KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UG_PREV, UG_NEXT, UG_TOGG,
22 QK_BOOT, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UG_VALD, UG_VALU, KC_TRNS,
23 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UG_SATD, UG_SATU, KC_TRNS, UG_HUEU,
24 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
25};
26
27#if defined(ENCODER_MAP_ENABLE)
28const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
29 [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
30 [_FN] = { ENCODER_CCW_CW(_______, _______)}
31};
32#endif
diff --git a/keyboards/sneakbox/m4m5/readme.md b/keyboards/sneakbox/m4m5/readme.md
new file mode 100644
index 0000000000..4be06dbf98
--- /dev/null
+++ b/keyboards/sneakbox/m4m5/readme.md
@@ -0,0 +1,27 @@
1# Sneakbox M4 & M5 PCB
2
3![Sneakbox M4 & M5 PCB](https://i.imgur.com/hVLal1m.jpeg)
4
5An Alice-compatible PCB with hotswap with pushbutton rotary encoder socket placed at the top left key position. This PCB is the successor to the AliceCloneRGB PCB and features RGB underglow lighting along with revised hardware components such as an additional spacebar key in the right spacebar cluster. M4M5 firmware covers two physical PCBs for the MGA project (M4 PCB and M5 PCB) namely for the MGA V3 keyboard (which uses either PCB).
6
7* Keyboard Maintainer: [mujimanic](https://github.com/mujimanic)
8* Hardware Supported: Any Alice-layout case.
9* Hardware Availability: [sneakbox.design](https://sneakbox.com/products/m4-alice-pcbs-for-mga-cases)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make sneakbox/m4m5:default
14
15Flashing example for this keyboard:
16
17 make sneakbox/m4m5:default:flash
18
19See 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).
20
21## Bootloader
22
23Enter the bootloader in 3 ways:
24
25* **Bootmagic reset**: Hold down the top left key in the nevigation cluster (Escape key) and plug in the keyboard
26* **Physical reset button**: Briefly press the small metal button on the back of the PCB
27* **Keycode in layout**: Press and hold the key next to the right split spacebar (to the right of the spacebar) and then press the End key (located on the bottom of the three-key navigation cluster)