diff options
author | Ryan Boone <70921559+rjboone@users.noreply.github.com> | 2021-07-20 00:27:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-19 22:27:18 -0700 |
commit | b887a1b9957664200363fc8feeb2865464c468a2 (patch) | |
tree | 590fa942be2d476e7dad18cad90a439e8a7dd599 | |
parent | 125691558398c4bfff93b457147b2802365cbd3f (diff) | |
download | qmk_firmware-b887a1b9957664200363fc8feeb2865464c468a2.tar.gz qmk_firmware-b887a1b9957664200363fc8feeb2865464c468a2.zip |
[Keyboard] Add q4z keyboard (#13198)
Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r-- | keyboards/q4z/config.h | 54 | ||||
-rw-r--r-- | keyboards/q4z/info.json | 55 | ||||
-rw-r--r-- | keyboards/q4z/keymaps/default/config.h | 23 | ||||
-rw-r--r-- | keyboards/q4z/keymaps/default/keymap.c | 101 | ||||
-rw-r--r-- | keyboards/q4z/keymaps/default/readme.md | 1 | ||||
-rw-r--r-- | keyboards/q4z/keymaps/default/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/q4z/keymaps/rjboone/config.h | 25 | ||||
-rw-r--r-- | keyboards/q4z/keymaps/rjboone/keymap.c | 107 | ||||
-rw-r--r-- | keyboards/q4z/keymaps/rjboone/readme.md | 1 | ||||
-rw-r--r-- | keyboards/q4z/keymaps/rjboone/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/q4z/q4z.c | 16 | ||||
-rw-r--r-- | keyboards/q4z/q4z.h | 34 | ||||
-rw-r--r-- | keyboards/q4z/readme.md | 20 | ||||
-rw-r--r-- | keyboards/q4z/rules.mk | 22 |
14 files changed, 461 insertions, 0 deletions
diff --git a/keyboards/q4z/config.h b/keyboards/q4z/config.h new file mode 100644 index 000000000..8a591a9a8 --- /dev/null +++ b/keyboards/q4z/config.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* Copyright 2021 rjboone | ||
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 "config_common.h" | ||
19 | |||
20 | /* USB Device descriptor parameter */ | ||
21 | #define VENDOR_ID 0x0001 | ||
22 | #define PRODUCT_ID 0x0001 | ||
23 | #define DEVICE_VER 0x0001 | ||
24 | #define MANUFACTURER drmmr | ||
25 | #define PRODUCT q4z keyboard | ||
26 | |||
27 | /* key matrix size */ | ||
28 | #define MATRIX_ROWS 5 | ||
29 | #define MATRIX_COLS 10 | ||
30 | |||
31 | /* | ||
32 | * Keyboard Matrix Assignments | ||
33 | * | ||
34 | * Change this to how you wired your keyboard | ||
35 | * COLS: AVR pins used for columns, left to right | ||
36 | * ROWS: AVR pins used for rows, top to bottom | ||
37 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
38 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
39 | * | ||
40 | */ | ||
41 | #define MATRIX_ROW_PINS { F4, C6, D7, E6, B4 } | ||
42 | #define MATRIX_COL_PINS { D1, D0, D4, B6, B2, B3, B1, F7, F6, F5 } | ||
43 | #define UNUSED_PINS | ||
44 | |||
45 | /* COL2ROW, ROW2COL*/ | ||
46 | #define DIODE_DIRECTION COL2ROW | ||
47 | |||
48 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
49 | #define DEBOUNCE 5 | ||
50 | |||
51 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
52 | #define LOCKING_SUPPORT_ENABLE | ||
53 | /* Locking resynchronize hack */ | ||
54 | #define LOCKING_RESYNC_ENABLE | ||
diff --git a/keyboards/q4z/info.json b/keyboards/q4z/info.json new file mode 100644 index 000000000..5abab4db9 --- /dev/null +++ b/keyboards/q4z/info.json | |||
@@ -0,0 +1,55 @@ | |||
1 | { | ||
2 | "keyboard_name": "q4z", | ||
3 | "url": "", | ||
4 | "maintainer": "rjboone", | ||
5 | "width": 10.25, | ||
6 | "height": 5, | ||
7 | "layouts": { | ||
8 | "LAYOUT": { | ||
9 | "layout": [ | ||
10 | {"label":"K00 (F4,D1)", "x":0.5, "y":0}, | ||
11 | {"label":"K01 (F4,D0)", "x":1.5, "y":0}, | ||
12 | {"label":"K02 (F4,D4)", "x":2.5, "y":0}, | ||
13 | {"label":"K03 (F4,B6)", "x":3.5, "y":0}, | ||
14 | {"label":"K04 (F4,B2)", "x":4.5, "y":0}, | ||
15 | {"label":"K10 (C6,D1)", "x":0, "y":1}, | ||
16 | {"label":"K11 (C6,D0)", "x":1, "y":1}, | ||
17 | {"label":"K12 (C6,D4)", "x":2, "y":1}, | ||
18 | {"label":"K13 (C6,B6)", "x":3, "y":1}, | ||
19 | {"label":"K14 (C6,B2)", "x":4, "y":1}, | ||
20 | {"label":"K15 (C6,B3)", "x":5, "y":1}, | ||
21 | {"label":"K16 (C6,B1)", "x":6, "y":1}, | ||
22 | {"label":"K17 (C6,F7)", "x":7, "y":1}, | ||
23 | {"label":"K18 (C6,F6)", "x":8, "y":1}, | ||
24 | {"label":"K19 (C6,F5)", "x":9, "y":1, "w":1.25}, | ||
25 | {"label":"K20 (D7,D1)", "x":0, "y":2, "w":1.25}, | ||
26 | {"label":"K21 (D7,D0)", "x":1.25, "y":2}, | ||
27 | {"label":"K22 (D7,D4)", "x":2.25, "y":2}, | ||
28 | {"label":"K23 (D7,B6)", "x":3.25, "y":2}, | ||
29 | {"label":"K24 (D7,B2)", "x":4.25, "y":2}, | ||
30 | {"label":"K25 (D7,B3)", "x":5.25, "y":2}, | ||
31 | {"label":"K26 (D7,B1)", "x":6.25, "y":2}, | ||
32 | {"label":"K27 (D7,F7)", "x":7.25, "y":2}, | ||
33 | {"label":"K28 (D7,F6)", "x":8.25, "y":2}, | ||
34 | {"label":"K29 (D7,F5)", "x":9.25, "y":2}, | ||
35 | {"label":"K30 (E6,D1)", "x":0, "y":3, "w":1.75}, | ||
36 | {"label":"K31 (E6,D0)", "x":1.75, "y":3}, | ||
37 | {"label":"K32 (E6,D4)", "x":2.75, "y":3}, | ||
38 | {"label":"K33 (E6,B6)", "x":3.75, "y":3}, | ||
39 | {"label":"K34 (E6,B2)", "x":4.75, "y":3}, | ||
40 | {"label":"K35 (E6,B3)", "x":5.75, "y":3}, | ||
41 | {"label":"K36 (E6,B1)", "x":6.75, "y":3}, | ||
42 | {"label":"K37 (E6,F7)", "x":7.75, "y":3}, | ||
43 | {"label":"K38 (E6,F6)", "x":8.75, "y":3, "w":1.5}, | ||
44 | {"label":"K40 (B4,D1)", "x":0, "y":4}, | ||
45 | {"label":"K41 (B4,D0)", "x":1, "y":4}, | ||
46 | {"label":"K42 (B4,D4)", "x":2, "y":4}, | ||
47 | {"label":"K43 (B4,B6)", "x":3, "y":4, "w":2.25}, | ||
48 | {"label":"K44 (B4,B2)", "x":5.25, "y":4, "w":2}, | ||
49 | {"label":"K45 (B4,B3)", "x":7.25, "y":4}, | ||
50 | {"label":"K46 (B4,B1)", "x":8.25, "y":4}, | ||
51 | {"label":"K47 (B4,F7)", "x":9.25, "y":4} | ||
52 | ] | ||
53 | } | ||
54 | } | ||
55 | } | ||
diff --git a/keyboards/q4z/keymaps/default/config.h b/keyboards/q4z/keymaps/default/config.h new file mode 100644 index 000000000..ac3a08778 --- /dev/null +++ b/keyboards/q4z/keymaps/default/config.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* Copyright 2021 rjboone | ||
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 | #define IGNORE_MOD_TAP_INTERRUPT //helps with homerow mods | ||
19 | |||
20 | #ifdef COMBO_ENABLE | ||
21 | #define COMBO_COUNT 5 | ||
22 | #define COMBO_TERM 200 | ||
23 | #endif | ||
diff --git a/keyboards/q4z/keymaps/default/keymap.c b/keyboards/q4z/keymaps/default/keymap.c new file mode 100644 index 000000000..21d0c4ffc --- /dev/null +++ b/keyboards/q4z/keymaps/default/keymap.c | |||
@@ -0,0 +1,101 @@ | |||
1 | /* Copyright 2021 rjboone | ||
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 | enum layers{ | ||
19 | _BASE, | ||
20 | _NUM_SYM, | ||
21 | _NAV, | ||
22 | _GAME | ||
23 | }; | ||
24 | |||
25 | enum combo_events { | ||
26 | COMBO_BSPC, | ||
27 | COMBO_NUMBAK, | ||
28 | COMBO_TAB, | ||
29 | COMBO_ESC, | ||
30 | COMBO_DEL, | ||
31 | }; | ||
32 | |||
33 | #define KC_SF LSFT_T(KC_F) | ||
34 | #define KC_SJ RSFT_T(KC_J) | ||
35 | |||
36 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
37 | [_BASE] = LAYOUT( | ||
38 | KC_1, KC_2, KC_3, KC_4, KC_5, | ||
39 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
40 | KC_A, KC_S, KC_D, KC_SF, KC_G, KC_H, KC_SJ, KC_K, KC_L, KC_SCLN, | ||
41 | KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, | ||
42 | KC_LCTL, KC_LALT, KC_LGUI, LT(_NUM_SYM, KC_ENT), KC_SPC, MO(_NAV), TG(_GAME), KC_SLSH | ||
43 | ), | ||
44 | |||
45 | [_NUM_SYM] = LAYOUT( | ||
46 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
47 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
48 | KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, | ||
49 | KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_SCLN, KC_QUOTE, | ||
50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_TRNS, KC_TRNS, KC_BSLS | ||
51 | ), | ||
52 | |||
53 | [_NAV] = LAYOUT( | ||
54 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
55 | RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, | ||
56 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, | ||
57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
58 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
59 | ), | ||
60 | |||
61 | [_GAME] = LAYOUT( | ||
62 | KC_1, KC_2, KC_3, KC_4, KC_5, | ||
63 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_NO, KC_NO, | ||
64 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, | ||
65 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_NO, | ||
66 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_ENT, KC_NO, TG(_GAME), KC_NO | ||
67 | ), | ||
68 | }; | ||
69 | |||
70 | #ifdef COMBO_ENABLE | ||
71 | const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; | ||
72 | const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; | ||
73 | const uint16_t PROGMEM combo_tab[] = {KC_A, KC_S, COMBO_END}; | ||
74 | const uint16_t PROGMEM combo_esc[] = {KC_Q, KC_W, COMBO_END}; | ||
75 | const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; | ||
76 | |||
77 | combo_t key_combos[COMBO_COUNT] = { | ||
78 | [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), | ||
79 | [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), | ||
80 | [COMBO_TAB] = COMBO(combo_tab,KC_TAB), | ||
81 | [COMBO_ESC] = COMBO(combo_esc,KC_ESC), | ||
82 | [COMBO_DEL] = COMBO(combo_del,KC_DEL), | ||
83 | |||
84 | }; | ||
85 | #endif | ||
86 | |||
87 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
88 | |||
89 | #ifdef COMBO_ENABLE | ||
90 | switch(get_highest_layer(state)) { | ||
91 | case _GAME: | ||
92 | combo_disable(); | ||
93 | break; | ||
94 | default: | ||
95 | combo_enable(); | ||
96 | break; | ||
97 | } | ||
98 | #endif // COMBO_ENABLE | ||
99 | |||
100 | return state; | ||
101 | } | ||
diff --git a/keyboards/q4z/keymaps/default/readme.md b/keyboards/q4z/keymaps/default/readme.md new file mode 100644 index 000000000..28186f64d --- /dev/null +++ b/keyboards/q4z/keymaps/default/readme.md | |||
@@ -0,0 +1 @@ | |||
# Default Q4Z Keymap | |||
diff --git a/keyboards/q4z/keymaps/default/rules.mk b/keyboards/q4z/keymaps/default/rules.mk new file mode 100644 index 000000000..ab1e43818 --- /dev/null +++ b/keyboards/q4z/keymaps/default/rules.mk | |||
@@ -0,0 +1 @@ | |||
COMBO_ENABLE = yes | |||
diff --git a/keyboards/q4z/keymaps/rjboone/config.h b/keyboards/q4z/keymaps/rjboone/config.h new file mode 100644 index 000000000..9921a1917 --- /dev/null +++ b/keyboards/q4z/keymaps/rjboone/config.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* Copyright 2021 rjboone | ||
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 | #define IGNORE_MOD_TAP_INTERRUPT //helps with homerow mods | ||
19 | |||
20 | #undef TAPPING_TERM | ||
21 | #define TAPPING_TERM 300 | ||
22 | |||
23 | #undef COMBO_COUNT | ||
24 | #define COMBO_COUNT 5 | ||
25 | #define COMBO_TERM 50 | ||
diff --git a/keyboards/q4z/keymaps/rjboone/keymap.c b/keyboards/q4z/keymaps/rjboone/keymap.c new file mode 100644 index 000000000..aa8a77dae --- /dev/null +++ b/keyboards/q4z/keymaps/rjboone/keymap.c | |||
@@ -0,0 +1,107 @@ | |||
1 | /* Copyright 2021 rjboone | ||
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 | enum layers{ | ||
19 | _BASE, | ||
20 | _NUM_SYM, | ||
21 | _NAV, | ||
22 | _GAME | ||
23 | }; | ||
24 | |||
25 | enum combo_events { | ||
26 | COMBO_BSPC, | ||
27 | COMBO_NUMBAK, | ||
28 | COMBO_TAB, | ||
29 | COMBO_ESC, | ||
30 | COMBO_DEL, | ||
31 | }; | ||
32 | |||
33 | #define KC_GA LGUI_T(KC_A) | ||
34 | #define KC_AS LALT_T(KC_S) | ||
35 | #define KC_CD LCTL_T(KC_D) | ||
36 | #define KC_SF LSFT_T(KC_F) | ||
37 | #define KC_SJ RSFT_T(KC_J) | ||
38 | #define KC_CK RCTL_T(KC_K) | ||
39 | #define KC_AL RALT_T(KC_L) | ||
40 | #define KC_GSCLN RGUI_T(KC_SCLN) | ||
41 | |||
42 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
43 | [_BASE] = LAYOUT( | ||
44 | KC_1, KC_2, KC_3, KC_4, KC_5, | ||
45 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
46 | KC_A, KC_S, KC_D, KC_SF, KC_G, KC_H, KC_SJ, KC_K, KC_L, KC_SCLN, | ||
47 | KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, | ||
48 | KC_LCTL, KC_LALT, KC_LGUI, LT(_NUM_SYM, KC_ENT), KC_SPC, MO(_NAV), TG(_GAME), KC_SLSH | ||
49 | ), | ||
50 | |||
51 | [_NUM_SYM] = LAYOUT( | ||
52 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
53 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
54 | KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_LBRC, KC_RBRC, KC_EQL, KC_TRNS, KC_TRNS, KC_QUOT, | ||
55 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
56 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_TRNS, KC_TRNS, KC_BSLS | ||
57 | ), | ||
58 | |||
59 | [_NAV] = LAYOUT( | ||
60 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
61 | RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, | ||
62 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, | ||
63 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
64 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
65 | ), | ||
66 | |||
67 | [_GAME] = LAYOUT( | ||
68 | KC_1, KC_2, KC_3, KC_4, KC_5, | ||
69 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_NO, KC_NO, | ||
70 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, | ||
71 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_NO, | ||
72 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_ENT, KC_NO, TG(_GAME), KC_NO | ||
73 | ), | ||
74 | }; | ||
75 | |||
76 | #ifdef COMBO_ENABLE | ||
77 | const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; | ||
78 | const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; | ||
79 | const uint16_t PROGMEM combo_tab[] = {KC_A, KC_S, COMBO_END}; | ||
80 | const uint16_t PROGMEM combo_esc[] = {KC_Q, KC_W, COMBO_END}; | ||
81 | const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; | ||
82 | |||
83 | combo_t key_combos[COMBO_COUNT] = { | ||
84 | [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), | ||
85 | [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), | ||
86 | [COMBO_TAB] = COMBO(combo_tab,KC_TAB), | ||
87 | [COMBO_ESC] = COMBO(combo_esc,KC_ESC), | ||
88 | [COMBO_DEL] = COMBO(combo_del,KC_DEL), | ||
89 | |||
90 | }; | ||
91 | #endif | ||
92 | |||
93 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
94 | |||
95 | #ifdef COMBO_ENABLE | ||
96 | switch(get_highest_layer(state)) { | ||
97 | case _GAME: | ||
98 | combo_disable(); | ||
99 | break; | ||
100 | default: | ||
101 | combo_enable(); | ||
102 | break; | ||
103 | } | ||
104 | #endif // COMBO_ENABLE | ||
105 | |||
106 | return state; | ||
107 | } | ||
diff --git a/keyboards/q4z/keymaps/rjboone/readme.md b/keyboards/q4z/keymaps/rjboone/readme.md new file mode 100644 index 000000000..29f2d31f6 --- /dev/null +++ b/keyboards/q4z/keymaps/rjboone/readme.md | |||
@@ -0,0 +1 @@ | |||
# Default Le Chiffre Keymap | |||
diff --git a/keyboards/q4z/keymaps/rjboone/rules.mk b/keyboards/q4z/keymaps/rjboone/rules.mk new file mode 100644 index 000000000..ab1e43818 --- /dev/null +++ b/keyboards/q4z/keymaps/rjboone/rules.mk | |||
@@ -0,0 +1 @@ | |||
COMBO_ENABLE = yes | |||
diff --git a/keyboards/q4z/q4z.c b/keyboards/q4z/q4z.c new file mode 100644 index 000000000..537f1f578 --- /dev/null +++ b/keyboards/q4z/q4z.c | |||
@@ -0,0 +1,16 @@ | |||
1 | /* Copyright 2021 rjboone | ||
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 "q4z.h" | ||
diff --git a/keyboards/q4z/q4z.h b/keyboards/q4z/q4z.h new file mode 100644 index 000000000..465178fdb --- /dev/null +++ b/keyboards/q4z/q4z.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* Copyright 2021 rjboone | ||
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 | #define XXX KC_NO | ||
21 | |||
22 | #define LAYOUT( \ | ||
23 | K01, K06, K11, K16, K21, \ | ||
24 | K02, K07, K12, K17, K22, K26, K30, K34, K38, K41, \ | ||
25 | K03, K08, K13, K18, K23, K27, K31, K35, K39, K42, \ | ||
26 | K04, K09, K14, K19, K24, K28, K32, K36, K40, \ | ||
27 | K05, K10, K15, K20, K25, K29, K33, K37 \ | ||
28 | ) { \ | ||
29 | { K01, K06, K11, K16, K21, XXX, XXX, XXX, XXX, XXX }, \ | ||
30 | { K02, K07, K12, K17, K22, K26, K30, K34, K38, K41 }, \ | ||
31 | { K03, K08, K13, K18, K23, K27, K31, K35, K39, K42 }, \ | ||
32 | { K04, K09, K14, K19, K24, K28, K32, K36, K40, XXX }, \ | ||
33 | { K05, K10, K15, K20, K25, K29, K33, K37, XXX, XXX } \ | ||
34 | } | ||
diff --git a/keyboards/q4z/readme.md b/keyboards/q4z/readme.md new file mode 100644 index 000000000..6b3839a2c --- /dev/null +++ b/keyboards/q4z/readme.md | |||
@@ -0,0 +1,20 @@ | |||
1 | # Q4Z | ||
2 | |||
3 |  | ||
4 | |||
5 | Q4Z is a play on everybody's favorite 10.25u layout. With the addition of 5 number keys and a handle, | ||
6 | this little board is ready for whatever a raging gamer can throw it at. | ||
7 | |||
8 | * Keyboard Maintainer: [Ryan Boone](https://github.com/rjboone) (Drmmr#0004) | ||
9 | * Hardware Supported: Pro Micro or equivalent | ||
10 | * Hardware Availability: This board is available to purchase from [P3D Store](https://p3dstore.com) | ||
11 | |||
12 | Make example for this keyboard (after setting up your build environment): | ||
13 | |||
14 | make q4z:default | ||
15 | |||
16 | Flashing example for this keyboard: | ||
17 | |||
18 | make q4z:default:flash | ||
19 | |||
20 | 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). | ||
diff --git a/keyboards/q4z/rules.mk b/keyboards/q4z/rules.mk new file mode 100644 index 000000000..5e84c7512 --- /dev/null +++ b/keyboards/q4z/rules.mk | |||
@@ -0,0 +1,22 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = atmel-dfu | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
13 | CONSOLE_ENABLE = no # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
22 | AUDIO_ENABLE = no # Audio output | ||