aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Bakan <47256307+obuwunkunubi@users.noreply.github.com>2020-04-09 21:45:08 +0200
committerGitHub <noreply@github.com>2020-04-09 12:45:08 -0700
commit6384a2abd8d49f80b28f5a7c0045d39d4c3caa1f (patch)
tree5028d5cde46557fc278d95128aca12c904c3c7ed
parent439afc883a94627fd3f742d573fcfdf90ddbb22a (diff)
downloadqmk_firmware-6384a2abd8d49f80b28f5a7c0045d39d4c3caa1f.tar.gz
qmk_firmware-6384a2abd8d49f80b28f5a7c0045d39d4c3caa1f.zip
[Keyboard] obuwunkunubi/spaget handwired (#8738)
* adding my keymap * Update keyboards/handwired/obuwunkunubi/spaget/readme.md * Update keyboards/handwired/obuwunkunubi/spaget/readme.md * Update keyboards/handwired/obuwunkunubi/spaget/keymaps/default/rules.mk * Update rules.mk * Update keyboards/handwired/obuwunkunubi/spaget/spaget.h * Update keyboards/handwired/obuwunkunubi/spaget/spaget.h * Update keyboards/handwired/obuwunkunubi/spaget/info.json * Update keyboards/handwired/obuwunkunubi/spaget/rules.mk * Update rules.mk * Update keyboards/handwired/obuwunkunubi/spaget/spaget.c * Update keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c * Update keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c * Update keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c * Update keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c * Update keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c * Update keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c * Update keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c * Update keyboards/handwired/obuwunkunubi/spaget/info.json * Update keymap.c * Apply suggestions from code review * Apply suggestions from code review * Update spaget.h * Update keymap.c Updated comments
-rw-r--r--keyboards/handwired/obuwunkunubi/spaget/config.h74
-rw-r--r--keyboards/handwired/obuwunkunubi/spaget/info.json36
-rw-r--r--keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c435
-rw-r--r--keyboards/handwired/obuwunkunubi/spaget/keymaps/default/readme.md1
-rw-r--r--keyboards/handwired/obuwunkunubi/spaget/keymaps/default/rules.mk1
-rw-r--r--keyboards/handwired/obuwunkunubi/spaget/readme.md14
-rw-r--r--keyboards/handwired/obuwunkunubi/spaget/rules.mk34
-rw-r--r--keyboards/handwired/obuwunkunubi/spaget/spaget.c16
-rw-r--r--keyboards/handwired/obuwunkunubi/spaget/spaget.h47
9 files changed, 658 insertions, 0 deletions
diff --git a/keyboards/handwired/obuwunkunubi/spaget/config.h b/keyboards/handwired/obuwunkunubi/spaget/config.h
new file mode 100644
index 000000000..79c5d2bf1
--- /dev/null
+++ b/keyboards/handwired/obuwunkunubi/spaget/config.h
@@ -0,0 +1,74 @@
1/*
2Copyright 2020 obuwunkunubi
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0x1337
24#define PRODUCT_ID 0x6969
25#define DEVICE_VER 0x0001
26#define MANUFACTURER obuwunkunubi
27#define PRODUCT spaget
28#define DESCRIPTION numpad with 2 encoders and a screen
29
30/* key matrix size */
31#define MATRIX_ROWS 6
32#define MATRIX_COLS 4
33
34// ROWS: Top to bottom, COLS: Left to right
35
36#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 }
37#define MATRIX_COL_PINS { B1, B3, B2, B6 }
38
39/* COL2ROW or ROW2COL */
40#define DIODE_DIRECTION COL2ROW
41
42/* define if matrix has ghost */
43//#define MATRIX_HAS_GHOST
44
45/* Set 0 if debouncing isn't needed */
46//#define DEBOUNCE 5
47
48/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
49#define LOCKING_SUPPORT_ENABLE
50
51/* Locking resynchronize hack */
52#define LOCKING_RESYNC_ENABLE
53
54/* Define encoder pins */
55#define ENCODERS_PAD_A { F5, F7 } // 1a, 2a
56#define ENCODERS_PAD_B { F4, F6 } // 1b, 2b
57
58/*
59 * Feature disable options
60 * These options are also useful to firmware size reduction.
61 */
62
63/* disable debug print */
64//#define NO_DEBUG
65
66/* disable print */
67//#define NO_PRINT
68
69/* disable action features */
70//#define NO_ACTION_LAYER
71//#define NO_ACTION_TAPPING
72//#define NO_ACTION_ONESHOT
73//#define NO_ACTION_MACRO
74//#define NO_ACTION_FUNCTION
diff --git a/keyboards/handwired/obuwunkunubi/spaget/info.json b/keyboards/handwired/obuwunkunubi/spaget/info.json
new file mode 100644
index 000000000..4228c9c64
--- /dev/null
+++ b/keyboards/handwired/obuwunkunubi/spaget/info.json
@@ -0,0 +1,36 @@
1{
2 "keyboard_name": "spaget",
3 "url": "",
4 "maintainer": "obuwunkunubi",
5 "width": 4,
6 "height": 7.5,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {"x":0, "y":0},
11 {"x":3, "y":0},
12 {"x":0, "y":1.5},
13 {"x":1, "y":1.5},
14 {"x":2, "y":1.5},
15 {"x":3, "y":1.5},
16 {"x":0, "y":2.5},
17 {"x":1, "y":2.5},
18 {"x":2, "y":2.5},
19 {"x":3, "y":2.5},
20 {"x":0, "y":3.5},
21 {"x":1, "y":3.5},
22 {"x":2, "y":3.5},
23 {"x":0, "y":4.5},
24 {"x":1, "y":4.5},
25 {"x":2, "y":4.5},
26 {"x":3, "y":3.5, "h":2},
27 {"x":0, "y":5.5},
28 {"x":1, "y":5.5},
29 {"x":2, "y":5.5},
30 {"x":0, "y":6.5, "w":2},
31 {"x":2, "y":6.5},
32 {"x":3, "y":5.5, "h":2}
33 ]
34 }
35 }
36}
diff --git a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c
new file mode 100644
index 000000000..1854894e5
--- /dev/null
+++ b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c
@@ -0,0 +1,435 @@
1/* Copyright 2020 obuwunkunubi
2*
3* This program is free software: you can redistribute it and/or modify
4* it under the terms of the GNU General Public License as published by
5* the Free Software Foundation, either version 2 of the License, or
6* (at your option) any later version.
7*
8* This program is distributed in the hope that it will be useful,
9* but WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16#include QMK_KEYBOARD_H
17
18// Defines for shortcut macros
19#define KC_CAD LALT(LCTL(KC_DEL)) // CTRL + ALT + DEL
20#define KC_CPY LCTL(KC_C) // Copy
21#define KC_PST LCTL(KC_V) // Paste
22#define KC_AF4 LALT(KC_F4) // ALT + F4
23
24enum custom_keycodes {
25 SELWN = SAFE_RANGE,
26 SELWP,
27 EM1,
28 EM2,
29 EM3,
30 EM4,
31 EM5,
32 EM6,
33 EM7,
34 EM8,
35 EM9,
36 MAKE1,
37 MAKE2,
38 MAIL1,
39 MAIL2,
40 OBUWUN,
41 DIR
42};
43
44enum layer_names {
45 BASE,
46 ONE,
47 TWO
48};
49
50const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
51
52 /* Keymap BASE: Base Layer
53 *
54 * ,---. ,---.
55 * |NUM| |PLY|
56 * `---' `---'
57 * ,---------------.
58 * |CAL| UP|PRE|NXT|
59 * |---------------|
60 * | = | / | * | - |
61 * |---------------|
62 * | 7 | 8 | 9 | |
63 * |------------ + |
64 * | 4 | 5 | 6 | |
65 * |---------------|
66 * | 1 | 2 | 3 | |
67 * |------------ENT|
68 * | 0 | . | |
69 * `---------------'
70 */
71 [BASE] = LAYOUT( \
72 KC_NLCK, KC_MPLY, \
73 KC_CALC, TO(ONE), KC_MPRV, KC_MNXT, \
74 KC_EQL, KC_PSLS, KC_PAST, KC_MINS, \
75 KC_P7, KC_P8, KC_P9, \
76 KC_P4, KC_P5, KC_P6, KC_PPLS, \
77 KC_P1, KC_P2, KC_P3, \
78 KC_P0, KC_PDOT, KC_PENT \
79 ),
80
81 /* Keymap ONE: Util Layer
82 *
83 * ,---. ,---.
84 * |RST| |CAD|
85 * `---' `---'
86 * ,---------------.
87 * |BAS|TWO|MK1|MK2|
88 * |---------------|
89 * |DIR|@1 |@2 |OBU|
90 * |---------------|
91 * |SWP|AF4|SWN| |
92 * |------------PSC|
93 * |CPY| U |PST| |
94 * |---------------|
95 * | L | D | R | |
96 * |------------ NO|
97 * | NO | NO| |
98 * `---------------'
99 */
100 [ONE] = LAYOUT( \
101 RESET, KC_CAD, \
102 TO(BASE), TO(TWO), MAKE1, MAKE2, \
103 DIR, MAIL1, MAIL2, OBUWUN, \
104 SELWP, KC_AF4, SELWN, \
105 KC_CPY, KC_UP, KC_PST, KC_PSCR, \
106 KC_LEFT, KC_DOWN, KC_RGHT, \
107 KC_P0, KC_PDOT, KC_PENT \
108 ),
109
110 /* Keymap TWO: Emoji Layer
111 *
112 * ,---. ,---.
113 * | NO| | NO|
114 * `---' `---'
115 * ,---------------.
116 * |ONE|BAS| [ | ] |
117 * |---------------|
118 * |F13|F14|F15|F16|
119 * |---------------|
120 * |EM7|EM8|EM9| |
121 * |------------ NO|
122 * |EM4|EM5|EM6| |
123 * |---------------|
124 * |EM1|EM2|EM3| |
125 * |------------ NO|
126 * | NO | NO| |
127 * `---------------'
128 */
129 [TWO] = LAYOUT( \
130 KC_NO, KC_NO, \
131 TO(ONE), TO(BASE), KC_LBRC, KC_RBRC, \
132 KC_F13, KC_F14, KC_F15, KC_F16, \
133 EM7, EM8, EM9, \
134 EM4, EM5, EM6, KC_NO, \
135 EM1, EM2, EM3, \
136 KC_NO, KC_NO, KC_NO \
137 ),
138
139};
140
141
142bool process_record_user(uint16_t keycode, keyrecord_t *record) {
143 switch (keycode) {
144
145 case SELWN: // select and copy next word
146 if (record->event.pressed) {
147 // when keycode SELWN is pressed
148
149 tap_code16(C(S(KC_RGHT)));
150 tap_code16(KC_CPY);
151 return false; break;
152
153 } else {
154 // when keycode SELWN is released
155 }
156 break;
157
158 case SELWP: // select and copy previous word
159 if (record->event.pressed) {
160 // when keycode SELWP is pressed
161
162 tap_code16(C(S(KC_LEFT)));
163 tap_code16(KC_CPY);
164 return false; break;
165
166 } else {
167 // when keycode SELWP is released
168 }
169 break;
170
171 case MAKE1:
172 if (record->event.pressed) {
173 // when keycode MAKE1 is pressed
174
175 send_string("make handwired/obuwunkunubi/spaget:default:avrdude");
176
177 } else {
178 // when keycode MAKE1 is released
179 }
180 break;
181
182 case MAKE2:
183 if (record->event.pressed) {
184 // when keycode MAKE2 is pressed
185
186 send_string("make preonic/rev3:obuwunkunubi:dfu-util");
187
188 } else {
189 // when keycode MAKE2 is released
190 }
191 break;
192
193 case DIR:
194 if (record->event.pressed) {
195 // when keycode DIR is pressed
196
197 send_string("cd /d/Keyboards/qmk/qmk_firmware/");
198
199 } else {
200 // when keycode DIR is released
201 }
202 break;
203
204 case OBUWUN:
205 if (record->event.pressed) {
206 // when keycode OBUWUN is pressed
207
208 send_string("obuwunkunubi");
209
210 } else {
211 // when keycode OBUWUN is released
212 }
213 break;
214
215 case MAIL1:
216 if (record->event.pressed) {
217 // when keycode MAIL1 is pressed
218
219 send_string("marko.bakan7");
220
221 } else {
222 // when keycode MAIL1 is released
223 }
224 break;
225
226 case MAIL2:
227 if (record->event.pressed) {
228 // when keycode MAIL2 is pressed
229
230 send_string("bakan.marko7");
231
232 } else {
233 // when keycode MAIL2 is released
234 }
235 break;
236
237 case EM1:
238 if (record->event.pressed) {
239 // when keycode EM1 is pressed
240
241 send_unicode_string("ʕ•ᴥ•ʔ");
242
243 } else {
244 // when keycode EM1 is released
245 }
246 break;
247
248 case EM2:
249 if (record->event.pressed) {
250 // when keycode EM2 is pressed
251
252 send_unicode_string("༼ つ ◕_◕ ༽つ");
253
254 } else {
255 // when keycode EM2 is released
256 }
257 break;
258
259 case EM3:
260 if (record->event.pressed) {
261 // when keycode EM3 is pressed
262
263 send_unicode_string("( ⌐■_■)");
264
265 } else {
266 // when keycode EM3 is released
267 }
268 break;
269
270 case EM4:
271 if (record->event.pressed) {
272 // when keycode EM4 is pressed
273
274 send_unicode_string("(╯°□°)╯彡 ┻━┻");
275
276 } else {
277 // when keycode EM4 is released
278 }
279 break;
280
281 case EM5:
282 if (record->event.pressed) {
283 // when keycode EM5 is pressed
284
285 send_unicode_string("ಠ_ಠ");
286
287 } else {
288 // when keycode EM5 is released
289 }
290 break;
291
292 case EM6:
293 if (record->event.pressed) {
294 // when keycode EM6 is pressed
295
296 send_unicode_string("( ͡° ͜ʖ ͡°)");
297
298 } else {
299 // when keycode EM6 is released
300 }
301 break;
302
303 case EM7:
304 if (record->event.pressed) {
305 // when keycode EM7 is pressed
306
307 send_unicode_string("(☞゚ヮ゚)☞");
308
309 } else {
310 // when keycode EM7 is released
311 }
312 break;
313
314 case EM8:
315 if (record->event.pressed) {
316 // when keycode EM8 is pressed
317
318 send_unicode_string("(^‿^)");
319
320 } else {
321 // when keycode EM8 is released
322 }
323 break;
324
325 case EM9:
326 if (record->event.pressed) {
327 // when keycode EM9 is pressed
328
329 send_unicode_string("¯\\_(ツ)_/¯");
330
331 } else {
332 // when keycode EM9 is released
333 }
334 break;
335
336 }
337 return true;
338};
339
340// Unicode input mode set to Windows using WinCompose
341void matrix_init_user(void) {
342 set_unicode_input_mode(UC_WINC);
343};
344#ifdef OLED_DRIVER_ENABLE
345void oled_task_user(void) {
346 oled_write_P(PSTR(" spaget v1\n\n"), false);
347
348 // Host Keyboard Layer Status
349 oled_write_P(PSTR("Layer: "), false);
350
351 switch (get_highest_layer(layer_state)) {
352 case BASE:
353 oled_write_P(PSTR("Base\n"), false);
354 break;
355 case ONE:
356 oled_write_P(PSTR("Util\n"), false);
357 break;
358 case TWO:
359 oled_write_P(PSTR("Emoji\n"), false);
360 break;
361 default:
362 oled_write_ln_P(PSTR("Undefined"), false);
363 }
364
365 // Host Keyboard LED Status
366 led_t led_state = host_keyboard_led_state();
367 oled_write_P(PSTR("Lock: "), false);
368 oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
369 oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false);
370 oled_write_P(led_state.scroll_lock ? PSTR("SCROLL ") : PSTR(" "), false);
371}
372#endif
373
374void encoder_update_user(uint8_t index, bool clockwise) {
375 if(IS_LAYER_ON(BASE)) {
376 if (index == 0) { /* First encoder */
377 if (clockwise) {
378 tap_code(KC_PGDN);
379 } else {
380 tap_code(KC_PGUP);
381 }
382 } else if (index == 1) { /* Second encoder */
383 if (clockwise) {
384 tap_code(KC_VOLU);
385 } else {
386 tap_code(KC_VOLD);
387 }
388 }
389 }
390 else if(IS_LAYER_ON(ONE)) {
391 if (index == 0) { /* First encoder */
392 if (clockwise) {
393 tap_code(KC_WH_R);
394 } else {
395 tap_code(KC_WH_L);
396 }
397 } else if (index == 1) { /* Second encoder */
398 if (clockwise) {
399 tap_code(KC_WH_D);
400 } else {
401 tap_code(KC_WH_U);
402 }
403 }
404 }
405 else if(IS_LAYER_ON(TWO)) {
406 if (index == 0) { /* First encoder */
407 if (clockwise) {
408 tap_code(KC_DEL);
409 } else {
410 tap_code(KC_BSPC);
411 }
412 } else if (index == 1) { /* Second encoder */
413 if (clockwise) {
414 tap_code(KC_DOWN);
415 } else {
416 tap_code(KC_UP);
417 }
418 }
419 }
420 else {
421 if (index == 0) { /* First encoder */
422 if (clockwise) {
423 tap_code(KC_PGDN);
424 } else {
425 tap_code(KC_PGUP);
426 }
427 } else if (index == 1) { /* Second encoder */
428 if (clockwise) {
429 tap_code(KC_VOLU);
430 } else {
431 tap_code(KC_VOLD);
432 }
433 }
434 }
435}
diff --git a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/readme.md b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/readme.md
new file mode 100644
index 000000000..9a453e1f6
--- /dev/null
+++ b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/readme.md
@@ -0,0 +1 @@
# default spaget layout
diff --git a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/rules.mk b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/rules.mk
new file mode 100644
index 000000000..916b1154b
--- /dev/null
+++ b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/rules.mk
@@ -0,0 +1 @@
# Build Overrides
diff --git a/keyboards/handwired/obuwunkunubi/spaget/readme.md b/keyboards/handwired/obuwunkunubi/spaget/readme.md
new file mode 100644
index 000000000..253870a43
--- /dev/null
+++ b/keyboards/handwired/obuwunkunubi/spaget/readme.md
@@ -0,0 +1,14 @@
1# spaget
2
3![spaget](https://i.imgur.com/ktlhskZ.jpg)
4
5A hand wired numpad style QMK macropad, with a 128x32 OLED screen and two rotary encoders. Powered by an Arduino Pro Micro.
6
7* Keyboard Maintainer: [obuwunkunubi](https://github.com/obuwunkunubi)
8* Hardware Supported: spaget v1
9
10Make example for this keyboard (after setting up your build environment):
11
12 make handwired/obuwunkunubi/spaget:default
13
14See 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).
diff --git a/keyboards/handwired/obuwunkunubi/spaget/rules.mk b/keyboards/handwired/obuwunkunubi/spaget/rules.mk
new file mode 100644
index 000000000..8be738f3e
--- /dev/null
+++ b/keyboards/handwired/obuwunkunubi/spaget/rules.mk
@@ -0,0 +1,34 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5# Teensy halfkay
6# Pro Micro caterina
7# Atmel DFU atmel-dfu
8# LUFA DFU lufa-dfu
9# QMK DFU qmk-dfu
10# ATmega32A bootloadHID
11# ATmega328P USBasp
12BOOTLOADER = caterina
13
14# Build Options
15# comment out to disable the options.
16#
17BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = yes # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug
21COMMAND_ENABLE = yes # Commands for debug and configuration
22NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
23RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality
24BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
25MIDI_ENABLE = no # MIDI controls
26AUDIO_ENABLE = no
27UNICODE_ENABLE = yes # Unicode
28BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
29SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
30AUDIO_ENABLE = no # Audio output on port C6
31
32OLED_DRIVER_ENABLE = yes # Enable OLED display support
33ENCODER_ENABLE = yes # Enable encoder support
34
diff --git a/keyboards/handwired/obuwunkunubi/spaget/spaget.c b/keyboards/handwired/obuwunkunubi/spaget/spaget.c
new file mode 100644
index 000000000..aeb0dc543
--- /dev/null
+++ b/keyboards/handwired/obuwunkunubi/spaget/spaget.c
@@ -0,0 +1,16 @@
1/* Copyright 2020 obuwunkunubi
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16 #include "spaget.h"
diff --git a/keyboards/handwired/obuwunkunubi/spaget/spaget.h b/keyboards/handwired/obuwunkunubi/spaget/spaget.h
new file mode 100644
index 000000000..7d4b9e9df
--- /dev/null
+++ b/keyboards/handwired/obuwunkunubi/spaget/spaget.h
@@ -0,0 +1,47 @@
1/* Copyright 2020 obuwunkunubi
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include "quantum.h"
19
20/* This a shortcut to help you visually see your layout.
21 *
22 * The first section contains all of the arguments representing the physical
23 * layout of the board and position of the keys.
24 *
25 * The second converts the arguments into a two-dimensional array which
26 * represents the switch matrix.
27 */
28
29// readability
30#define XXX KC_NO
31
32#define LAYOUT( \
33 K23, K43, \
34 K00, K01, K02, K03, \
35 K10, K11, K12, K13, \
36 K20, K21, K22, \
37 K30, K31, K32, K33, \
38 K40, K41, K42, \
39 K51, K52, K53 \
40) { \
41 { K00, K01, K02, K03 }, \
42 { K10, K11, K12, K13 }, \
43 { K20, K21, K22, K23 }, \
44 { K30, K31, K32, K33 }, \
45 { K40, K41, K42, K43 }, \
46 { XXX, K51, K52, K53 } \
47}