diff options
author | jonathan <uuupah@gmail.com> | 2020-11-22 05:36:55 +1030 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-21 19:06:55 +0000 |
commit | 4368611bfd87a544689ed10bb4450a39314bf1a1 (patch) | |
tree | cf6a469ed9e599ba568aedcd6806e0554c6b1e64 | |
parent | ccb15c2d2923903a925d253eec66fd4356ceea85 (diff) | |
download | qmk_firmware-4368611bfd87a544689ed10bb4450a39314bf1a1.tar.gz qmk_firmware-4368611bfd87a544689ed10bb4450a39314bf1a1.zip |
Add layout_all to xd96 (#10913)
Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r-- | keyboards/xd96/info.json | 114 | ||||
-rw-r--r-- | keyboards/xd96/keymaps/uuupah/keymap.c | 71 | ||||
-rw-r--r-- | keyboards/xd96/rules.mk | 10 | ||||
-rw-r--r-- | keyboards/xd96/xd96.h | 16 |
4 files changed, 204 insertions, 7 deletions
diff --git a/keyboards/xd96/info.json b/keyboards/xd96/info.json index 2d678414c..22de06609 100644 --- a/keyboards/xd96/info.json +++ b/keyboards/xd96/info.json | |||
@@ -232,6 +232,120 @@ | |||
232 | {"label":".", "x":17, "y":5}, | 232 | {"label":".", "x":17, "y":5}, |
233 | {"label":"Enter", "x":18, "y":4, "h":2} | 233 | {"label":"Enter", "x":18, "y":4, "h":2} |
234 | ] | 234 | ] |
235 | }, | ||
236 | "LAYOUT_all": { | ||
237 | "layout": [ | ||
238 | {"label":"Esc", "x":0, "y":0}, | ||
239 | {"label":"F1", "x":1, "y":0}, | ||
240 | {"label":"F2", "x":2, "y":0}, | ||
241 | {"label":"F3", "x":3, "y":0}, | ||
242 | {"label":"F4", "x":4, "y":0}, | ||
243 | {"label":"F5", "x":5, "y":0}, | ||
244 | {"label":"F6", "x":6, "y":0}, | ||
245 | {"label":"F7", "x":7, "y":0}, | ||
246 | {"label":"F8", "x":8, "y":0}, | ||
247 | {"label":"F9", "x":9, "y":0}, | ||
248 | {"label":"F10", "x":10, "y":0}, | ||
249 | {"label":"F11", "x":11, "y":0}, | ||
250 | {"label":"F12", "x":12, "y":0}, | ||
251 | {"label":"Insert", "x":13, "y":0}, | ||
252 | {"label":"Delete", "x":14, "y":0}, | ||
253 | {"label":"Home", "x":15, "y":0}, | ||
254 | {"label":"End", "x":16, "y":0}, | ||
255 | {"label":"PgUp", "x":17, "y":0}, | ||
256 | {"label":"PgDn", "x":18, "y":0}, | ||
257 | |||
258 | {"label":"~", "x":0, "y":1}, | ||
259 | {"label":"!", "x":1, "y":1}, | ||
260 | {"label":"@", "x":2, "y":1}, | ||
261 | {"label":"#", "x":3, "y":1}, | ||
262 | {"label":"$", "x":4, "y":1}, | ||
263 | {"label":"%", "x":5, "y":1}, | ||
264 | {"label":"^", "x":6, "y":1}, | ||
265 | {"label":"&", "x":7, "y":1}, | ||
266 | {"label":"*", "x":8, "y":1}, | ||
267 | {"label":"(", "x":9, "y":1}, | ||
268 | {"label":")", "x":10, "y":1}, | ||
269 | {"label":"_", "x":11, "y":1}, | ||
270 | {"label":"+", "x":12, "y":1}, | ||
271 | {"label":"Backspace", "x":13, "y":1}, | ||
272 | {"label":"Backspace", "x":14, "y":1}, | ||
273 | {"label":"Num Lock", "x":15, "y":1}, | ||
274 | {"label":"/", "x":16, "y":1}, | ||
275 | {"label":"*", "x":17, "y":1}, | ||
276 | {"label":"-", "x":18, "y":1}, | ||
277 | |||
278 | {"label":"Tab", "x":0, "y":2, "w":1.5}, | ||
279 | {"label":"Q", "x":1.5, "y":2}, | ||
280 | {"label":"W", "x":2.5, "y":2}, | ||
281 | {"label":"E", "x":3.5, "y":2}, | ||
282 | {"label":"R", "x":4.5, "y":2}, | ||
283 | {"label":"T", "x":5.5, "y":2}, | ||
284 | {"label":"Y", "x":6.5, "y":2}, | ||
285 | {"label":"U", "x":7.5, "y":2}, | ||
286 | {"label":"I", "x":8.5, "y":2}, | ||
287 | {"label":"O", "x":9.5, "y":2}, | ||
288 | {"label":"P", "x":10.5, "y":2}, | ||
289 | {"label":"{", "x":11.5, "y":2}, | ||
290 | {"label":"}", "x":12.5, "y":2}, | ||
291 | {"label":"|", "x":13.5, "y":2, "w":1.5}, | ||
292 | {"label":"7", "x":15, "y":2}, | ||
293 | {"label":"8", "x":16, "y":2}, | ||
294 | {"label":"9", "x":17, "y":2}, | ||
295 | {"label":"+", "x":18, "y":2}, | ||
296 | |||
297 | |||
298 | {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, | ||
299 | {"label":"A", "x":1.75, "y":3}, | ||
300 | {"label":"S", "x":2.75, "y":3}, | ||
301 | {"label":"D", "x":3.75, "y":3}, | ||
302 | {"label":"F", "x":4.75, "y":3}, | ||
303 | {"label":"G", "x":5.75, "y":3}, | ||
304 | {"label":"H", "x":6.75, "y":3}, | ||
305 | {"label":"J", "x":7.75, "y":3}, | ||
306 | {"label":"K", "x":8.75, "y":3}, | ||
307 | {"label":"L", "x":9.75, "y":3}, | ||
308 | {"label":":", "x":10.75, "y":3}, | ||
309 | {"label":"\"", "x":11.75, "y":3}, | ||
310 | {"label":"Enter", "x":12.75, "y":3}, | ||
311 | {"label":"Enter", "x":13.75, "y":3, "w":1.25}, | ||
312 | {"label":"4", "x":15, "y":3}, | ||
313 | {"label":"5", "x":16, "y":3}, | ||
314 | {"label":"6", "x":17, "y":3}, | ||
315 | {"label":"+", "x":18, "y":3}, | ||
316 | |||
317 | {"label":"Shift", "x":0, "y":4, "w":1.25}, | ||
318 | {"label":"Shift", "x":1.25, "y":4}, | ||
319 | {"label":"Z", "x":2.25, "y":4}, | ||
320 | {"label":"X", "x":3.25, "y":4}, | ||
321 | {"label":"C", "x":4.25, "y":4}, | ||
322 | {"label":"V", "x":5.25, "y":4}, | ||
323 | {"label":"B", "x":6.25, "y":4}, | ||
324 | {"label":"N", "x":7.25, "y":4}, | ||
325 | {"label":"M", "x":8.25, "y":4}, | ||
326 | {"label":"<", "x":9.25, "y":4}, | ||
327 | {"label":">", "x":10.25, "y":4}, | ||
328 | {"label":"?", "x":11.25, "y":4}, | ||
329 | {"label":"Shift", "x":12.25, "y":4, "w":1.75}, | ||
330 | {"label":"\u2191", "x":14, "y":4}, | ||
331 | {"label":"1", "x":15, "y":4}, | ||
332 | {"label":"2", "x":16, "y":4}, | ||
333 | {"label":"3", "x":17, "y":4}, | ||
334 | {"label":"Enter", "x":18, "y":4}, | ||
335 | |||
336 | {"label":"Ctrl", "x":0, "y":5, "w":1.25}, | ||
337 | {"label":"Win", "x":1.25, "y":5, "w":1.25}, | ||
338 | {"label":"Alt", "x":2.5, "y":5, "w":1.25}, | ||
339 | {"x":3.75, "y":5, "w":6.25}, | ||
340 | {"label":"Alt", "x":10, "y":5, "w":1.5}, | ||
341 | {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, | ||
342 | {"label":"\u2190", "x":13, "y":5}, | ||
343 | {"label":"\u2193", "x":14, "y":5}, | ||
344 | {"label":"\u2192", "x":15, "y":5}, | ||
345 | {"label":"0", "x":16, "y":5}, | ||
346 | {"label":".", "x":17, "y":5}, | ||
347 | {"label":"Enter", "x":18, "y":5} | ||
348 | ] | ||
235 | } | 349 | } |
236 | } | 350 | } |
237 | } | 351 | } |
diff --git a/keyboards/xd96/keymaps/uuupah/keymap.c b/keyboards/xd96/keymaps/uuupah/keymap.c new file mode 100644 index 000000000..a3a3da91d --- /dev/null +++ b/keyboards/xd96/keymaps/uuupah/keymap.c | |||
@@ -0,0 +1,71 @@ | |||
1 | /* Copyright 2020 Jonathan Souter | ||
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 | |||
17 | #include QMK_KEYBOARD_H | ||
18 | |||
19 | #define LT_ENT2 LT(2,KC_ENT) | ||
20 | |||
21 | #ifdef RGBLIGHT_ENABLE | ||
22 | void matrix_init_user() { | ||
23 | rgblight_disable(); | ||
24 | } | ||
25 | #endif | ||
26 | |||
27 | enum custom_keycodes { | ||
28 | ZEROZER, | ||
29 | }; | ||
30 | |||
31 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
32 | |||
33 | [0] = LAYOUT_all( | ||
34 | KC_ESC, 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_CALC, KC_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, | ||
35 | 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_BSLS, KC_DEL, KC_NLCK, _______, KC_PMNS, KC_PSLS, | ||
36 | 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_BSPC, KC_P7, KC_P8, KC_P9, KC_PAST, | ||
37 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _______, LT_ENT2, KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
38 | KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_P1, KC_P2, KC_P3, KC_EQL, | ||
39 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_P0, ZEROZER, KC_PDOT, KC_PENT | ||
40 | ), | ||
41 | |||
42 | [1] = LAYOUT_all( | ||
43 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RESET, _______, _______, _______, _______, | ||
44 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
45 | _______, KC_MPLY, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, KC_PSCR, _______, _______, _______, _______, _______, | ||
46 | _______, KC_MPRV, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, _______, _______, _______, _______, _______, | ||
47 | _______, _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, _______, _______, _______, _______, | ||
48 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
49 | ), | ||
50 | |||
51 | [2] = LAYOUT_all( | ||
52 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
53 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, | ||
55 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, | ||
56 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______, | ||
57 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
58 | ), | ||
59 | }; | ||
60 | |||
61 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
62 | switch (keycode) { | ||
63 | case ZEROZER: | ||
64 | if (record->event.pressed) { | ||
65 | SEND_STRING("00"); | ||
66 | } else { | ||
67 | } | ||
68 | break; | ||
69 | } | ||
70 | return true; | ||
71 | } | ||
diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk index 3ede910c3..8d34a1f82 100644 --- a/keyboards/xd96/rules.mk +++ b/keyboards/xd96/rules.mk | |||
@@ -23,14 +23,10 @@ COMMAND_ENABLE = no # Commands for debug and configuration | |||
23 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 23 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
24 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 24 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
25 | NKRO_ENABLE = no # USB Nkey Rollover | 25 | NKRO_ENABLE = no # USB Nkey Rollover |
26 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default | 26 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality |
27 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | 27 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow |
28 | MIDI_ENABLE = no # MIDI support | 28 | BLUETOOTH_ENABLE = no # Enable Bluetooth |
29 | UNICODE_ENABLE = no # Unicode | 29 | AUDIO_ENABLE = no # Audio output |
30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
31 | AUDIO_ENABLE = no # Audio output on port C6 | ||
32 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
33 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs | ||
34 | LTO_ENABLE = yes | 30 | LTO_ENABLE = yes |
35 | 31 | ||
36 | # custom matrix setup | 32 | # custom matrix setup |
diff --git a/keyboards/xd96/xd96.h b/keyboards/xd96/xd96.h index 04c2cc46e..bb855da5b 100644 --- a/keyboards/xd96/xd96.h +++ b/keyboards/xd96/xd96.h | |||
@@ -57,3 +57,19 @@ | |||
57 | { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K619 }, \ | 57 | { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K619 }, \ |
58 | { K601, K602, K603, ____, ____, K607, K115, ____, K612, ____, K611, K612, K614, K615, K616, K617, K618, ____ } \ | 58 | { K601, K602, K603, ____, ____, K607, K115, ____, K612, ____, K611, K612, K614, K615, K616, K617, K618, ____ } \ |
59 | } | 59 | } |
60 | |||
61 | #define LAYOUT_all( \ | ||
62 | K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ | ||
63 | K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, \ | ||
64 | K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, K319, \ | ||
65 | K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, K417, K418, K419, \ | ||
66 | K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K519, \ | ||
67 | K601, K602, K603, K607, K611, K612, K614, K615, K616, K617, K618, K619 \ | ||
68 | ) { \ | ||
69 | { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116, K117, K118, K119 }, \ | ||
70 | { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219 }, \ | ||
71 | { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, K319 }, \ | ||
72 | { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, K417, K418, K419 }, \ | ||
73 | { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K519 }, \ | ||
74 | { K601, K602, K603, K215, ____, K607, K115, ____, K612, K215, K611, ____, K614, K615, K616, K617, K618, K619 } \ | ||
75 | } | ||