f4e6af2dbe8c2b0d24dfa14e58d3be02bd6b2b7d
- Author
- Diego Andres Rabaioli <drabaioli@gmail.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/keyboards/sdrakbs/sdrakb00/keyboard.json b/keyboards/sdrakbs/sdrakb00/keyboard.json
2new file mode 100644
3index 0000000000000000000000000000000000000000..f9e24cc63f09be5c97c3abdf8ce606393240be1e
4--- /dev/null
5+++ b/keyboards/sdrakbs/sdrakb00/keyboard.json
6@@ -0,0 +1,71 @@
7+{
8+ "manufacturer": "Diego Andres Rabaioli",
9+ "keyboard_name": "sdrakb00",
10+ "maintainer": "drabaioli",
11+ "bootloader": "atmel-dfu",
12+ "diode_direction": "COL2ROW",
13+ "encoder": {
14+ "rotary": [
15+ {"pin_a": "B5", "pin_b": "B6", "resolution": 2}
16+ ]
17+ },
18+ "features": {
19+ "bootmagic": true,
20+ "encoder": true,
21+ "extrakey": true,
22+ "mousekey": true,
23+ "nkro": true,
24+ "rgb_matrix": true
25+ },
26+ "matrix_pins": {
27+ "cols": ["F0", "F1", "F4", "F5"],
28+ "rows": ["D4", "D6", "D7"]
29+ },
30+ "processor": "atmega32u4",
31+ "rgb_matrix": {
32+ "driver": "ws2812",
33+ "layout": [
34+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
35+ {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4},
36+ {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4},
37+ {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4},
38+ {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4},
39+ {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4},
40+ {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4},
41+ {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4},
42+ {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4},
43+ {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4},
44+ {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}
45+ ],
46+ "max_brightness": 100,
47+ "sleep": true,
48+ "timeout": 300000
49+ },
50+ "url": "https://github.com/drabaioli/SdraKb00",
51+ "usb": {
52+ "device_version": "1.0.0",
53+ "pid": "0x4200",
54+ "vid": "0x7331"
55+ },
56+ "ws2812": {
57+ "pin": "B0"
58+ },
59+ "layouts": {
60+ "LAYOUT_ortho_3x4": {
61+ "layout": [
62+ {"matrix": [0, 0], "x": 0, "y": 0},
63+ {"matrix": [0, 1], "x": 1, "y": 0},
64+ {"matrix": [0, 2], "x": 2, "y": 0},
65+ {"matrix": [0, 3], "x": 3, "y": 0, "encoder": 0},
66+ {"matrix": [1, 0], "x": 0, "y": 1},
67+ {"matrix": [1, 1], "x": 1, "y": 1},
68+ {"matrix": [1, 2], "x": 2, "y": 1},
69+ {"matrix": [1, 3], "x": 3, "y": 1},
70+ {"matrix": [2, 0], "x": 0, "y": 2},
71+ {"matrix": [2, 1], "x": 1, "y": 2},
72+ {"matrix": [2, 2], "x": 2, "y": 2},
73+ {"matrix": [2, 3], "x": 3, "y": 2}
74+ ]
75+ }
76+ }
77+}
78diff --git a/keyboards/sdrakbs/sdrakb00/keymaps/default/keymap.c b/keyboards/sdrakbs/sdrakb00/keymaps/default/keymap.c
79new file mode 100644
80index 0000000000000000000000000000000000000000..c5481b1076e5e113cf87f4e14b9772e8d8242eca
81--- /dev/null
82+++ b/keyboards/sdrakbs/sdrakb00/keymaps/default/keymap.c
83@@ -0,0 +1,74 @@
84+// Copyright 2023 QMK
85+// SPDX-License-Identifier: GPL-2.0-or-later
86+
87+#include QMK_KEYBOARD_H
88+
89+/* Keymap for 3x4 Macropad
90+ *
91+ * Layer 0 (Base Layer) - Numpad layout with mute button and layer toggle:
92+ * ,----------------------,
93+ * | 7 | 8 | 9 | MUTE |
94+ * |-------+-------+-------+--------|
95+ * | 4 | 5 | 6 | Layer1 |
96+ * |-------+-------+-------+--------|
97+ * | 1 | 2 | 3 | 0 |
98+ * `-----------------------^--------'
99+ *
100+ * Layer 1 (Function Layer) - Accessed by holding MO(1):
101+ * ,----------------------,
102+ * | BKSP | / | - | ---- |
103+ * |-------+-------+-------+--------|
104+ * | = | * | + | ---- |
105+ * |-------+-------+-------+--------|
106+ * | ENTER | ---- | ---- | . |
107+ * `-----------------------^--------'
108+ *
109+ * The base layer (0) provides standard numpad functionality with:
110+ * - Numbers 0-9 in traditional numpad layout
111+ * - Mute button in top right
112+ * - Layer 1 momentary toggle (MO1) in middle right
113+ *
114+ * The function layer (1) adds:
115+ * - Basic mathematical operators (+, -, *, /)
116+ * - Backspace, Enter, and decimal point
117+ * - Equal sign for calculations
118+ * - Empty slots marked as ---- (KC_NO)
119+ */
120+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
121+
122+ [0] = LAYOUT_ortho_3x4(
123+ KC_KP_7, KC_KP_8, KC_KP_9, KC_MUTE,
124+ KC_KP_4, KC_KP_5, KC_KP_6, MO(1),
125+ KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_0
126+ ),
127+
128+ [1] = LAYOUT_ortho_3x4(
129+ KC_BACKSPACE, KC_KP_SLASH, KC_KP_MINUS, _______,
130+ KC_EQUAL, KC_KP_ASTERISK, KC_KP_PLUS, _______,
131+ KC_ENTER, _______, _______, KC_KP_DOT
132+ )
133+};
134+
135+
136+/*
137+ * Handle layer state changes by updating RGB matrix colors
138+ *
139+ * Sets RGB matrix colors based on active layer:
140+ * - Layer 0: Light green (#88FB7A)
141+ * - Layer 1: Red
142+ * - Other layers: Red (fallback)
143+ */
144+layer_state_t layer_state_set_user(layer_state_t state) {
145+ switch (get_highest_layer(state)) {
146+ case 0:
147+ rgb_matrix_sethsv(85, 255, 251); // #88FB7A for layer 0
148+ break;
149+ case 1:
150+ rgb_matrix_sethsv(0, 255, 255); // Red for layer 1
151+ break;
152+ default:
153+ rgb_matrix_sethsv(0, 255, 255); // Red for any other layer
154+ break;
155+ }
156+ return state;
157+}
158diff --git a/keyboards/sdrakbs/sdrakb00/readme.md b/keyboards/sdrakbs/sdrakb00/readme.md
159new file mode 100644
160index 0000000000000000000000000000000000000000..21e56f9595a2f14d885c6efcf2cfc8d01a5b2039
161--- /dev/null
162+++ b/keyboards/sdrakbs/sdrakb00/readme.md
163@@ -0,0 +1,52 @@
164+# sdrakb00
165+
166+
167+
168+11 keys hot-swap macropad with rotary encoder.
169+
170+Macropad features:
171+- 11 hot-swap keys
172+- Rotary encoder with push button
173+- AtMega32U4 MCU
174+- Per-key RGB led for backlighting
175+- USB-C connector
176+- On PCB SPI header
177+- MCU reset button
178+- Switch mounting plate
179+- Power LED indicator
180+
181+* Keyboard Maintainer: [Diego Andres Rabaioli](https://github.com/drabaioli)
182+* Hardware Supported: Pro Micro Atmega32u4 based macropad with 11 keys, RGB LED chain and rotary encoder
183+* Hardware Availability: [Get the gerbers and have fun building it your self ;)](https://github.com/drabaioli/SdraKb00)
184+
185+Build SdraKb00 firmware:
186+
187+ make sdrakbs/sdrakb00:default
188+
189+Flashing SdraKb00 firmware, execute:
190+
191+ make sdrakbs/sdrakb00:default:flash
192+
193+Then press the reset button on the back side of the PCB.
194+