aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/durgod/k310/base/readme.md6
-rw-r--r--keyboards/durgod/k310/base/rules.mk1
-rw-r--r--keyboards/durgod/k310/readme.md4
-rw-r--r--keyboards/durgod/k310/rules.mk1
-rw-r--r--keyboards/durgod/k320/base/readme.md6
-rw-r--r--keyboards/durgod/k320/base/rules.mk1
-rw-r--r--keyboards/durgod/k320/keymaps/default/keymap.json26
-rw-r--r--keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c367
-rw-r--r--keyboards/durgod/k320/keymaps/via/keymap.c90
-rw-r--r--keyboards/durgod/k320/keymaps/via/readme.md12
-rw-r--r--keyboards/durgod/k320/keymaps/via/rules.mk4
-rw-r--r--keyboards/durgod/k320/readme.md55
-rw-r--r--keyboards/durgod/k320/rules.mk30
-rw-r--r--keyboards/durgod/k3x0/config.h (renamed from keyboards/durgod/k320/config.h)14
-rw-r--r--keyboards/durgod/k3x0/halconf.h22
-rw-r--r--keyboards/durgod/k3x0/k310/base/config.h23
-rw-r--r--keyboards/durgod/k3x0/k310/base/readme.md27
-rw-r--r--keyboards/durgod/k3x0/k310/base/rules.mk1
-rw-r--r--keyboards/durgod/k3x0/k310/config.h36
-rw-r--r--keyboards/durgod/k3x0/k310/info.json (renamed from keyboards/durgod/k320/info.json)69
-rw-r--r--keyboards/durgod/k3x0/k310/k310.h78
-rw-r--r--keyboards/durgod/k3x0/k310/readme.md10
-rw-r--r--keyboards/durgod/k3x0/k310/rules.mk4
-rw-r--r--keyboards/durgod/k3x0/k320/base/config.h23
-rw-r--r--keyboards/durgod/k3x0/k320/base/readme.md27
-rw-r--r--keyboards/durgod/k3x0/k320/base/rules.mk1
-rw-r--r--keyboards/durgod/k3x0/k320/config.h33
-rw-r--r--keyboards/durgod/k3x0/k320/info.json415
-rw-r--r--keyboards/durgod/k3x0/k320/k320.h (renamed from keyboards/durgod/k320/k320.h)44
-rw-r--r--keyboards/durgod/k3x0/k320/keymaps/kuenhlee/keymap.c (renamed from keyboards/durgod/k320/keymaps/kuenhlee/keymap.c)0
-rw-r--r--keyboards/durgod/k3x0/k320/keymaps/kuenhlee/readme.md (renamed from keyboards/durgod/k320/keymaps/kuenhlee/readme.md)0
-rw-r--r--keyboards/durgod/k3x0/k320/keymaps/kuenhlee/rules.mk (renamed from keyboards/durgod/k320/keymaps/kuenhlee/rules.mk)0
-rw-r--r--keyboards/durgod/k3x0/k320/readme.md10
-rw-r--r--keyboards/durgod/k3x0/k320/rules.mk4
-rw-r--r--keyboards/durgod/k3x0/k3x0.c (renamed from keyboards/durgod/k320/k320.c)40
-rw-r--r--keyboards/durgod/k3x0/k3x0.h47
-rw-r--r--keyboards/durgod/k3x0/keymaps/chimera/keymap.c373
-rw-r--r--keyboards/durgod/k3x0/keymaps/chimera/readme.md (renamed from keyboards/durgod/k320/keymaps/default_toggle_mac_windows/readme.md)10
-rw-r--r--keyboards/durgod/k3x0/keymaps/chimera/rules.mk (renamed from keyboards/durgod/k320/keymaps/default_toggle_mac_windows/rules.mk)0
-rw-r--r--keyboards/durgod/k3x0/keymaps/default/keymap.json26
-rw-r--r--keyboards/durgod/k3x0/keymaps/default/readme.md (renamed from keyboards/durgod/k320/keymaps/default/readme.md)6
-rw-r--r--keyboards/durgod/k3x0/keymaps/default_mac/keymap.json (renamed from keyboards/durgod/k320/keymaps/default_mac/keymap.json)22
-rw-r--r--keyboards/durgod/k3x0/keymaps/default_mac/readme.md (renamed from keyboards/durgod/k320/keymaps/default_mac/readme.md)0
-rw-r--r--keyboards/durgod/k3x0/keymaps/typhon/keymap.c373
-rw-r--r--keyboards/durgod/k3x0/keymaps/typhon/readme.md65
-rw-r--r--keyboards/durgod/k3x0/keymaps/typhon/rules.mk2
-rw-r--r--keyboards/durgod/k3x0/keymaps/via/keymap.c92
-rw-r--r--keyboards/durgod/k3x0/keymaps/via/readme.md6
-rw-r--r--keyboards/durgod/k3x0/keymaps/via/rules.mk1
-rw-r--r--keyboards/durgod/k3x0/readme.md51
-rw-r--r--keyboards/durgod/k3x0/rules.mk28
-rw-r--r--users/talljoe/talljoe.h1
52 files changed, 1945 insertions, 642 deletions
diff --git a/keyboards/durgod/k310/base/readme.md b/keyboards/durgod/k310/base/readme.md
new file mode 100644
index 000000000..1f818dacc
--- /dev/null
+++ b/keyboards/durgod/k310/base/readme.md
@@ -0,0 +1,6 @@
1# Taurus K310
2
3Base Model - no backlight leds
4
5See: [K310](../../k3x0/k310/base/readme.md)
6
diff --git a/keyboards/durgod/k310/base/rules.mk b/keyboards/durgod/k310/base/rules.mk
new file mode 100644
index 000000000..ff432cc4a
--- /dev/null
+++ b/keyboards/durgod/k310/base/rules.mk
@@ -0,0 +1 @@
DEFAULT_FOLDER=durgod/k3x0/k310/base
diff --git a/keyboards/durgod/k310/readme.md b/keyboards/durgod/k310/readme.md
new file mode 100644
index 000000000..234fcc875
--- /dev/null
+++ b/keyboards/durgod/k310/readme.md
@@ -0,0 +1,4 @@
1# K310
2
3See: [K310](../k3x0/k310/readme.md)
4
diff --git a/keyboards/durgod/k310/rules.mk b/keyboards/durgod/k310/rules.mk
new file mode 100644
index 000000000..e200539b2
--- /dev/null
+++ b/keyboards/durgod/k310/rules.mk
@@ -0,0 +1 @@
DEFAULT_FOLDER=durgod/k3x0/k310
diff --git a/keyboards/durgod/k320/base/readme.md b/keyboards/durgod/k320/base/readme.md
new file mode 100644
index 000000000..8b74e28e5
--- /dev/null
+++ b/keyboards/durgod/k320/base/readme.md
@@ -0,0 +1,6 @@
1# Taurus K320
2
3Base Model - no backlight leds
4
5See: [K320](../../k3x0/k320/base/readme.md)
6
diff --git a/keyboards/durgod/k320/base/rules.mk b/keyboards/durgod/k320/base/rules.mk
new file mode 100644
index 000000000..de33470cc
--- /dev/null
+++ b/keyboards/durgod/k320/base/rules.mk
@@ -0,0 +1 @@
DEFAULT_FOLDER=durgod/k3x0/k320/base
diff --git a/keyboards/durgod/k320/keymaps/default/keymap.json b/keyboards/durgod/k320/keymaps/default/keymap.json
deleted file mode 100644
index d8242ae76..000000000
--- a/keyboards/durgod/k320/keymaps/default/keymap.json
+++ /dev/null
@@ -1,26 +0,0 @@
1{
2 "keyboard": "durgod/k320",
3 "keymap": "default",
4 "layout": "LAYOUT_all",
5 "layers": [
6 [
7 "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_PSCR", "KC_SLCK", "KC_PAUS",
8 "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_INS", "KC_HOME", "KC_PGUP",
9 "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", "KC_DEL", "KC_END", "KC_PGDN",
10 "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_NUHS", "KC_ENT",
11 "KC_LSFT", "KC_NUBS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP",
12 "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_APP", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT"
13 ],
14 [
15 "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
16 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
17 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
18 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
19 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
20 "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"
21 ]
22 ],
23 "author":"dkjer",
24 "notes":"",
25 "version":1
26}
diff --git a/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c b/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c
deleted file mode 100644
index 8494fbe03..000000000
--- a/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c
+++ /dev/null
@@ -1,367 +0,0 @@
1/* Copyright 2021 kuenhlee and Don Kjer
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// Layer shorthand
19enum _layer {
20 _WBL,
21 _WFL,
22 _WSL,
23 _MBL,
24 _MFL,
25 _MSL
26};
27
28#ifndef DEFAULT_LAYOUT
29# define DEFAULT_LAYOUT _WBL // Change to _MBL to boot into Mac layout.
30#endif
31#ifndef ALT_LAYOUT
32# define ALT_LAYOUT _MBL // Layout to display 'MR' led when active.
33#endif
34
35static bool win_key_locked = false;
36static bool mac_media_locked = false;
37static bool win_appkey_pressed = false;
38static bool mac_fnkey_pressed = false;
39
40
41// Defines the keycodes used by our macros in process_record_user
42enum custom_keycodes {
43 KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock (Windows)
44 KC_TMED, // Toggle between Fx keys or Media keys (Mac)
45 KC_WFN, // Windows function key
46 KC_MFN, // Mac function key
47 MO_WSL, // Windows system key
48 MO_MSL, // Mac system key
49 DF_W2MBL, // Change layout from Windows to Mac
50 DF_M2WBL // Change layout from Mac to Windows
51};
52
53const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
54 /* Keymap _WBL: Windows Base Layer (Default Layer)
55 * ,-----------------------------------------------------------. ,--------------.
56 * |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11|f12| |Prnt|ScLk|Paus|
57 * |-----------------------------------------------------------| |--------------|
58 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backsp | | Ins|Home|PgUp|
59 * |-----------------------------------------------------------| |--------------|
60 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | Del| End|PgDn|
61 * |-----------------------------------------------------------| `--------------'
62 * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Ret |
63 * |-----------------------------------------------------------| ,----.
64 * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | | Up |
65 * |-----------------------------------------------------------| ,-------------.
66 * |Ctrl|Gui |Alt | Space |Alt |Func |App|Ctrl | |Lft| Dn |Rig |
67 * `-----------------------------------------------------------' `-------------'
68 */
69 [_WBL] = LAYOUT_all( /* Windows Base Layer */
70 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_PSCR, KC_SLCK, KC_PAUS,
71 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_INS, KC_HOME, KC_PGUP,
72 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, KC_DEL, KC_END, KC_PGDN,
73 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_NUHS, KC_ENT,
74 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
75 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
76 ),
77 /* Keymap _WFL: Windows Function Layer
78 * ,-----------------------------------------------------------. ,--------------.
79 * | |Play|Stop|Prev|Next| |Mute|Vol+|Vol-| | | | | | | | | | |
80 * |-----------------------------------------------------------| |--------------|
81 * | | | | | | | | | | | | | | | | | | |
82 * |-----------------------------------------------------------| |--------------|
83 * | | | | | | | | | | | | | | | | | | |
84 * |-----------------------------------------------------------| `--------------'
85 * | | | | | | | | | | | | | | |
86 * |-----------------------------------------------------------| ,----.
87 * | | | | | | | | | | | | | | | |
88 * |-----------------------------------------------------------| ,-------------.
89 * | |Lock| | | |Func |Sys| | | | | |
90 * `-----------------------------------------------------------' `-------------'
91 */
92 [_WFL] = LAYOUT_all( /* Windows First Layer */
93 _______, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
94 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
95 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
96 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
97 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
98 _______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______, _______
99 ),
100 /* Keymap _WSL: Windows System Layer
101 * ,-----------------------------------------------------------. ,--------------.
102 * |Reset |Sleep| | |Power| | | | | | | | | |MAC| | |
103 * |-----------------------------------------------------------| |--------------|
104 * | | | | | | | | | | | | | | | | | | |
105 * |-----------------------------------------------------------| |--------------|
106 * | | | | | | | | | | | | | | | | | | |
107 * |-----------------------------------------------------------| `--------------'
108 * | | | | | | | | | | | | | | |
109 * |-----------------------------------------------------------| ,----.
110 * | | | | | | | | | | | | | | | |
111 * |-----------------------------------------------------------| ,-------------.
112 * | | | | | |Func |Sys| | | | | |
113 * `-----------------------------------------------------------' `-------------'
114 */
115 [_WSL] = LAYOUT_all( /* Windows Second / System Layer */
116 RESET, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, XXXXXXX, XXXXXXX, XXXXXXX,
117 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
118 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
119 XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
120 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
121 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
122 ),
123
124 /* Keymap _MBL: Mac Base Layer (Alternate Layout)
125 * ,-----------------------------------------------------------. ,--------------.
126 * |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11|f12| | f13| f14| f15|
127 * |-----------------------------------------------------------| |--------------|
128 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backsp | | Ins|Home|PgUp|
129 * |-----------------------------------------------------------| |--------------|
130 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | Del| End|PgDn|
131 * |-----------------------------------------------------------| `--------------'
132 * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Ret |
133 * |-----------------------------------------------------------| ,----.
134 * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | | Up |
135 * |-----------------------------------------------------------| ,-------------.
136 * |Ctrl|Alt |Gui | Space |Gui |Alt|Func |Ctrl | |Lft| Dn |Rig |
137 * `-----------------------------------------------------------' `-------------'
138 */
139 [_MBL] = LAYOUT_all( /* Mac Base Layer */
140 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_F13, KC_F14, KC_F15,
141 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_INS, KC_HOME, KC_PGUP,
142 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, KC_DEL, KC_END, KC_PGDN,
143 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_NUHS, KC_ENT,
144 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
145 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
146 ),
147 /* Keymap _MFL: Mac Function Layer
148 * ,-----------------------------------------------------------. ,--------------.
149 * | |Bri-|Bri+|MCon|LPad| | | |Prv|Ply| |Nxt|Mute|Vol-|Vol+| |TMed| | |
150 * |-----------------------------------------------------------| |--------------|
151 * | | | | | | | | | | | | | | | | | | |
152 * |-----------------------------------------------------------| |--------------|
153 * | | | | | | | | | | | | | | | | | | |
154 * |-----------------------------------------------------------| `--------------'
155 * | | | | | | | | | | | | | | |
156 * |-----------------------------------------------------------| ,----.
157 * | | | | | | | | | | | | | | | |
158 * |-----------------------------------------------------------| ,-------------.
159 * | | | | | |Sys|Func | | | | | |
160 * `-----------------------------------------------------------' `-------------'
161 */
162 [_MFL] = LAYOUT_all( /* Mac First Layer */
163 _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TMED, _______, _______,
164 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
165 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
166 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
167 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
168 _______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______, _______
169 ),
170 /* Keymap _MSL: Mac System Layer
171 * ,-----------------------------------------------------------. ,--------------.
172 * |Reset | | | |Sleep| | | | | | | | | |WIN| | |
173 * |-----------------------------------------------------------| |--------------|
174 * | | | | | | | | | | | | | | | | | | |
175 * |-----------------------------------------------------------| |--------------|
176 * | | | | | | | | | | | | | | | | | | |
177 * |-----------------------------------------------------------| `--------------'
178 * | | | | | | | | | | | | | | |
179 * |-----------------------------------------------------------| ,----.
180 * | | | | | | | | | | | | | | | |
181 * |-----------------------------------------------------------| ,-------------.
182 * | | | | | |Sys|Func | | | | | |
183 * `-----------------------------------------------------------' `-------------'
184 */
185 [_MSL] = LAYOUT_all( /* Mac Second / System Layer */
186 RESET, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, XXXXXXX, XXXXXXX, XXXXXXX,
187 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
188 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
189 XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
190 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
191 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
192 )
193};
194
195void unlock_win_key(void) {
196 win_key_locked = false;
197 mac_media_locked = false;
198 writePinHigh(LED_WIN_LOCK_PIN);
199}
200
201void toggle_lock_win_key(void) {
202 win_key_locked = !win_key_locked;
203 writePin(LED_WIN_LOCK_PIN, !win_key_locked);
204}
205
206void toggle_lock_media_key(void) {
207 mac_media_locked = !mac_media_locked;
208 writePin(LED_WIN_LOCK_PIN, !mac_media_locked);
209}
210
211#ifdef CONSOLE_ENABLE
212void dprint_global_layers(void) {
213 dprint("Global Layers:");
214 if (IS_LAYER_ON(_WFL)) { dprint(" _WFL"); }
215 if (IS_LAYER_ON(_WSL)) { dprint(" _WSL"); }
216 if (IS_LAYER_ON(_MFL)) { dprint(" _MFL"); }
217 if (IS_LAYER_ON(_MSL)) { dprint(" _MSL"); }
218 dprintf("\n");
219}
220
221void dprint_layers(layer_state_t state) {
222 dprint("Layers:");
223 if (IS_LAYER_ON_STATE(state, _WFL)) { dprint(" _WFL"); }
224 if (IS_LAYER_ON_STATE(state, _WSL)) { dprint(" _WSL"); }
225 if (IS_LAYER_ON_STATE(state, _MFL)) { dprint(" _MFL"); }
226 if (IS_LAYER_ON_STATE(state, _MSL)) { dprint(" _MSL"); }
227 dprintf("\n");
228}
229#endif
230
231layer_state_t default_layer_state_set_user(layer_state_t state) {
232#ifdef CONSOLE_ENABLE
233 dprintf("default_layer_state_set_user: 0x%x\n", state);
234 dprint_global_layers();
235#endif
236 // Disable windows key lock on default layer transition.
237 unlock_win_key();
238 win_appkey_pressed = false;
239 mac_fnkey_pressed = false;
240 writePin(LED_MR_LOCK_PIN, !IS_LAYER_ON_STATE(state, ALT_LAYOUT));
241 return state;
242}
243
244layer_state_t layer_state_set_user(layer_state_t state) {
245#ifdef CONSOLE_ENABLE
246 dprintf("layer_state_set_user: 0x%x\n", state);
247 dprint_layers(state);
248#endif
249 return state;
250}
251
252bool process_record_user(uint16_t keycode, keyrecord_t *record) {
253 switch (keycode) {
254 case KC_TGUI:
255 if (!record->event.pressed) {
256 // Toggle GUI lock on key release
257 toggle_lock_win_key();
258 }
259 break;
260 case KC_TMED:
261 // Only trigger when Fn key is also held down, to avoid accidental unlock.
262 if (!mac_fnkey_pressed) { return false; }
263 if (!record->event.pressed) {
264 // Toggle Media Lock on key release
265 toggle_lock_media_key();
266 }
267 break;
268 case KC_LGUI:
269 if (win_key_locked) { return false; }
270 break;
271 case KC_WFN:
272 // Like MO(_WFL), but also enables _WSL if KC_APP is already pressed down.
273 if (record->event.pressed) {
274 layer_on(_WFL);
275 if (win_appkey_pressed) {
276 // Also enable Secondary layer if App key is being held down.
277 win_appkey_pressed = false;
278 layer_on(_WSL);
279 }
280 } else {
281 if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
282 if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
283 }
284 break;
285 case KC_APP:
286 if (record->event.pressed) {
287 // Don't actually press down the app menu key
288 win_appkey_pressed = true;
289 } else {
290 if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
291 if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
292 if (win_appkey_pressed) {
293 win_appkey_pressed = false;
294 // Tap the KC_APP key on key release.
295 tap_code(KC_APP);
296 }
297 }
298 return false;
299 break;
300 case KC_MFN:
301 // Mac Fn key. Emit Fn keycode, and also transition layers similar to KC_WFN.
302 if (record->event.pressed) {
303 mac_fnkey_pressed = true;
304 layer_on(_MFL);
305 // Also enable Secondary layer if Right-Alt key is being held down.
306 if (get_mods() & MOD_BIT(KC_RALT)) {
307 layer_on(_MSL);
308 }
309 } else {
310 mac_fnkey_pressed = false;
311 if (!mac_media_locked) {
312 if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
313 if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
314 }
315 }
316 break;
317 case KC_RALT:
318 // Disable MSL/WFL layer on key-up.
319 if (!record->event.pressed) {
320 if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
321 if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
322 }
323 break;
324 case MO_WSL:
325 if (record->event.pressed) {
326 layer_on(_WSL);
327 } else {
328 if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
329 if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
330 }
331 break;
332 case MO_MSL:
333 if (record->event.pressed) {
334 layer_on(_MSL);
335 } else {
336 if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
337 if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
338 }
339 break;
340 case DF_W2MBL:
341 if (!record->event.pressed) {
342 // Switch base layer, but preserve first/secondary layers.
343 default_layer_set(1UL<<_MBL);
344 layer_state_set(1UL<<_MFL | 1UL<<_MSL);
345 }
346 break;
347 case DF_M2WBL:
348 if (!record->event.pressed) {
349 // Switch base layer, but preserve first/secondary layers.
350 default_layer_set(1UL<<_WBL);
351 layer_state_set(1UL<<_WFL | 1UL<<_WSL);
352 }
353 break;
354 case RESET:
355 if (record->event.pressed) {
356 // Flash LEDs to indicate bootloader mode is enabled.
357 on_all_leds();
358 }
359 break;
360 }
361 return true;
362}
363
364void keyboard_post_init_user(void) {
365 default_layer_set(1UL<<DEFAULT_LAYOUT);
366}
367
diff --git a/keyboards/durgod/k320/keymaps/via/keymap.c b/keyboards/durgod/k320/keymaps/via/keymap.c
deleted file mode 100644
index fc46e3860..000000000
--- a/keyboards/durgod/k320/keymaps/via/keymap.c
+++ /dev/null
@@ -1,90 +0,0 @@
1/* Copyright 2021 Maxime Coirault
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// Layer shorthand
19enum _layer {
20 _BASE,
21 _FUNC,
22 _LAYER3,
23 _LAYER4
24};
25
26const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
27 /* Keymap _BASE: Base Layer (Default Layer)
28 * ,-----------------------------------------------------------. ,--------------.
29 * |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11|f12| |Prnt|ScLk|Paus|
30 * |-----------------------------------------------------------| |--------------|
31 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backsp | | Ins|Home|PgUp|
32 * |-----------------------------------------------------------| |--------------|
33 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | Del| End|PgDn|
34 * |------------------------------------------------------ Ret | `--------------'
35 * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| |
36 * |-----------------------------------------------------------| ,----.
37 * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | | Up |
38 * |-----------------------------------------------------------| ,-------------.
39 * |Ctrl|Gui |Alt | Space |Alt | Fn |App |Ctrl| |Lft| Dn |Rig |
40 * `-----------------------------------------------------------' `-------------'
41 */
42 [_BASE] = LAYOUT_all( /* Base Layer */
43 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_PSCR, KC_SLCK, KC_PAUS,
44 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_INS, KC_HOME, KC_PGUP,
45 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, KC_DEL, KC_END, KC_PGDN,
46 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_NUHS, KC_ENT,
47 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
48 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FUNC),KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
49 ),
50 /* Keymap _FUNC: Function Layer
51 * ,-----------------------------------------------------------. ,--------------.
52 * | |Play|Stop|Prev|Next| |Mute|Vol+|Vol-| | | | | | | | | | |
53 * |-----------------------------------------------------------| |--------------|
54 * | | | | | | | | | | | | | | | | | | |
55 * |-----------------------------------------------------------| |--------------|
56 * | | | | | | | | | | | | | | | | | | |
57 * |------------------------------------------------------- | `--------------'
58 * | | | | | | | | | | | | | | |
59 * |-----------------------------------------------------------| ,----.
60 * | | | | | | | | | | | | | | | |
61 * |-----------------------------------------------------------| ,-------------.
62 * | | | | | |Func | | | | | | |
63 * `-----------------------------------------------------------' `-------------'
64 */
65 [_FUNC] = LAYOUT_all( /* Function Layer */
66 _______, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
67 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
68 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
69 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
70 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
71 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
72 ),
73 [_LAYER3] = LAYOUT_all( /* Layer 3 */
74 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
75 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
76 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
77 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
78 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
79 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
80 ),
81 [_LAYER4] = LAYOUT_all( /* Layer 4 */
82 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
83 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
84 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
85 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
86 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
87 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
88 )
89};
90
diff --git a/keyboards/durgod/k320/keymaps/via/readme.md b/keyboards/durgod/k320/keymaps/via/readme.md
deleted file mode 100644
index d1b2ac191..000000000
--- a/keyboards/durgod/k320/keymaps/via/readme.md
+++ /dev/null
@@ -1,12 +0,0 @@
1# The default keymap for Durgod Taurus K320.
2
3Layer 0 : Standard 87/88 keys TKL layout
4
5Layer 1 : Media control
6- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7
7
8## Supported PCBs
9
10This firmware was tested on a Durgod K320 ISO with the PCB marked "DGK320ST-Single v1.0 HS20181227".
11
12The pcb features switch holes for ANSI layout, so this firmware might be compatible with with the Durgod K320 ANSI.
diff --git a/keyboards/durgod/k320/keymaps/via/rules.mk b/keyboards/durgod/k320/keymaps/via/rules.mk
deleted file mode 100644
index 8815b6a0a..000000000
--- a/keyboards/durgod/k320/keymaps/via/rules.mk
+++ /dev/null
@@ -1,4 +0,0 @@
1OPT_DEFS += -DWINLOCK_DISABLED
2
3VIA_ENABLE = yes
4LTO_ENABLE = yes
diff --git a/keyboards/durgod/k320/readme.md b/keyboards/durgod/k320/readme.md
index 551a29282..b8ca5b6da 100644
--- a/keyboards/durgod/k320/readme.md
+++ b/keyboards/durgod/k320/readme.md
@@ -1,57 +1,4 @@
1# K320 1# K320
2 2
3This is a standard off-the-shelf Durgod Taurus K320 TKL (87/88-key) keyboard without backlight. 3See: [K320](../k3x0/k320/readme.md)
4 4
5* Keyboard Maintainer: [dkjer](https://github.com/dkjer)
6* Hardware Supported: Durgod Taurus K320 board with STM32F070RBT6
7* Hardware Availability: https://www.durgod.com/page9?product_id=47&_l=en
8
9## Instructions
10
11### Build
12
13Make command example for this keyboard (after setting up your build environment):
14
15 make durgod/k320:default
16
17Flashing example for this keyboard:
18
19 make durgod/k320:default:flash
20
21See 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).
22
23### Initial Flash
24
25For first Flashing from initial Stock's Firmware
26
271. Back up original Firmware Image:
28- Unplug
29- Short Boot0 to Vdd (See below)
30- Plug In USB
31- Make a Flash Image's Backup in case you wanted to restore the Keyboard to Stock's Image:
32 - Using DFUseDemo.exe from ST's STSW-STM32080: https://www.st.com/en/development-tools/stsw-stm32080.html
33 - Using dfu-util:
34
35 dfu-util --list
36 dfu-util --alt 0 --dfuse-address 0x08000000 --upload ${OLD_STOCK_BIN}
37
382. Flash the QMK Firmware Image.
39- Put board into Bootloader mode, using the same method as when backing up the original Firmware (above)
40- Here are a few options for performing the initial Flash:
41 - Using [QMK Toolbox](https://github.com/qmk/qmk_toolbox)
42 - Using DFuseDemo.exe if STTub30 driver is used.
43 - Using dfu-util:
44
45 dfu-util --alt 0 --dfuse-address 0x08000000 --download ${NEW_QMK_BIN}
46
47You can short Boot0 to Vdd by shorting R21 to C27 on the sides closest to the processor, as shown:
48
49<img src="https://i.imgur.com/hvDnw5a.jpg" width="520" height="693" alt="Shorting Boot0 to Vdd on K320">
50
51### Subsequent Flashing
52
53For repeating Flashing you can use BootMagic:
54- BootMagic Lite has been enabled with Assigned "Esc" key
55- Unplug USB Cable
56- Holding Esc Button
57- Plug in USB Cable, Keyboard should be in ST-Bootloader state
diff --git a/keyboards/durgod/k320/rules.mk b/keyboards/durgod/k320/rules.mk
index e6f0007fd..d3f7b1194 100644
--- a/keyboards/durgod/k320/rules.mk
+++ b/keyboards/durgod/k320/rules.mk
@@ -1,29 +1 @@
1# MCU name DEFAULT_FOLDER=durgod/k3x0/k320
2# Actually F070, but close enough
3MCU = STM32F072
4BOARD = DURGOD_STM32_F070
5
6# Bootloader selection
7BOOTLOADER = stm32-dfu
8
9# Do not put the microcontroller into power saving mode
10OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
11
12# Build Options
13# change yes to no to disable
14#
15BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
16MOUSEKEY_ENABLE = no # Mouse keys
17EXTRAKEY_ENABLE = yes # Audio control and System control
18CONSOLE_ENABLE = no # Console for debug
19COMMAND_ENABLE = no # Commands for debug and configuration
20# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
21SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
22# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
23NKRO_ENABLE = yes # USB Nkey Rollover
24BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
25RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
26BLUETOOTH_ENABLE = no # Enable Bluetooth
27AUDIO_ENABLE = no # Audio output
28
29LAYOUTS = tkl_ansi tkl_iso
diff --git a/keyboards/durgod/k320/config.h b/keyboards/durgod/k3x0/config.h
index 323a9ccff..ef73a7101 100644
--- a/keyboards/durgod/k320/config.h
+++ b/keyboards/durgod/k3x0/config.h
@@ -1,4 +1,5 @@
1/* Copyright 2021 kuenhlee and Don Kjer 1/* Copyright 2021 kuenhlee, Don Kjer, Tyler Tidman
2 * Copyright 2021 Simon Arlott
2 * 3 *
3 * This program is free software: you can redistribute it and/or modify 4 * 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 * it under the terms of the GNU General Public License as published by
@@ -20,16 +21,11 @@
20 21
21/* USB Device descriptor parameter */ 22/* USB Device descriptor parameter */
22#define VENDOR_ID 0xD60D 23#define VENDOR_ID 0xD60D
23#define PRODUCT_ID 0x3200
24#define DEVICE_VER 0x0001
25#define MANUFACTURER Hoksi Technology 24#define MANUFACTURER Hoksi Technology
26#define PRODUCT DURGOD Taurus K320 (QMK)
27 25
28/* key matrix size */ 26/* key matrix size (rows in specific keyboard variant) */
29#define MATRIX_ROWS 7
30#define MATRIX_COLS 16 27#define MATRIX_COLS 16
31 28
32#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4, A5, A6 }
33#define MATRIX_COL_PINS { C4, C5, B0, B1, B2, B10, B11, B12, B13, B14, B15, C6, C7, C10, C11, C12 } 29#define MATRIX_COL_PINS { C4, C5, B0, B1, B2, B10, B11, B12, B13, B14, B15, C6, C7, C10, C11, C12 }
34 30
35/* COL2ROW, ROW2COL*/ 31/* COL2ROW, ROW2COL*/
@@ -42,6 +38,7 @@
42 38
43/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ 39/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
44#define DEBOUNCE 5 40#define DEBOUNCE 5
41// #define USB_POLLING_INTERVAL_MS 1
45 42
46/* Bootmagic Lite key configuration */ 43/* Bootmagic Lite key configuration */
47#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE 44#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
@@ -54,3 +51,6 @@
54#define LED_WIN_LOCK_PIN A9 51#define LED_WIN_LOCK_PIN A9
55#define LED_MR_LOCK_PIN A10 52#define LED_MR_LOCK_PIN A10
56#define LED_PIN_ON_STATE 0 53#define LED_PIN_ON_STATE 0
54
55/* Original hardware "reset" button on pin D2 */
56#define HARDWARE_RESET_PIN D2
diff --git a/keyboards/durgod/k3x0/halconf.h b/keyboards/durgod/k3x0/halconf.h
new file mode 100644
index 000000000..fa20fe30a
--- /dev/null
+++ b/keyboards/durgod/k3x0/halconf.h
@@ -0,0 +1,22 @@
1/* Copyright 2021 Simon Arlott
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#pragma once
18
19#define HAL_USE_PAL TRUE
20#define PAL_USE_CALLBACKS TRUE
21
22#include_next <halconf.h>
diff --git a/keyboards/durgod/k3x0/k310/base/config.h b/keyboards/durgod/k3x0/k310/base/config.h
new file mode 100644
index 000000000..025369acd
--- /dev/null
+++ b/keyboards/durgod/k3x0/k310/base/config.h
@@ -0,0 +1,23 @@
1/* Copyright 2021 Don Kjer
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#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define PRODUCT DURGOD Taurus K310 (QMK)
23#define DEVICE_VER 0x0001 // Base (no backlight)
diff --git a/keyboards/durgod/k3x0/k310/base/readme.md b/keyboards/durgod/k3x0/k310/base/readme.md
new file mode 100644
index 000000000..9f4654043
--- /dev/null
+++ b/keyboards/durgod/k3x0/k310/base/readme.md
@@ -0,0 +1,27 @@
1# K310
2
3This is a standard off-the-shelf Durgod Taurus K310 full-sized 104/105-key
4keyboard without backlight. This supports both the ANSI and ISO variants.
5
6* Keyboard Maintainers: [dkjer](https://github.com/dkjer) and [tylert](https://github.com/tylert)
7* Hardware Supported: Durgod Taurus K310 board with STM32F070RBT6
8* Hardware Availability: K310 https://www.durgod.com/page9?product_id=53&_l=en
9
10## Instructions
11
12### Build
13
14Make command example for this keyboard (after setting up your build environment):
15
16 make durgod/k310:default
17
18Flashing example for this keyboard:
19
20 make durgod/k310:default:flash
21
22See 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).
23
24### Initial Flash
25
26Instructions for Flashing from initial Stock Firmware:
27* [Initial Flashing](../../readme.md#initial-flash)
diff --git a/keyboards/durgod/k3x0/k310/base/rules.mk b/keyboards/durgod/k3x0/k310/base/rules.mk
new file mode 100644
index 000000000..323c12fc6
--- /dev/null
+++ b/keyboards/durgod/k3x0/k310/base/rules.mk
@@ -0,0 +1 @@
# see common rules.mk
diff --git a/keyboards/durgod/k3x0/k310/config.h b/keyboards/durgod/k3x0/k310/config.h
new file mode 100644
index 000000000..1eadb8e52
--- /dev/null
+++ b/keyboards/durgod/k3x0/k310/config.h
@@ -0,0 +1,36 @@
1/* Copyright 2021 Don Kjer and Tyler Tidman
2 * Copyright 2021 Simon Arlott
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along 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 PRODUCT_ID 0x3100
24// Taurus K310 models:
25//#define DEVICE_VER 0x0001 // Base (no backlight)
26//#define DEVICE_VER 0x0002 // Corona (white led matrix)
27//#define DEVICE_VER 0x0003 // Aurora (red & blue led matrix)
28//#define DEVICE_VER 0x0004 // Nebula (rgb led matrix)
29
30/* key matrix size (cols in generic keyboard config) */
31#define MATRIX_ROWS 8
32
33#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4, A5, A6, A7 }
34
35/* LED indicator pins */
36#define LED_NUM_LOCK_PIN C8
diff --git a/keyboards/durgod/k320/info.json b/keyboards/durgod/k3x0/k310/info.json
index 6c67c3d45..35cd59bec 100644
--- a/keyboards/durgod/k320/info.json
+++ b/keyboards/durgod/k3x0/k310/info.json
@@ -1,11 +1,11 @@
1{ 1{
2 "keyboard_name": "DURGOD Taurus K320", 2 "keyboard_name": "DURGOD Taurus K310",
3 "url": "https://www.durgod.com/page9?product_id=47&_l=en", 3 "url": "https://www.durgod.com/page9?product_id=53&_l=en",
4 "maintainer": "dkjer", 4 "maintainer": "tylert",
5 "width": 18.25, 5 "width": 22.5,
6 "height": 6.5, 6 "height": 6.5,
7 "layouts": { 7 "layouts": {
8 "LAYOUT_tkl_ansi": { 8 "LAYOUT_fullsize_ansi": {
9 "layout": [ 9 "layout": [
10 { "label": "Esc", "x": 0, "y": 0 }, 10 { "label": "Esc", "x": 0, "y": 0 },
11 { "label": "F1", "x": 2, "y": 0 }, 11 { "label": "F1", "x": 2, "y": 0 },
@@ -41,6 +41,10 @@
41 { "label": "Insert", "x": 15.25, "y": 1.5 }, 41 { "label": "Insert", "x": 15.25, "y": 1.5 },
42 { "label": "Home", "x": 16.25, "y": 1.5 }, 42 { "label": "Home", "x": 16.25, "y": 1.5 },
43 { "label": "PgUp", "x": 17.25, "y": 1.5 }, 43 { "label": "PgUp", "x": 17.25, "y": 1.5 },
44 { "label": "Num Lock", "x": 18.5, "y": 1.5 },
45 { "label": "/", "x": 19.5, "y": 1.5 },
46 { "label": "*", "x": 20.5, "y": 1.5 },
47 { "label": "-", "x": 21.5, "y": 1.5 },
44 48
45 { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, 49 { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 },
46 { "label": "Q", "x": 1.5, "y": 2.5 }, 50 { "label": "Q", "x": 1.5, "y": 2.5 },
@@ -59,6 +63,10 @@
59 { "label": "Delete", "x": 15.25, "y": 2.5 }, 63 { "label": "Delete", "x": 15.25, "y": 2.5 },
60 { "label": "End", "x": 16.25, "y": 2.5 }, 64 { "label": "End", "x": 16.25, "y": 2.5 },
61 { "label": "PgDn", "x": 17.25, "y": 2.5 }, 65 { "label": "PgDn", "x": 17.25, "y": 2.5 },
66 { "label": "7", "x": 18.5, "y": 2.5 },
67 { "label": "8", "x": 19.5, "y": 2.5 },
68 { "label": "9", "x": 20.5, "y": 2.5 },
69 { "label": "+", "x": 21.5, "y": 2.5, "h": 2 },
62 70
63 { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, 71 { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 },
64 { "label": "A", "x": 1.75, "y": 3.5 }, 72 { "label": "A", "x": 1.75, "y": 3.5 },
@@ -73,6 +81,9 @@
73 { "label": ":", "x": 10.75, "y": 3.5 }, 81 { "label": ":", "x": 10.75, "y": 3.5 },
74 { "label": "\"", "x": 11.75, "y": 3.5 }, 82 { "label": "\"", "x": 11.75, "y": 3.5 },
75 { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, 83 { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 },
84 { "label": "4", "x": 18.5, "y": 3.5 },
85 { "label": "5", "x": 19.5, "y": 3.5 },
86 { "label": "6", "x": 20.5, "y": 3.5 },
76 87
77 { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 }, 88 { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 },
78 { "label": "Z", "x": 2.25, "y": 4.5 }, 89 { "label": "Z", "x": 2.25, "y": 4.5 },
@@ -87,6 +98,10 @@
87 { "label": "?", "x": 11.25, "y": 4.5 }, 98 { "label": "?", "x": 11.25, "y": 4.5 },
88 { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, 99 { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 },
89 { "label": "\u2191", "x": 16.25, "y": 4.5 }, 100 { "label": "\u2191", "x": 16.25, "y": 4.5 },
101 { "label": "1", "x": 18.5, "y": 4.5 },
102 { "label": "2", "x": 19.5, "y": 4.5 },
103 { "label": "3", "x": 20.5, "y": 4.5 },
104 { "label": "Enter", "x": 21.5, "y": 4.5, "h": 2 },
90 105
91 { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, 106 { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 },
92 { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, 107 { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 },
@@ -98,10 +113,12 @@
98 { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, 113 { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 },
99 { "label": "\u2190", "x": 15.25, "y": 5.5 }, 114 { "label": "\u2190", "x": 15.25, "y": 5.5 },
100 { "label": "\u2193", "x": 16.25, "y": 5.5 }, 115 { "label": "\u2193", "x": 16.25, "y": 5.5 },
101 { "label": "\u2192", "x": 17.25, "y": 5.5 } 116 { "label": "\u2192", "x": 17.25, "y": 5.5 },
117 { "label": "0", "x": 18.5, "y": 5.5, "w": 2 },
118 { "label": ".", "x": 20.5, "y": 5.5 }
102 ] 119 ]
103 }, 120 },
104 "LAYOUT_tkl_iso": { 121 "LAYOUT_fullsize_iso": {
105 "layout": [ 122 "layout": [
106 { "label": "Esc", "x": 0, "y": 0 }, 123 { "label": "Esc", "x": 0, "y": 0 },
107 { "label": "F1", "x": 2, "y": 0 }, 124 { "label": "F1", "x": 2, "y": 0 },
@@ -137,6 +154,10 @@
137 { "label": "Insert", "x": 15.25, "y": 1.5 }, 154 { "label": "Insert", "x": 15.25, "y": 1.5 },
138 { "label": "Home", "x": 16.25, "y": 1.5 }, 155 { "label": "Home", "x": 16.25, "y": 1.5 },
139 { "label": "PgUp", "x": 17.25, "y": 1.5 }, 156 { "label": "PgUp", "x": 17.25, "y": 1.5 },
157 { "label": "Num Lock", "x": 18.5, "y": 1.5 },
158 { "label": "/", "x": 19.5, "y": 1.5 },
159 { "label": "*", "x": 20.5, "y": 1.5 },
160 { "label": "-", "x": 21.5, "y": 1.5 },
140 161
141 { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, 162 { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 },
142 { "label": "Q", "x": 1.5, "y": 2.5 }, 163 { "label": "Q", "x": 1.5, "y": 2.5 },
@@ -154,6 +175,10 @@
154 { "label": "Delete", "x": 15.25, "y": 2.5 }, 175 { "label": "Delete", "x": 15.25, "y": 2.5 },
155 { "label": "End", "x": 16.25, "y": 2.5 }, 176 { "label": "End", "x": 16.25, "y": 2.5 },
156 { "label": "PgDn", "x": 17.25, "y": 2.5 }, 177 { "label": "PgDn", "x": 17.25, "y": 2.5 },
178 { "label": "7", "x": 18.5, "y": 2.5 },
179 { "label": "8", "x": 19.5, "y": 2.5 },
180 { "label": "9", "x": 20.5, "y": 2.5 },
181 { "label": "+", "x": 21.5, "y": 2.5, "h": 2 },
157 182
158 { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, 183 { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 },
159 { "label": "A", "x": 1.75, "y": 3.5 }, 184 { "label": "A", "x": 1.75, "y": 3.5 },
@@ -169,6 +194,9 @@
169 { "label": "\"", "x": 11.75, "y": 3.5 }, 194 { "label": "\"", "x": 11.75, "y": 3.5 },
170 { "label": "#", "x": 12.75, "y": 3.5 }, 195 { "label": "#", "x": 12.75, "y": 3.5 },
171 { "label": "Enter", "x": 13.75, "y": 2.5, "w": 1.25, "h": 2 }, 196 { "label": "Enter", "x": 13.75, "y": 2.5, "w": 1.25, "h": 2 },
197 { "label": "4", "x": 18.5, "y": 3.5 },
198 { "label": "5", "x": 19.5, "y": 3.5 },
199 { "label": "6", "x": 20.5, "y": 3.5 },
172 200
173 { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, 201 { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 },
174 { "label": "\\", "x": 1.25, "y": 4.5 }, 202 { "label": "\\", "x": 1.25, "y": 4.5 },
@@ -184,6 +212,10 @@
184 { "label": "?", "x": 11.25, "y": 4.5 }, 212 { "label": "?", "x": 11.25, "y": 4.5 },
185 { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, 213 { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 },
186 { "label": "\u2191", "x": 16.25, "y": 4.5 }, 214 { "label": "\u2191", "x": 16.25, "y": 4.5 },
215 { "label": "1", "x": 18.5, "y": 4.5 },
216 { "label": "2", "x": 19.5, "y": 4.5 },
217 { "label": "3", "x": 20.5, "y": 4.5 },
218 { "label": "Enter", "x": 21.5, "y": 4.5, "h": 2 },
187 219
188 { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, 220 { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 },
189 { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, 221 { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 },
@@ -195,7 +227,9 @@
195 { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, 227 { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 },
196 { "label": "\u2190", "x": 15.25, "y": 5.5 }, 228 { "label": "\u2190", "x": 15.25, "y": 5.5 },
197 { "label": "\u2193", "x": 16.25, "y": 5.5 }, 229 { "label": "\u2193", "x": 16.25, "y": 5.5 },
198 { "label": "\u2192", "x": 17.25, "y": 5.5 } 230 { "label": "\u2192", "x": 17.25, "y": 5.5 },
231 { "label": "0", "x": 18.5, "y": 5.5, "w": 2 },
232 { "label": ".", "x": 20.5, "y": 5.5 }
199 ] 233 ]
200 }, 234 },
201 "LAYOUT_all": { 235 "LAYOUT_all": {
@@ -234,6 +268,10 @@
234 { "label": "Insert", "x": 15.25, "y": 1.5 }, 268 { "label": "Insert", "x": 15.25, "y": 1.5 },
235 { "label": "Home", "x": 16.25, "y": 1.5 }, 269 { "label": "Home", "x": 16.25, "y": 1.5 },
236 { "label": "PgUp", "x": 17.25, "y": 1.5 }, 270 { "label": "PgUp", "x": 17.25, "y": 1.5 },
271 { "label": "Num Lock", "x": 18.5, "y": 1.5 },
272 { "label": "/", "x": 19.5, "y": 1.5 },
273 { "label": "*", "x": 20.5, "y": 1.5 },
274 { "label": "-", "x": 21.5, "y": 1.5 },
237 275
238 { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, 276 { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 },
239 { "label": "Q", "x": 1.5, "y": 2.5 }, 277 { "label": "Q", "x": 1.5, "y": 2.5 },
@@ -252,6 +290,10 @@
252 { "label": "Delete", "x": 15.25, "y": 2.5 }, 290 { "label": "Delete", "x": 15.25, "y": 2.5 },
253 { "label": "End", "x": 16.25, "y": 2.5 }, 291 { "label": "End", "x": 16.25, "y": 2.5 },
254 { "label": "PgDn", "x": 17.25, "y": 2.5 }, 292 { "label": "PgDn", "x": 17.25, "y": 2.5 },
293 { "label": "7", "x": 18.5, "y": 2.5 },
294 { "label": "8", "x": 19.5, "y": 2.5 },
295 { "label": "9", "x": 20.5, "y": 2.5 },
296 { "label": "+", "x": 21.5, "y": 2.5, "h": 2 },
255 297
256 { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, 298 { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 },
257 { "label": "A", "x": 1.75, "y": 3.5 }, 299 { "label": "A", "x": 1.75, "y": 3.5 },
@@ -267,6 +309,9 @@
267 { "label": "\"", "x": 11.75, "y": 3.5 }, 309 { "label": "\"", "x": 11.75, "y": 3.5 },
268 { "label": "#", "x": 12.75, "y": 3.5 }, 310 { "label": "#", "x": 12.75, "y": 3.5 },
269 { "label": "Enter", "x": 13.75, "y": 3.5, "w": 1.25 }, 311 { "label": "Enter", "x": 13.75, "y": 3.5, "w": 1.25 },
312 { "label": "4", "x": 18.5, "y": 3.5 },
313 { "label": "5", "x": 19.5, "y": 3.5 },
314 { "label": "6", "x": 20.5, "y": 3.5 },
270 315
271 { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, 316 { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 },
272 { "label": "\\", "x": 1.25, "y": 4.5 }, 317 { "label": "\\", "x": 1.25, "y": 4.5 },
@@ -282,6 +327,10 @@
282 { "label": "?", "x": 11.25, "y": 4.5 }, 327 { "label": "?", "x": 11.25, "y": 4.5 },
283 { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, 328 { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 },
284 { "label": "\u2191", "x": 16.25, "y": 4.5 }, 329 { "label": "\u2191", "x": 16.25, "y": 4.5 },
330 { "label": "1", "x": 18.5, "y": 4.5 },
331 { "label": "2", "x": 19.5, "y": 4.5 },
332 { "label": "3", "x": 20.5, "y": 4.5 },
333 { "label": "Enter", "x": 21.5, "y": 4.5, "h": 2 },
285 334
286 { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, 335 { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 },
287 { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, 336 { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 },
@@ -293,7 +342,9 @@
293 { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, 342 { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 },
294 { "label": "\u2190", "x": 15.25, "y": 5.5 }, 343 { "label": "\u2190", "x": 15.25, "y": 5.5 },
295 { "label": "\u2193", "x": 16.25, "y": 5.5 }, 344 { "label": "\u2193", "x": 16.25, "y": 5.5 },
296 { "label": "\u2192", "x": 17.25, "y": 5.5 } 345 { "label": "\u2192", "x": 17.25, "y": 5.5 },
346 { "label": "0", "x": 18.5, "y": 5.5, "w": 2 },
347 { "label": ".", "x": 20.5, "y": 5.5 }
297 ] 348 ]
298 } 349 }
299 } 350 }
diff --git a/keyboards/durgod/k3x0/k310/k310.h b/keyboards/durgod/k3x0/k310/k310.h
new file mode 100644
index 000000000..2d82ee155
--- /dev/null
+++ b/keyboards/durgod/k3x0/k310/k310.h
@@ -0,0 +1,78 @@
1/* Copyright 2021 Don Kjer and Tyler Tidman
2 * Copyright 2021 Simon Arlott
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#define XXX KC_NO
21
22// This a shortcut to help you visually see your layout.
23#define LAYOUT_fullsize_ansi( \
24 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
25 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, K6A, K69, K68, K67, \
26 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, K7A, K79, K78, K6B, \
27 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4E, K7E, K7D, K7C, \
28 K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, K6E, K6D, K6C, K7B, \
29 K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F, K7F, K77 \
30) { \
31 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
32 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \
33 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \
34 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \
35 { K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \
36 { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \
37 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \
38 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F } \
39}
40
41// This a shortcut to help you visually see your layout.
42#define LAYOUT_fullsize_iso( \
43 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
44 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, K6A, K69, K68, K67, \
45 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K3D, K3E, K3F, K7A, K79, K78, K6B, \
46 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4E, K7E, K7D, K7C, \
47 K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, K6E, K6D, K6C, K7B, \
48 K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F, K7F, K77 \
49) { \
50 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
51 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \
52 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX, K2E, K2F }, \
53 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
54 { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \
55 { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \
56 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \
57 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F } \
58}
59
60// This a shortcut to help you visually see your layout.
61#define LAYOUT_all( \
62 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
63 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, K6A, K69, K68, K67, \
64 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, K7A, K79, K78, K6B, \
65 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4E, K7E, K7D, K7C, \
66 K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, K6E, K6D, K6C, K7B, \
67 K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F, K7F, K77 \
68) { \
69 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
70 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \
71 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \
72 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
73 { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \
74 { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \
75 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \
76 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F } \
77}
78
diff --git a/keyboards/durgod/k3x0/k310/readme.md b/keyboards/durgod/k3x0/k310/readme.md
new file mode 100644
index 000000000..bee903b88
--- /dev/null
+++ b/keyboards/durgod/k3x0/k310/readme.md
@@ -0,0 +1,10 @@
1# Taurus K310
2
3This code is shared between all K310 variants. Currently only the base model with no backlight is supported.
4
5* Keyboard Maintainers: [dkjer](https://github.com/dkjer) and [tylert](https://github.com/tylert)
6* Hardware Supported: Durgod Taurus K310 board with STM32F070RBT6
7* Hardware Availability: Base https://www.durgod.com/page9?product_id=53&_l=en
8
9Instructions for building the K310 firmware can be found here:
10* [No Backlight](base/readme.md)
diff --git a/keyboards/durgod/k3x0/k310/rules.mk b/keyboards/durgod/k3x0/k310/rules.mk
new file mode 100644
index 000000000..2df1aff9c
--- /dev/null
+++ b/keyboards/durgod/k3x0/k310/rules.mk
@@ -0,0 +1,4 @@
1# Default to the base model
2DEFAULT_FOLDER=durgod/k3x0/k310/base
3
4LAYOUTS = fullsize_ansi fullsize_iso
diff --git a/keyboards/durgod/k3x0/k320/base/config.h b/keyboards/durgod/k3x0/k320/base/config.h
new file mode 100644
index 000000000..d4eb732b9
--- /dev/null
+++ b/keyboards/durgod/k3x0/k320/base/config.h
@@ -0,0 +1,23 @@
1/* Copyright 2021 Don Kjer
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#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define PRODUCT DURGOD Taurus K320 (QMK)
23#define DEVICE_VER 0x0001 // Base (no backlight)
diff --git a/keyboards/durgod/k3x0/k320/base/readme.md b/keyboards/durgod/k3x0/k320/base/readme.md
new file mode 100644
index 000000000..8f46cc122
--- /dev/null
+++ b/keyboards/durgod/k3x0/k320/base/readme.md
@@ -0,0 +1,27 @@
1# K320
2
3This is a standard off-the-shelf Durgod Taurus K320 TKL (87/88-key)
4keyboard without backlight. This supports both the ANSI and ISO variants.
5
6* Keyboard Maintainers: [dkjer](https://github.com/dkjer) and [tylert](https://github.com/tylert)
7* Hardware Supported: Durgod Taurus K320 board with STM32F070RBT6
8* Hardware Availability: https://www.durgod.com/page9?product_id=47&_l=en
9
10## Instructions
11
12### Build
13
14Make command example for this keyboard (after setting up your build environment):
15
16 make durgod/k320:default
17
18Flashing example for this keyboard:
19
20 make durgod/k320:default:flash
21
22See 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).
23
24### Initial Flash
25
26Instructions for Flashing from initial Stock Firmware:
27* [Initial Flashing](../../readme.md#initial-flash)
diff --git a/keyboards/durgod/k3x0/k320/base/rules.mk b/keyboards/durgod/k3x0/k320/base/rules.mk
new file mode 100644
index 000000000..323c12fc6
--- /dev/null
+++ b/keyboards/durgod/k3x0/k320/base/rules.mk
@@ -0,0 +1 @@
# see common rules.mk
diff --git a/keyboards/durgod/k3x0/k320/config.h b/keyboards/durgod/k3x0/k320/config.h
new file mode 100644
index 000000000..25b4c6303
--- /dev/null
+++ b/keyboards/durgod/k3x0/k320/config.h
@@ -0,0 +1,33 @@
1/* Copyright 2021 Don Kjer and Tyler Tidman
2 * Copyright 2021 Simon Arlott
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along 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 PRODUCT_ID 0x3200
24// Taurus K320 models:
25//#define DEVICE_VER 0x0001 // Base (no backlight)
26//#define DEVICE_VER 0x0002 // Corona (white led matrix)
27//#define DEVICE_VER 0x0003 // Aurora (red & blue led matrix)
28//#define DEVICE_VER 0x0004 // Nebula (rgb led matrix)
29
30/* key matrix size (cols in generic keyboard config) */
31#define MATRIX_ROWS 7
32
33#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4, A5, A6 }
diff --git a/keyboards/durgod/k3x0/k320/info.json b/keyboards/durgod/k3x0/k320/info.json
new file mode 100644
index 000000000..d360778ed
--- /dev/null
+++ b/keyboards/durgod/k3x0/k320/info.json
@@ -0,0 +1,415 @@
1{
2 "keyboard_name": "DURGOD Taurus K320",
3 "url": "https://www.durgod.com/page9?product_id=47&_l=en",
4 "maintainer": "dkjer",
5 "width": 18.25,
6 "height": 6.5,
7 "layouts": {
8 "LAYOUT_tkl_ansi": {
9 "layout": [
10 { "label": "Esc", "x": 0, "y": 0 },
11 { "label": "F1", "x": 2, "y": 0 },
12 { "label": "F2", "x": 3, "y": 0 },
13 { "label": "F3", "x": 4, "y": 0 },
14 { "label": "F4", "x": 5, "y": 0 },
15 { "label": "F5", "x": 6.5, "y": 0 },
16 { "label": "F6", "x": 7.5, "y": 0 },
17 { "label": "F7", "x": 8.5, "y": 0 },
18 { "label": "F8", "x": 9.5, "y": 0 },
19 { "label": "F9", "x": 11, "y": 0 },
20 { "label": "F10", "x": 12, "y": 0 },
21 { "label": "F11", "x": 13, "y": 0 },
22 { "label": "F12", "x": 14, "y": 0 },
23 { "label": "PrtSc", "x": 15.25, "y": 0 },
24 { "label": "Scroll Lock", "x": 16.25, "y": 0 },
25 { "label": "Pause", "x": 17.25, "y": 0 },
26
27 { "label": "~", "x": 0, "y": 1.5 },
28 { "label": "!", "x": 1, "y": 1.5 },
29 { "label": "@", "x": 2, "y": 1.5 },
30 { "label": "#", "x": 3, "y": 1.5 },
31 { "label": "$", "x": 4, "y": 1.5 },
32 { "label": "%", "x": 5, "y": 1.5 },
33 { "label": "^", "x": 6, "y": 1.5 },
34 { "label": "&", "x": 7, "y": 1.5 },
35 { "label": "*", "x": 8, "y": 1.5 },
36 { "label": "(", "x": 9, "y": 1.5 },
37 { "label": ")", "x": 10, "y": 1.5 },
38 { "label": "_", "x": 11, "y": 1.5 },
39 { "label": "+", "x": 12, "y": 1.5 },
40 { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 },
41 { "label": "Insert", "x": 15.25, "y": 1.5 },
42 { "label": "Home", "x": 16.25, "y": 1.5 },
43 { "label": "PgUp", "x": 17.25, "y": 1.5 },
44
45 { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 },
46 { "label": "Q", "x": 1.5, "y": 2.5 },
47 { "label": "W", "x": 2.5, "y": 2.5 },
48 { "label": "E", "x": 3.5, "y": 2.5 },
49 { "label": "R", "x": 4.5, "y": 2.5 },
50 { "label": "T", "x": 5.5, "y": 2.5 },
51 { "label": "Y", "x": 6.5, "y": 2.5 },
52 { "label": "U", "x": 7.5, "y": 2.5 },
53 { "label": "I", "x": 8.5, "y": 2.5 },
54 { "label": "O", "x": 9.5, "y": 2.5 },
55 { "label": "P", "x": 10.5, "y": 2.5 },
56 { "label": "{", "x": 11.5, "y": 2.5 },
57 { "label": "}", "x": 12.5, "y": 2.5 },
58 { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 },
59 { "label": "Delete", "x": 15.25, "y": 2.5 },
60 { "label": "End", "x": 16.25, "y": 2.5 },
61 { "label": "PgDn", "x": 17.25, "y": 2.5 },
62
63 { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 },
64 { "label": "A", "x": 1.75, "y": 3.5 },
65 { "label": "S", "x": 2.75, "y": 3.5 },
66 { "label": "D", "x": 3.75, "y": 3.5 },
67 { "label": "F", "x": 4.75, "y": 3.5 },
68 { "label": "G", "x": 5.75, "y": 3.5 },
69 { "label": "H", "x": 6.75, "y": 3.5 },
70 { "label": "J", "x": 7.75, "y": 3.5 },
71 { "label": "K", "x": 8.75, "y": 3.5 },
72 { "label": "L", "x": 9.75, "y": 3.5 },
73 { "label": ":", "x": 10.75, "y": 3.5 },
74 { "label": "\"", "x": 11.75, "y": 3.5 },
75 { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 },
76
77 { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 },
78 { "label": "Z", "x": 2.25, "y": 4.5 },
79 { "label": "X", "x": 3.25, "y": 4.5 },
80 { "label": "C", "x": 4.25, "y": 4.5 },
81 { "label": "V", "x": 5.25, "y": 4.5 },
82 { "label": "B", "x": 6.25, "y": 4.5 },
83 { "label": "N", "x": 7.25, "y": 4.5 },
84 { "label": "M", "x": 8.25, "y": 4.5 },
85 { "label": "<", "x": 9.25, "y": 4.5 },
86 { "label": ">", "x": 10.25, "y": 4.5 },
87 { "label": "?", "x": 11.25, "y": 4.5 },
88 { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 },
89 { "label": "\u2191", "x": 16.25, "y": 4.5 },
90
91 { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 },
92 { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 },
93 { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 },
94 { "x": 3.75, "y": 5.5, "w": 6.25 },
95 { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 },
96 { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 },
97 { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 },
98 { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 },
99 { "label": "\u2190", "x": 15.25, "y": 5.5 },
100 { "label": "\u2193", "x": 16.25, "y": 5.5 },
101 { "label": "\u2192", "x": 17.25, "y": 5.5 }
102 ]
103 },
104 "LAYOUT_tkl_iso": {
105 "layout": [
106 { "label": "Esc", "x": 0, "y": 0 },
107 { "label": "F1", "x": 2, "y": 0 },
108 { "label": "F2", "x": 3, "y": 0 },
109 { "label": "F3", "x": 4, "y": 0 },
110 { "label": "F4", "x": 5, "y": 0 },
111 { "label": "F5", "x": 6.5, "y": 0 },
112 { "label": "F6", "x": 7.5, "y": 0 },
113 { "label": "F7", "x": 8.5, "y": 0 },
114 { "label": "F8", "x": 9.5, "y": 0 },
115 { "label": "F9", "x": 11, "y": 0 },
116 { "label": "F10", "x": 12, "y": 0 },
117 { "label": "F11", "x": 13, "y": 0 },
118 { "label": "F12", "x": 14, "y": 0 },
119 { "label": "PrtSc", "x": 15.25, "y": 0 },
120 { "label": "Scroll Lock", "x": 16.25, "y": 0 },
121 { "label": "Pause", "x": 17.25, "y": 0 },
122
123 { "label": "~", "x": 0, "y": 1.5 },
124 { "label": "!", "x": 1, "y": 1.5 },
125 { "label": "@", "x": 2, "y": 1.5 },
126 { "label": "#", "x": 3, "y": 1.5 },
127 { "label": "$", "x": 4, "y": 1.5 },
128 { "label": "%", "x": 5, "y": 1.5 },
129 { "label": "^", "x": 6, "y": 1.5 },
130 { "label": "&", "x": 7, "y": 1.5 },
131 { "label": "*", "x": 8, "y": 1.5 },
132 { "label": "(", "x": 9, "y": 1.5 },
133 { "label": ")", "x": 10, "y": 1.5 },
134 { "label": "_", "x": 11, "y": 1.5 },
135 { "label": "+", "x": 12, "y": 1.5 },
136 { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 },
137 { "label": "Insert", "x": 15.25, "y": 1.5 },
138 { "label": "Home", "x": 16.25, "y": 1.5 },
139 { "label": "PgUp", "x": 17.25, "y": 1.5 },
140
141 { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 },
142 { "label": "Q", "x": 1.5, "y": 2.5 },
143 { "label": "W", "x": 2.5, "y": 2.5 },
144 { "label": "E", "x": 3.5, "y": 2.5 },
145 { "label": "R", "x": 4.5, "y": 2.5 },
146 { "label": "T", "x": 5.5, "y": 2.5 },
147 { "label": "Y", "x": 6.5, "y": 2.5 },
148 { "label": "U", "x": 7.5, "y": 2.5 },
149 { "label": "I", "x": 8.5, "y": 2.5 },
150 { "label": "O", "x": 9.5, "y": 2.5 },
151 { "label": "P", "x": 10.5, "y": 2.5 },
152 { "label": "{", "x": 11.5, "y": 2.5 },
153 { "label": "}", "x": 12.5, "y": 2.5 },
154 { "label": "Delete", "x": 15.25, "y": 2.5 },
155 { "label": "End", "x": 16.25, "y": 2.5 },
156 { "label": "PgDn", "x": 17.25, "y": 2.5 },
157
158 { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 },
159 { "label": "A", "x": 1.75, "y": 3.5 },
160 { "label": "S", "x": 2.75, "y": 3.5 },
161 { "label": "D", "x": 3.75, "y": 3.5 },
162 { "label": "F", "x": 4.75, "y": 3.5 },
163 { "label": "G", "x": 5.75, "y": 3.5 },
164 { "label": "H", "x": 6.75, "y": 3.5 },
165 { "label": "J", "x": 7.75, "y": 3.5 },
166 { "label": "K", "x": 8.75, "y": 3.5 },
167 { "label": "L", "x": 9.75, "y": 3.5 },
168 { "label": ":", "x": 10.75, "y": 3.5 },
169 { "label": "\"", "x": 11.75, "y": 3.5 },
170 { "label": "#", "x": 12.75, "y": 3.5 },
171 { "label": "Enter", "x": 13.75, "y": 2.5, "w": 1.25, "h": 2 },
172
173 { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 },
174 { "label": "\\", "x": 1.25, "y": 4.5 },
175 { "label": "Z", "x": 2.25, "y": 4.5 },
176 { "label": "X", "x": 3.25, "y": 4.5 },
177 { "label": "C", "x": 4.25, "y": 4.5 },
178 { "label": "V", "x": 5.25, "y": 4.5 },
179 { "label": "B", "x": 6.25, "y": 4.5 },
180 { "label": "N", "x": 7.25, "y": 4.5 },
181 { "label": "M", "x": 8.25, "y": 4.5 },
182 { "label": "<", "x": 9.25, "y": 4.5 },
183 { "label": ">", "x": 10.25, "y": 4.5 },
184 { "label": "?", "x": 11.25, "y": 4.5 },
185 { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 },
186 { "label": "\u2191", "x": 16.25, "y": 4.5 },
187
188 { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 },
189 { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 },
190 { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 },
191 { "x": 3.75, "y": 5.5, "w": 6.25 },
192 { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 },
193 { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 },
194 { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 },
195 { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 },
196 { "label": "\u2190", "x": 15.25, "y": 5.5 },
197 { "label": "\u2193", "x": 16.25, "y": 5.5 },
198 { "label": "\u2192", "x": 17.25, "y": 5.5 }
199 ]
200 },
201 "LAYOUT_tkl": {
202 "layout": [
203 { "label": "Esc", "x": 0, "y": 0 },
204 { "label": "F1", "x": 2, "y": 0 },
205 { "label": "F2", "x": 3, "y": 0 },
206 { "label": "F3", "x": 4, "y": 0 },
207 { "label": "F4", "x": 5, "y": 0 },
208 { "label": "F5", "x": 6.5, "y": 0 },
209 { "label": "F6", "x": 7.5, "y": 0 },
210 { "label": "F7", "x": 8.5, "y": 0 },
211 { "label": "F8", "x": 9.5, "y": 0 },
212 { "label": "F9", "x": 11, "y": 0 },
213 { "label": "F10", "x": 12, "y": 0 },
214 { "label": "F11", "x": 13, "y": 0 },
215 { "label": "F12", "x": 14, "y": 0 },
216 { "label": "PrtSc", "x": 15.25, "y": 0 },
217 { "label": "Scroll Lock", "x": 16.25, "y": 0 },
218 { "label": "Pause", "x": 17.25, "y": 0 },
219
220 { "label": "~", "x": 0, "y": 1.5 },
221 { "label": "!", "x": 1, "y": 1.5 },
222 { "label": "@", "x": 2, "y": 1.5 },
223 { "label": "#", "x": 3, "y": 1.5 },
224 { "label": "$", "x": 4, "y": 1.5 },
225 { "label": "%", "x": 5, "y": 1.5 },
226 { "label": "^", "x": 6, "y": 1.5 },
227 { "label": "&", "x": 7, "y": 1.5 },
228 { "label": "*", "x": 8, "y": 1.5 },
229 { "label": "(", "x": 9, "y": 1.5 },
230 { "label": ")", "x": 10, "y": 1.5 },
231 { "label": "_", "x": 11, "y": 1.5 },
232 { "label": "+", "x": 12, "y": 1.5 },
233 { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 },
234 { "label": "Insert", "x": 15.25, "y": 1.5 },
235 { "label": "Home", "x": 16.25, "y": 1.5 },
236 { "label": "PgUp", "x": 17.25, "y": 1.5 },
237
238 { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 },
239 { "label": "Q", "x": 1.5, "y": 2.5 },
240 { "label": "W", "x": 2.5, "y": 2.5 },
241 { "label": "E", "x": 3.5, "y": 2.5 },
242 { "label": "R", "x": 4.5, "y": 2.5 },
243 { "label": "T", "x": 5.5, "y": 2.5 },
244 { "label": "Y", "x": 6.5, "y": 2.5 },
245 { "label": "U", "x": 7.5, "y": 2.5 },
246 { "label": "I", "x": 8.5, "y": 2.5 },
247 { "label": "O", "x": 9.5, "y": 2.5 },
248 { "label": "P", "x": 10.5, "y": 2.5 },
249 { "label": "{", "x": 11.5, "y": 2.5 },
250 { "label": "}", "x": 12.5, "y": 2.5 },
251 { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 },
252 { "label": "Delete", "x": 15.25, "y": 2.5 },
253 { "label": "End", "x": 16.25, "y": 2.5 },
254 { "label": "PgDn", "x": 17.25, "y": 2.5 },
255
256 { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 },
257 { "label": "A", "x": 1.75, "y": 3.5 },
258 { "label": "S", "x": 2.75, "y": 3.5 },
259 { "label": "D", "x": 3.75, "y": 3.5 },
260 { "label": "F", "x": 4.75, "y": 3.5 },
261 { "label": "G", "x": 5.75, "y": 3.5 },
262 { "label": "H", "x": 6.75, "y": 3.5 },
263 { "label": "J", "x": 7.75, "y": 3.5 },
264 { "label": "K", "x": 8.75, "y": 3.5 },
265 { "label": "L", "x": 9.75, "y": 3.5 },
266 { "label": ":", "x": 10.75, "y": 3.5 },
267 { "label": "\"", "x": 11.75, "y": 3.5 },
268 { "label": "#", "x": 12.75, "y": 3.5 },
269 { "label": "Enter", "x": 13.75, "y": 3.5, "w": 1.25 },
270
271 { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 },
272 { "label": "\\", "x": 1.25, "y": 4.5 },
273 { "label": "Z", "x": 2.25, "y": 4.5 },
274 { "label": "X", "x": 3.25, "y": 4.5 },
275 { "label": "C", "x": 4.25, "y": 4.5 },
276 { "label": "V", "x": 5.25, "y": 4.5 },
277 { "label": "B", "x": 6.25, "y": 4.5 },
278 { "label": "N", "x": 7.25, "y": 4.5 },
279 { "label": "M", "x": 8.25, "y": 4.5 },
280 { "label": "<", "x": 9.25, "y": 4.5 },
281 { "label": ">", "x": 10.25, "y": 4.5 },
282 { "label": "?", "x": 11.25, "y": 4.5 },
283 { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 },
284 { "label": "\u2191", "x": 16.25, "y": 4.5 },
285
286 { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 },
287 { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 },
288 { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 },
289 { "x": 3.75, "y": 5.5, "w": 6.25 },
290 { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 },
291 { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 },
292 { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 },
293 { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 },
294 { "label": "\u2190", "x": 15.25, "y": 5.5 },
295 { "label": "\u2193", "x": 16.25, "y": 5.5 },
296 { "label": "\u2192", "x": 17.25, "y": 5.5 }
297 ]
298 },
299 "LAYOUT_all": {
300 "layout": [
301 { "label": "Esc", "x": 0, "y": 0 },
302 { "label": "F1", "x": 2, "y": 0 },
303 { "label": "F2", "x": 3, "y": 0 },
304 { "label": "F3", "x": 4, "y": 0 },
305 { "label": "F4", "x": 5, "y": 0 },
306 { "label": "F5", "x": 6.5, "y": 0 },
307 { "label": "F6", "x": 7.5, "y": 0 },
308 { "label": "F7", "x": 8.5, "y": 0 },
309 { "label": "F8", "x": 9.5, "y": 0 },
310 { "label": "F9", "x": 11, "y": 0 },
311 { "label": "F10", "x": 12, "y": 0 },
312 { "label": "F11", "x": 13, "y": 0 },
313 { "label": "F12", "x": 14, "y": 0 },
314 { "label": "PrtSc", "x": 15.25, "y": 0 },
315 { "label": "Scroll Lock", "x": 16.25, "y": 0 },
316 { "label": "Pause", "x": 17.25, "y": 0 },
317
318 { "label": "~", "x": 0, "y": 1.5 },
319 { "label": "!", "x": 1, "y": 1.5 },
320 { "label": "@", "x": 2, "y": 1.5 },
321 { "label": "#", "x": 3, "y": 1.5 },
322 { "label": "$", "x": 4, "y": 1.5 },
323 { "label": "%", "x": 5, "y": 1.5 },
324 { "label": "^", "x": 6, "y": 1.5 },
325 { "label": "&", "x": 7, "y": 1.5 },
326 { "label": "*", "x": 8, "y": 1.5 },
327 { "label": "(", "x": 9, "y": 1.5 },
328 { "label": ")", "x": 10, "y": 1.5 },
329 { "label": "_", "x": 11, "y": 1.5 },
330 { "label": "+", "x": 12, "y": 1.5 },
331 { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 },
332 { "label": "Insert", "x": 15.25, "y": 1.5 },
333 { "label": "Home", "x": 16.25, "y": 1.5 },
334 { "label": "PgUp", "x": 17.25, "y": 1.5 },
335 { "label": "Num Lock", "x": 18.5, "y": 1.5 },
336 { "label": "/", "x": 19.5, "y": 1.5 },
337 { "label": "*", "x": 20.5, "y": 1.5 },
338 { "label": "-", "x": 21.5, "y": 1.5 },
339
340 { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 },
341 { "label": "Q", "x": 1.5, "y": 2.5 },
342 { "label": "W", "x": 2.5, "y": 2.5 },
343 { "label": "E", "x": 3.5, "y": 2.5 },
344 { "label": "R", "x": 4.5, "y": 2.5 },
345 { "label": "T", "x": 5.5, "y": 2.5 },
346 { "label": "Y", "x": 6.5, "y": 2.5 },
347 { "label": "U", "x": 7.5, "y": 2.5 },
348 { "label": "I", "x": 8.5, "y": 2.5 },
349 { "label": "O", "x": 9.5, "y": 2.5 },
350 { "label": "P", "x": 10.5, "y": 2.5 },
351 { "label": "{", "x": 11.5, "y": 2.5 },
352 { "label": "}", "x": 12.5, "y": 2.5 },
353 { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 },
354 { "label": "Delete", "x": 15.25, "y": 2.5 },
355 { "label": "End", "x": 16.25, "y": 2.5 },
356 { "label": "PgDn", "x": 17.25, "y": 2.5 },
357 { "label": "7", "x": 18.5, "y": 2.5 },
358 { "label": "8", "x": 19.5, "y": 2.5 },
359 { "label": "9", "x": 20.5, "y": 2.5 },
360 { "label": "+", "x": 21.5, "y": 2.5, "h": 2 },
361
362 { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 },
363 { "label": "A", "x": 1.75, "y": 3.5 },
364 { "label": "S", "x": 2.75, "y": 3.5 },
365 { "label": "D", "x": 3.75, "y": 3.5 },
366 { "label": "F", "x": 4.75, "y": 3.5 },
367 { "label": "G", "x": 5.75, "y": 3.5 },
368 { "label": "H", "x": 6.75, "y": 3.5 },
369 { "label": "J", "x": 7.75, "y": 3.5 },
370 { "label": "K", "x": 8.75, "y": 3.5 },
371 { "label": "L", "x": 9.75, "y": 3.5 },
372 { "label": ":", "x": 10.75, "y": 3.5 },
373 { "label": "\"", "x": 11.75, "y": 3.5 },
374 { "label": "#", "x": 12.75, "y": 3.5 },
375 { "label": "Enter", "x": 13.75, "y": 3.5, "w": 1.25 },
376 { "label": "4", "x": 18.5, "y": 3.5 },
377 { "label": "5", "x": 19.5, "y": 3.5 },
378 { "label": "6", "x": 20.5, "y": 3.5 },
379
380 { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 },
381 { "label": "\\", "x": 1.25, "y": 4.5 },
382 { "label": "Z", "x": 2.25, "y": 4.5 },
383 { "label": "X", "x": 3.25, "y": 4.5 },
384 { "label": "C", "x": 4.25, "y": 4.5 },
385 { "label": "V", "x": 5.25, "y": 4.5 },
386 { "label": "B", "x": 6.25, "y": 4.5 },
387 { "label": "N", "x": 7.25, "y": 4.5 },
388 { "label": "M", "x": 8.25, "y": 4.5 },
389 { "label": "<", "x": 9.25, "y": 4.5 },
390 { "label": ">", "x": 10.25, "y": 4.5 },
391 { "label": "?", "x": 11.25, "y": 4.5 },
392 { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 },
393 { "label": "\u2191", "x": 16.25, "y": 4.5 },
394 { "label": "1", "x": 18.5, "y": 4.5 },
395 { "label": "2", "x": 19.5, "y": 4.5 },
396 { "label": "3", "x": 20.5, "y": 4.5 },
397 { "label": "Enter", "x": 21.5, "y": 4.5, "h": 2 },
398
399 { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 },
400 { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 },
401 { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 },
402 { "x": 3.75, "y": 5.5, "w": 6.25 },
403 { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 },
404 { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 },
405 { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 },
406 { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 },
407 { "label": "\u2190", "x": 15.25, "y": 5.5 },
408 { "label": "\u2193", "x": 16.25, "y": 5.5 },
409 { "label": "\u2192", "x": 17.25, "y": 5.5 },
410 { "label": "0", "x": 18.5, "y": 5.5, "w": 2 },
411 { "label": ".", "x": 20.5, "y": 5.5 }
412 ]
413 }
414 }
415}
diff --git a/keyboards/durgod/k320/k320.h b/keyboards/durgod/k3x0/k320/k320.h
index c504f5a2b..23b48d0f3 100644
--- a/keyboards/durgod/k320/k320.h
+++ b/keyboards/durgod/k3x0/k320/k320.h
@@ -1,4 +1,5 @@
1/* Copyright 2021 kuenhlee and Don Kjer 1/* Copyright 2021 Don Kjer and Tyler Tidman
2 * Copyright 2021 Simon Arlott
2 * 3 *
3 * This program is free software: you can redistribute it and/or modify 4 * 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 * it under the terms of the GNU General Public License as published by
@@ -13,25 +14,8 @@
13 * You should have received a copy of the GNU General Public License 14 * 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 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 16 */
16#pragma once
17
18#include "quantum.h"
19
20#ifndef WINLOCK_DISABLED
21// Define the TGUI key here so it is available in QMK configurator
22enum K320_keycodes {
23 KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock
24 NEW_SAFE_RANGE
25};
26
27#undef SAFE_RANGE
28#define SAFE_RANGE NEW_SAFE_RANGE
29#endif /* WINLOCK_DISABLED */
30
31/* Function Prototype */
32void off_all_leds(void);
33void on_all_leds(void);
34 17
18#pragma once
35 19
36#define XXX KC_NO 20#define XXX KC_NO
37 21
@@ -53,7 +37,6 @@ void on_all_leds(void);
53 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \ 37 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \
54} 38}
55 39
56
57// This a shortcut to help you visually see your layout. 40// This a shortcut to help you visually see your layout.
58#define LAYOUT_tkl_iso( \ 41#define LAYOUT_tkl_iso( \
59 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ 42 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
@@ -72,9 +55,8 @@ void on_all_leds(void);
72 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \ 55 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \
73} 56}
74 57
75
76// This a shortcut to help you visually see your layout. 58// This a shortcut to help you visually see your layout.
77#define LAYOUT_all( \ 59#define LAYOUT_tkl( \
78 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ 60 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
79 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \ 61 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \
80 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, \ 62 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, \
@@ -90,3 +72,21 @@ void on_all_leds(void);
90 { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \ 72 { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \
91 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \ 73 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \
92} 74}
75
76// This a shortcut to help you visually see your layout.
77#define LAYOUT_all( \
78 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
79 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, K6A, K69, K68, K67, \
80 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, K7A, K79, K78, K6B, \
81 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4E, K7E, K7D, K7C, \
82 K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, K6E, K6D, K6C, K7B, \
83 K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F, K7F, K77 \
84) { \
85 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
86 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \
87 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \
88 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
89 { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \
90 { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \
91 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F } \
92}
diff --git a/keyboards/durgod/k320/keymaps/kuenhlee/keymap.c b/keyboards/durgod/k3x0/k320/keymaps/kuenhlee/keymap.c
index 866e522fc..866e522fc 100644
--- a/keyboards/durgod/k320/keymaps/kuenhlee/keymap.c
+++ b/keyboards/durgod/k3x0/k320/keymaps/kuenhlee/keymap.c
diff --git a/keyboards/durgod/k320/keymaps/kuenhlee/readme.md b/keyboards/durgod/k3x0/k320/keymaps/kuenhlee/readme.md
index 60925e61c..60925e61c 100644
--- a/keyboards/durgod/k320/keymaps/kuenhlee/readme.md
+++ b/keyboards/durgod/k3x0/k320/keymaps/kuenhlee/readme.md
diff --git a/keyboards/durgod/k320/keymaps/kuenhlee/rules.mk b/keyboards/durgod/k3x0/k320/keymaps/kuenhlee/rules.mk
index b6a7e51c1..b6a7e51c1 100644
--- a/keyboards/durgod/k320/keymaps/kuenhlee/rules.mk
+++ b/keyboards/durgod/k3x0/k320/keymaps/kuenhlee/rules.mk
diff --git a/keyboards/durgod/k3x0/k320/readme.md b/keyboards/durgod/k3x0/k320/readme.md
new file mode 100644
index 000000000..e584bd187
--- /dev/null
+++ b/keyboards/durgod/k3x0/k320/readme.md
@@ -0,0 +1,10 @@
1# Taurus K320
2
3This code is shared between all K320 variants. Currently only the base model with no backlight is supported.
4
5* Keyboard Maintainers: [dkjer](https://github.com/dkjer) and [tylert](https://github.com/tylert)
6* Hardware Supported: Durgod Taurus K320 board with STM32F070RBT6
7* Hardware Availability: Base https://www.amazon.com/Durgod-Taurus-Corona-Mechanical-Keyboard/dp/B078H3WPHM
8
9Instructions for building the K320 firmware can be found here:
10* [No Backlight](base/readme.md)
diff --git a/keyboards/durgod/k3x0/k320/rules.mk b/keyboards/durgod/k3x0/k320/rules.mk
new file mode 100644
index 000000000..fabc0854f
--- /dev/null
+++ b/keyboards/durgod/k3x0/k320/rules.mk
@@ -0,0 +1,4 @@
1# Default to the base model
2DEFAULT_FOLDER=durgod/k3x0/k320/base
3
4LAYOUTS = tkl_ansi tkl_iso
diff --git a/keyboards/durgod/k320/k320.c b/keyboards/durgod/k3x0/k3x0.c
index 42091f36c..d12b46bc5 100644
--- a/keyboards/durgod/k320/k320.c
+++ b/keyboards/durgod/k3x0/k3x0.c
@@ -1,4 +1,5 @@
1/* Copyright 2021 kuenhlee and Don Kjer 1/* Copyright 2021 kuenhlee, Don Kjer, Tyler Tidman
2 * Copyright 2021 Simon Arlott
2 * 3 *
3 * This program is free software: you can redistribute it and/or modify 4 * 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 * it under the terms of the GNU General Public License as published by
@@ -14,10 +15,15 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 16 */
16 17
17#include "k320.h" 18#include "k3x0.h"
19#include <ch.h>
20#include <hal.h>
18 21
19/* Private Functions */ 22/* Private Functions */
20void off_all_leds(void) { 23void off_all_leds(void) {
24#ifdef LED_NUM_LOCK_PIN
25 writePinHigh(LED_NUM_LOCK_PIN);
26#endif
21 writePinHigh(LED_CAPS_LOCK_PIN); 27 writePinHigh(LED_CAPS_LOCK_PIN);
22 writePinHigh(LED_SCROLL_LOCK_PIN); 28 writePinHigh(LED_SCROLL_LOCK_PIN);
23 writePinHigh(LED_WIN_LOCK_PIN); 29 writePinHigh(LED_WIN_LOCK_PIN);
@@ -25,6 +31,9 @@ void off_all_leds(void) {
25} 31}
26 32
27void on_all_leds(void) { 33void on_all_leds(void) {
34#ifdef LED_NUM_LOCK_PIN
35 writePinLow(LED_NUM_LOCK_PIN);
36#endif
28 writePinLow(LED_CAPS_LOCK_PIN); 37 writePinLow(LED_CAPS_LOCK_PIN);
29 writePinLow(LED_SCROLL_LOCK_PIN); 38 writePinLow(LED_SCROLL_LOCK_PIN);
30 writePinLow(LED_WIN_LOCK_PIN); 39 writePinLow(LED_WIN_LOCK_PIN);
@@ -33,6 +42,9 @@ void on_all_leds(void) {
33 42
34/* WinLock and MR LEDs are non-standard. Need to override led init */ 43/* WinLock and MR LEDs are non-standard. Need to override led init */
35void led_init_ports(void) { 44void led_init_ports(void) {
45#ifdef LED_NUM_LOCK_PIN
46 setPinOutput(LED_NUM_LOCK_PIN);
47#endif
36 setPinOutput(LED_CAPS_LOCK_PIN); 48 setPinOutput(LED_CAPS_LOCK_PIN);
37 setPinOutput(LED_SCROLL_LOCK_PIN); 49 setPinOutput(LED_SCROLL_LOCK_PIN);
38 setPinOutput(LED_WIN_LOCK_PIN); 50 setPinOutput(LED_WIN_LOCK_PIN);
@@ -40,7 +52,6 @@ void led_init_ports(void) {
40 off_all_leds(); 52 off_all_leds();
41} 53}
42 54
43
44#ifndef WINLOCK_DISABLED 55#ifndef WINLOCK_DISABLED
45static bool win_key_locked = false; 56static bool win_key_locked = false;
46 57
@@ -60,3 +71,26 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
60 return process_record_user(keycode, record); 71 return process_record_user(keycode, record);
61} 72}
62#endif /* WINLOCK_DISABLED */ 73#endif /* WINLOCK_DISABLED */
74
75#ifndef HW_RESET_PIN_DISABLED
76static void hardware_reset_cb(void *arg) {
77 chSysLockFromISR();
78 bootloader_jump();
79 chSysUnlockFromISR();
80}
81#endif
82
83void keyboard_pre_init_kb(void) {
84 setPinInputHigh(HARDWARE_RESET_PIN);
85
86#ifndef HW_RESET_PIN_DISABLED
87 /* Jump to bootloader when the hardware reset button is pressed */
88 palEnablePadEvent(PAL_PORT(HARDWARE_RESET_PIN), PAL_PAD(HARDWARE_RESET_PIN), PAL_EVENT_MODE_FALLING_EDGE);
89 palSetPadCallback(PAL_PORT(HARDWARE_RESET_PIN), PAL_PAD(HARDWARE_RESET_PIN), hardware_reset_cb, NULL);
90
91 /* The interrupt is edge-triggered so check that it's not already pressed */
92 if (!readPin(HARDWARE_RESET_PIN)) {
93 bootloader_jump();
94 }
95#endif
96}
diff --git a/keyboards/durgod/k3x0/k3x0.h b/keyboards/durgod/k3x0/k3x0.h
new file mode 100644
index 000000000..93740a551
--- /dev/null
+++ b/keyboards/durgod/k3x0/k3x0.h
@@ -0,0 +1,47 @@
1/* Copyright 2021 kuenhlee, Don Kjer, Tyler Tidman
2 * Copyright 2021 Simon Arlott
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#include "quantum.h"
21
22#ifdef KEYBOARD_durgod_k3x0_k310
23# include "k310.h"
24#elif KEYBOARD_durgod_k3x0_k320
25# include "k320.h"
26#endif
27
28#ifndef WINLOCK_DISABLED
29// Define the TGUI key here so it is available in QMK configurator
30enum K3x0_keycodes {
31#ifdef VIA_ENABLE
32 KC_TGUI = USER00, // Toggle between GUI Lock or Unlock
33 NEW_SAFE_RANGE = SAFE_RANGE
34#else
35 KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock
36 NEW_SAFE_RANGE
37#endif
38};
39
40#undef SAFE_RANGE
41#define SAFE_RANGE NEW_SAFE_RANGE
42#endif /* WINLOCK_DISABLED */
43
44/* Function Prototype */
45void off_all_leds(void);
46void on_all_leds(void);
47
diff --git a/keyboards/durgod/k3x0/keymaps/chimera/keymap.c b/keyboards/durgod/k3x0/keymaps/chimera/keymap.c
new file mode 100644
index 000000000..8053da351
--- /dev/null
+++ b/keyboards/durgod/k3x0/keymaps/chimera/keymap.c
@@ -0,0 +1,373 @@
1/* Copyright 2021 Don Kjer and Tyler Tidman
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// Layer shorthand
20enum _layer {
21 _WBL,
22 _WFL,
23 _WSL,
24 _MBL,
25 _MFL,
26 _MSL
27};
28
29#ifndef DEFAULT_LAYOUT
30# define DEFAULT_LAYOUT _WBL // Change to _MBL to boot into Mac layout.
31#endif
32#ifndef ALT_LAYOUT
33# define ALT_LAYOUT _MBL // Layout to display 'MR' led when active.
34#endif
35
36static bool win_key_locked = false;
37static bool mac_media_locked = false;
38static bool win_appkey_pressed = false;
39static bool mac_fnkey_pressed = false;
40
41
42// Defines the keycodes used by our macros in process_record_user
43enum custom_keycodes {
44 KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock (Windows)
45 KC_TMED, // Toggle between Fx keys or Media keys (Mac)
46 KC_WFN, // Windows function key
47 KC_MFN, // Mac function key
48 MO_WSL, // Windows system key
49 MO_MSL, // Mac system key
50 DF_W2MBL, // Change layout from Windows to Mac
51 DF_M2WBL // Change layout from Mac to Windows
52};
53
54const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
55 /* Keymap _WBL: Windows Base Layer (Default Layer)
56 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
57 * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│
58 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
59 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
60 * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
61 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
62 * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
63 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │
64 * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │
65 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
66 * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
67 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
68 * │Ctrl│GUI │Alt │ │ Alt│Func│ App│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
69 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
70 */
71 [_WBL] = LAYOUT_all( /* Windows Base Layer */
72 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_PSCR, KC_SLCK, KC_PAUS,
73 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
74 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, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
75 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
76 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
77 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
78 ),
79 /* Keymap _WFL: Windows Function Layer
80 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
81 * │ │ │Ply│Stp│Prv│Nxt│ │Mut│Vo+│Vo-│ │ │ │ │ │ │ │ │ │Mut│
82 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
83 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
84 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │
85 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
86 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │
87 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
88 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
89 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
90 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
91 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
92 * │ │Lock│ │ │ │Func│ Sys│ │ │ │ │ │ │ │ │ │
93 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
94 */
95 [_WFL] = LAYOUT_all( /* Windows Function Layer */
96 _______, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, KC_MUTE,
97 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______,
98 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______,
99 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
100 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
101 _______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______, _______, _______, _______
102 ),
103 /* Keymap _WSL: Windows System Layer
104 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
105 * │Rst│ │Slp│ │ │Pwr│ │ │ │ │ │ │ │ │ │MAC│ │ │ │ │
106 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
107 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
108 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
109 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
110 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
111 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
112 * │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
113 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
114 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
115 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
116 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
117 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
118 */
119 [_WSL] = LAYOUT_all( /* Windows Second / System Layer */
120 RESET, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, XXXXXXX, XXXXXXX, XXXXXXX,
121 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
122 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
123 XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
124 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
125 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
126 ),
127
128 /* Keymap _MBL: Mac Base Layer (Alternate Layout)
129 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
130 * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │F13│F14│F15│
131 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
132 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
133 * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
134 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
135 * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
136 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │
137 * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │
138 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
139 * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
140 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
141 * │Ctrl│Alt │GUI │ │ GUI│ Alt│Func│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
142 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
143 */
144 [_MBL] = LAYOUT_all( /* Mac Base Layer */
145 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_F13, KC_F14, KC_F15,
146 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
147 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, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
148 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
149 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
150 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
151 ),
152 /* Keymap _MFL: Mac Function Layer
153 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
154 * │ │ │Br-│Br+│ │ │ │ │ │Prv│Ply│ │Nxt│Mut│Vo-│Vo+│ │TMd│ │Mut│
155 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
156 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
157 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │
158 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
159 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │
160 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
161 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
162 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
163 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
164 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
165 * │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │
166 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
167 */
168 [_MFL] = LAYOUT_all( /* Mac Function Layer */
169 _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TMED, _______, KC_MUTE,
170 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______,
171 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______,
172 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
173 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
174 _______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______, _______, _______, _______
175 ),
176 /* Keymap _MSL: Mac System Layer
177 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
178 * │Rst│ │ │ │ │Slp│ │ │ │ │ │ │ │ │ │WIN│ │ │ │ │
179 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
180 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
181 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
182 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
183 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
184 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
185 * │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
186 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
187 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
188 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
189 * │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │
190 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
191 */
192 [_MSL] = LAYOUT_all( /* Mac Second / System Layer */
193 RESET, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, XXXXXXX, XXXXXXX, XXXXXXX,
194 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
195 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
196 XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
197 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
198 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
199 )
200};
201
202void unlock_win_key(void) {
203 win_key_locked = false;
204 mac_media_locked = false;
205 writePinHigh(LED_WIN_LOCK_PIN);
206}
207
208void toggle_lock_win_key(void) {
209 win_key_locked = !win_key_locked;
210 writePin(LED_WIN_LOCK_PIN, !win_key_locked);
211}
212
213void toggle_lock_media_key(void) {
214 mac_media_locked = !mac_media_locked;
215 writePin(LED_WIN_LOCK_PIN, !mac_media_locked);
216}
217
218#ifdef CONSOLE_ENABLE
219void dprint_global_layers(void) {
220 dprint("Global Layers:");
221 if (IS_LAYER_ON(_WFL)) { dprint(" _WFL"); }
222 if (IS_LAYER_ON(_WSL)) { dprint(" _WSL"); }
223 if (IS_LAYER_ON(_MFL)) { dprint(" _MFL"); }
224 if (IS_LAYER_ON(_MSL)) { dprint(" _MSL"); }
225 dprintf("\n");
226}
227
228void dprint_layers(layer_state_t state) {
229 dprint("Layers:");
230 if (IS_LAYER_ON_STATE(state, _WFL)) { dprint(" _WFL"); }
231 if (IS_LAYER_ON_STATE(state, _WSL)) { dprint(" _WSL"); }
232 if (IS_LAYER_ON_STATE(state, _MFL)) { dprint(" _MFL"); }
233 if (IS_LAYER_ON_STATE(state, _MSL)) { dprint(" _MSL"); }
234 dprintf("\n");
235}
236#endif
237
238layer_state_t default_layer_state_set_user(layer_state_t state) {
239#ifdef CONSOLE_ENABLE
240 dprintf("default_layer_state_set_user: 0x%x\n", state);
241 dprint_global_layers();
242#endif
243 // Disable windows key lock on default layer transition.
244 unlock_win_key();
245 win_appkey_pressed = false;
246 mac_fnkey_pressed = false;
247 writePin(LED_MR_LOCK_PIN, !IS_LAYER_ON_STATE(state, ALT_LAYOUT));
248 return state;
249}
250
251layer_state_t layer_state_set_user(layer_state_t state) {
252#ifdef CONSOLE_ENABLE
253 dprintf("layer_state_set_user: 0x%x\n", state);
254 dprint_layers(state);
255#endif
256 return state;
257}
258
259bool process_record_user(uint16_t keycode, keyrecord_t *record) {
260 switch (keycode) {
261 case KC_TGUI:
262 if (!record->event.pressed) {
263 // Toggle GUI lock on key release
264 toggle_lock_win_key();
265 }
266 break;
267 case KC_TMED:
268 // Only trigger when Fn key is also held down, to avoid accidental unlock.
269 if (!mac_fnkey_pressed) { return false; }
270 if (!record->event.pressed) {
271 // Toggle Media Lock on key release
272 toggle_lock_media_key();
273 }
274 break;
275 case KC_LGUI:
276 if (win_key_locked) { return false; }
277 break;
278 case KC_WFN:
279 // Like MO(_WFL), but also enables _WSL if KC_APP is already pressed down.
280 if (record->event.pressed) {
281 layer_on(_WFL);
282 if (win_appkey_pressed) {
283 // Also enable Secondary layer if App key is being held down.
284 win_appkey_pressed = false;
285 layer_on(_WSL);
286 }
287 } else {
288 if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
289 if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
290 }
291 break;
292 case KC_APP:
293 if (record->event.pressed) {
294 // Don't actually press down the app menu key
295 win_appkey_pressed = true;
296 } else {
297 if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
298 if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
299 if (win_appkey_pressed) {
300 win_appkey_pressed = false;
301 // Tap the KC_APP key on key release.
302 tap_code(KC_APP);
303 }
304 }
305 return false;
306 break;
307 case KC_MFN:
308 // Mac Fn key. Emit Fn keycode, and also transition layers similar to KC_WFN.
309 if (record->event.pressed) {
310 mac_fnkey_pressed = true;
311 layer_on(_MFL);
312 // Also enable Secondary layer if Right-Alt key is being held down.
313 if (get_mods() & MOD_BIT(KC_RALT)) {
314 layer_on(_MSL);
315 }
316 } else {
317 mac_fnkey_pressed = false;
318 if (!mac_media_locked) {
319 if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
320 if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
321 }
322 }
323 break;
324 case KC_RALT:
325 // Disable MSL/WFL layer on key-up.
326 if (!record->event.pressed) {
327 if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
328 if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
329 }
330 break;
331 case MO_WSL:
332 if (record->event.pressed) {
333 layer_on(_WSL);
334 } else {
335 if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
336 if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
337 }
338 break;
339 case MO_MSL:
340 if (record->event.pressed) {
341 layer_on(_MSL);
342 } else {
343 if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
344 if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
345 }
346 break;
347 case DF_W2MBL:
348 if (!record->event.pressed) {
349 // Switch base layer, but preserve first/secondary layers.
350 default_layer_set(1UL<<_MBL);
351 layer_state_set(1UL<<_MFL | 1UL<<_MSL);
352 }
353 break;
354 case DF_M2WBL:
355 if (!record->event.pressed) {
356 // Switch base layer, but preserve first/secondary layers.
357 default_layer_set(1UL<<_WBL);
358 layer_state_set(1UL<<_WFL | 1UL<<_WSL);
359 }
360 break;
361 case RESET:
362 if (record->event.pressed) {
363 // Flash LEDs to indicate bootloader mode is enabled.
364 on_all_leds();
365 }
366 break;
367 }
368 return true;
369}
370
371void keyboard_post_init_user(void) {
372 default_layer_set(1UL<<DEFAULT_LAYOUT);
373}
diff --git a/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/readme.md b/keyboards/durgod/k3x0/keymaps/chimera/readme.md
index 0eef77fd4..eb9a3ea5f 100644
--- a/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/readme.md
+++ b/keyboards/durgod/k3x0/keymaps/chimera/readme.md
@@ -1,8 +1,8 @@
1# A keymap for Durgod Taurus K320 that supports toggling between Mac and Windows 1# A keymap for Durgod Taurus K310/K320 that supports toggling between Mac and Windows
2 2
3Supports both ANSI and ISO layouts. 3Supports both ANSI and ISO layouts.
4 4
5Layer 0 : Standard 87/88 keys TKL layout (Windows) 5Layer 0 : Standard layout (Windows)
6 6
7Layer 1 : Media control and Windows lock key (Windows) 7Layer 1 : Media control and Windows lock key (Windows)
8- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7 8- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7
@@ -14,7 +14,7 @@ Layer 2 : System layer (Windows)
14- Fn + Menu + F4 : Turning Off System 14- Fn + Menu + F4 : Turning Off System
15- Fn + Menu + F12 : Switch to Mac layout 15- Fn + Menu + F12 : Switch to Mac layout
16 16
17Layer 3 : Mac 87/88 keys TKL layout 17Layer 3 : Mac layout
18 18
19Layer 4 : Media control and Media lock key (Mac) 19Layer 4 : Media control and Media lock key (Mac)
20 - Standard Mac Media keys for Fn + F1 ~ Fn + F12. 20 - Standard Mac Media keys for Fn + F1 ~ Fn + F12.
@@ -39,14 +39,14 @@ You can change the default & alternate layout by setting the following flags to
39 39
40For example, to configure Mac as the default layer, and Windows to be the alternate layout, compile with these flags: 40For example, to configure Mac as the default layer, and Windows to be the alternate layout, compile with these flags:
41 41
42 make EXTRAFLAGS="-DDEFAULT_LAYOUT=_MBL -DALT_LAYOUT=_WBL" durgod/k320:default_toggle_mac_windows 42 make EXTRAFLAGS="-DDEFAULT_LAYOUT=_MBL -DALT_LAYOUT=_WBL" durgod/k3x0/k310:chimera
43 43
44## Windows key lock 44## Windows key lock
45 45
46In windows layout, you can hold down Fn + Windows key to disable the Windows key while in locked mode. The 'Lock' LED 46In windows layout, you can hold down Fn + Windows key to disable the Windows key while in locked mode. The 'Lock' LED
47indicates if the Windows key is locked. 47indicates if the Windows key is locked.
48 48
49This is similar to the stock K320 Windows key lock functionality. 49This is similar to the stock K310/K320 Windows key lock functionality.
50 50
51## Mac Media Lock 51## Mac Media Lock
52 52
diff --git a/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/rules.mk b/keyboards/durgod/k3x0/keymaps/chimera/rules.mk
index 19843e8a2..19843e8a2 100644
--- a/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/rules.mk
+++ b/keyboards/durgod/k3x0/keymaps/chimera/rules.mk
diff --git a/keyboards/durgod/k3x0/keymaps/default/keymap.json b/keyboards/durgod/k3x0/keymaps/default/keymap.json
new file mode 100644
index 000000000..507b5c909
--- /dev/null
+++ b/keyboards/durgod/k3x0/keymaps/default/keymap.json
@@ -0,0 +1,26 @@
1{
2 "keyboard": "durgod/k3x0",
3 "keymap": "default",
4 "layout": "LAYOUT_all",
5 "layers": [
6 [
7 "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_PSCR", "KC_SLCK", "KC_PAUS",
8 "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_INS", "KC_HOME", "KC_PGUP", "KC_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS",
9 "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", "KC_DEL", "KC_END", "KC_PGDN", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS",
10 "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_NUHS", "KC_ENT", "KC_P4", "KC_P5", "KC_P6",
11 "KC_LSFT", "KC_NUBS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP", "KC_P1", "KC_P2", "KC_P3", "KC_PENT",
12 "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_APP", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_P0", "KC_PDOT"
13 ],
14 [
15 "_______", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
16 "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
17 "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
18 "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
19 "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
20 "_______", "KC_TGUI", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______"
21 ]
22 ],
23 "author": "tylert",
24 "notes": "",
25 "version": 1
26}
diff --git a/keyboards/durgod/k320/keymaps/default/readme.md b/keyboards/durgod/k3x0/keymaps/default/readme.md
index c94943a83..952b1912c 100644
--- a/keyboards/durgod/k320/keymaps/default/readme.md
+++ b/keyboards/durgod/k3x0/keymaps/default/readme.md
@@ -1,8 +1,8 @@
1# The default keymap for Durgod Taurus K320. 1# The default keymap for Durgod Taurus K3X0 (K310, K320, etc.) without backlight
2 2
3Supports both ANSI and ISO layouts. 3Supports both ANSI and ISO layouts.
4 4
5Layer 0 : Standard 87/88 keys TKL layout (Windows) 5Layer 0 : Standard layout (Windows)
6 6
7Layer 1 : Media control and Windows lock key 7Layer 1 : Media control and Windows lock key
8- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7 8- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7
@@ -13,4 +13,4 @@ Layer 1 : Media control and Windows lock key
13You can hold down Fn + Windows key to disable the Windows key while in locked mode. 13You can hold down Fn + Windows key to disable the Windows key while in locked mode.
14The 'Lock' LED indicates if the Windows key is locked. 14The 'Lock' LED indicates if the Windows key is locked.
15 15
16This is similar to the stock K320 Windows key lock functionality. 16This is similar to the stock K310/K320 Windows key lock functionality.
diff --git a/keyboards/durgod/k320/keymaps/default_mac/keymap.json b/keyboards/durgod/k3x0/keymaps/default_mac/keymap.json
index dc5d3d3fd..acf221935 100644
--- a/keyboards/durgod/k320/keymaps/default_mac/keymap.json
+++ b/keyboards/durgod/k3x0/keymaps/default_mac/keymap.json
@@ -1,23 +1,23 @@
1{ 1{
2 "keyboard": "durgod/k320", 2 "keyboard": "durgod/k3x0",
3 "keymap": "default_mac", 3 "keymap": "default_mac",
4 "layout": "LAYOUT_all", 4 "layout": "LAYOUT_all",
5 "layers": [ 5 "layers": [
6 [ 6 [
7 "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_F13", "KC_F14", "KC_F15", 7 "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_F13", "KC_F14", "KC_F15",
8 "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_INS", "KC_HOME", "KC_PGUP", 8 "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_INS", "KC_HOME", "KC_PGUP", "KC_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS",
9 "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", "KC_DEL", "KC_END", "KC_PGDN", 9 "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", "KC_DEL", "KC_END", "KC_PGDN", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS",
10 "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_NUHS", "KC_ENT", 10 "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_NUHS", "KC_ENT", "KC_P4", "KC_P5", "KC_P6",
11 "KC_LSFT", "KC_NUBS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP", 11 "KC_LSFT", "KC_NUBS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP", "KC_P1", "KC_P2", "KC_P3", "KC_PENT",
12 "KC_LCTL", "KC_LALT", "KC_LGUI", "KC_SPC", "KC_RGUI", "KC_RALT", "MO(1)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT" 12 "KC_LCTL", "KC_LALT", "KC_LGUI", "KC_SPC", "KC_RGUI", "KC_RALT", "MO(1)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_P0", "KC_PDOT"
13 ], 13 ],
14 [ 14 [
15 "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", 15 "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
16 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", 16 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "_______", "_______", "_______", "_______",
17 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", 17 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "_______", "_______", "_______", "_______",
18 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", 18 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "_______", "_______", "_______",
19 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", 19 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "_______", "_______", "_______", "_______",
20 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" 20 "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "_______", "_______"
21 ] 21 ]
22 ], 22 ],
23 "author":"AlCutter", 23 "author":"AlCutter",
diff --git a/keyboards/durgod/k320/keymaps/default_mac/readme.md b/keyboards/durgod/k3x0/keymaps/default_mac/readme.md
index 2765f14f9..2765f14f9 100644
--- a/keyboards/durgod/k320/keymaps/default_mac/readme.md
+++ b/keyboards/durgod/k3x0/keymaps/default_mac/readme.md
diff --git a/keyboards/durgod/k3x0/keymaps/typhon/keymap.c b/keyboards/durgod/k3x0/keymaps/typhon/keymap.c
new file mode 100644
index 000000000..afd38392c
--- /dev/null
+++ b/keyboards/durgod/k3x0/keymaps/typhon/keymap.c
@@ -0,0 +1,373 @@
1/* Copyright 2021 Don Kjer and Tyler Tidman
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// Layer shorthand
20enum _layer {
21 _WBL,
22 _WFL,
23 _WSL,
24 _MBL,
25 _MFL,
26 _MSL
27};
28
29#ifndef DEFAULT_LAYOUT
30# define DEFAULT_LAYOUT _WBL // Change to _MBL to boot into Mac layout.
31#endif
32#ifndef ALT_LAYOUT
33# define ALT_LAYOUT _MBL // Layout to display 'MR' led when active.
34#endif
35
36static bool win_key_locked = false;
37static bool mac_media_locked = false;
38static bool win_appkey_pressed = false;
39static bool mac_fnkey_pressed = false;
40
41
42// Defines the keycodes used by our macros in process_record_user
43enum custom_keycodes {
44 KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock (Windows)
45 KC_TMED, // Toggle between Fx keys or Media keys (Mac)
46 KC_WFN, // Windows function key
47 KC_MFN, // Mac function key
48 MO_WSL, // Windows system key
49 MO_MSL, // Mac system key
50 DF_W2MBL, // Change layout from Windows to Mac
51 DF_M2WBL // Change layout from Mac to Windows
52};
53
54const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
55 /* Keymap _WBL: Windows Base Layer (Default Layer)
56 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
57 * │Esc│ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │PSc│Slk│Pse│
58 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
59 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
60 * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
61 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
62 * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
63 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │
64 * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │
65 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
66 * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
67 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
68 * │Ctrl│GUI │Alt │ │ Alt│Func│ App│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
69 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
70 */
71 [_WBL] = LAYOUT_all( /* Windows Base Layer */
72 KC_ESC, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_PSCR, KC_SLCK, KC_PAUS,
73 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
74 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, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
75 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
76 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
77 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
78 ),
79 /* Keymap _WFL: Windows Function Layer
80 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
81 * │ │ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │ │ │Mut│
82 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
83 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
84 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │
85 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
86 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │
87 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
88 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
89 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
90 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
91 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
92 * │ │Lock│ │ │ │Func│ Sys│ │ │ │ │ │ │ │ │ │
93 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
94 */
95 [_WFL] = LAYOUT_all( /* Windows Function Layer */
96 _______, 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_MUTE,
97 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______,
98 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______,
99 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
100 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
101 _______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______, _______, _______, _______
102 ),
103 /* Keymap _WSL: Windows System Layer
104 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
105 * │Rst│ │Slp│ │ │Pwr│ │ │ │ │ │ │ │ │ │MAC│ │ │ │ │
106 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
107 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
108 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
109 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
110 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
111 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
112 * │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
113 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
114 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
115 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
116 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
117 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
118 */
119 [_WSL] = LAYOUT_all( /* Windows Second / System Layer */
120 RESET, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, XXXXXXX, XXXXXXX, XXXXXXX,
121 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
122 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
123 XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
124 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
125 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
126 ),
127
128 /* Keymap _MBL: Mac Base Layer (Alternate Layout)
129 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
130 * │Esc│ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │F13│F14│F15│
131 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
132 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
133 * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
134 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
135 * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
136 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │
137 * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │
138 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
139 * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
140 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
141 * │Ctrl│Alt │GUI │ │ GUI│ Alt│Func│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
142 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
143 */
144 [_MBL] = LAYOUT_all( /* Mac Base Layer */
145 KC_ESC, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_F13, KC_F14, KC_F15,
146 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
147 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, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
148 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
149 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
150 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
151 ),
152 /* Keymap _MFL: Mac Function Layer
153 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
154 * │ │ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │TMd│ │Mut│
155 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
156 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
157 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │
158 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
159 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │
160 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
161 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
162 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
163 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
164 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
165 * │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │
166 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
167 */
168 [_MFL] = LAYOUT_all( /* Mac Function Layer */
169 _______, 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_TMED, _______, KC_MUTE,
170 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______,
171 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______,
172 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
173 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
174 _______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______, _______, _______, _______
175 ),
176 /* Keymap _MSL: Mac System Layer
177 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
178 * │Rst│ │ │ │ │Slp│ │ │ │ │ │ │ │ │ │WIN│ │ │ │ │
179 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
180 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
181 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
182 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
183 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
184 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
185 * │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
186 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
187 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
188 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
189 * │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │
190 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
191 */
192 [_MSL] = LAYOUT_all( /* Mac Second / System Layer */
193 RESET, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, XXXXXXX, XXXXXXX, XXXXXXX,
194 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
195 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
196 XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
197 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
198 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
199 )
200};
201
202void unlock_win_key(void) {
203 win_key_locked = false;
204 mac_media_locked = false;
205 writePinHigh(LED_WIN_LOCK_PIN);
206}
207
208void toggle_lock_win_key(void) {
209 win_key_locked = !win_key_locked;
210 writePin(LED_WIN_LOCK_PIN, !win_key_locked);
211}
212
213void toggle_lock_media_key(void) {
214 mac_media_locked = !mac_media_locked;
215 writePin(LED_WIN_LOCK_PIN, !mac_media_locked);
216}
217
218#ifdef CONSOLE_ENABLE
219void dprint_global_layers(void) {
220 dprint("Global Layers:");
221 if (IS_LAYER_ON(_WFL)) { dprint(" _WFL"); }
222 if (IS_LAYER_ON(_WSL)) { dprint(" _WSL"); }
223 if (IS_LAYER_ON(_MFL)) { dprint(" _MFL"); }
224 if (IS_LAYER_ON(_MSL)) { dprint(" _MSL"); }
225 dprintf("\n");
226}
227
228void dprint_layers(layer_state_t state) {
229 dprint("Layers:");
230 if (IS_LAYER_ON_STATE(state, _WFL)) { dprint(" _WFL"); }
231 if (IS_LAYER_ON_STATE(state, _WSL)) { dprint(" _WSL"); }
232 if (IS_LAYER_ON_STATE(state, _MFL)) { dprint(" _MFL"); }
233 if (IS_LAYER_ON_STATE(state, _MSL)) { dprint(" _MSL"); }
234 dprintf("\n");
235}
236#endif
237
238layer_state_t default_layer_state_set_user(layer_state_t state) {
239#ifdef CONSOLE_ENABLE
240 dprintf("default_layer_state_set_user: 0x%x\n", state);
241 dprint_global_layers();
242#endif
243 // Disable windows key lock on default layer transition.
244 unlock_win_key();
245 win_appkey_pressed = false;
246 mac_fnkey_pressed = false;
247 writePin(LED_MR_LOCK_PIN, !IS_LAYER_ON_STATE(state, ALT_LAYOUT));
248 return state;
249}
250
251layer_state_t layer_state_set_user(layer_state_t state) {
252#ifdef CONSOLE_ENABLE
253 dprintf("layer_state_set_user: 0x%x\n", state);
254 dprint_layers(state);
255#endif
256 return state;
257}
258
259bool process_record_user(uint16_t keycode, keyrecord_t *record) {
260 switch (keycode) {
261 case KC_TGUI:
262 if (!record->event.pressed) {
263 // Toggle GUI lock on key release
264 toggle_lock_win_key();
265 }
266 break;
267 case KC_TMED:
268 // Only trigger when Fn key is also held down, to avoid accidental unlock.
269 if (!mac_fnkey_pressed) { return false; }
270 if (!record->event.pressed) {
271 // Toggle Media Lock on key release
272 toggle_lock_media_key();
273 }
274 break;
275 case KC_LGUI:
276 if (win_key_locked) { return false; }
277 break;
278 case KC_WFN:
279 // Like MO(_WFL), but also enables _WSL if KC_APP is already pressed down.
280 if (record->event.pressed) {
281 layer_on(_WFL);
282 if (win_appkey_pressed) {
283 // Also enable Secondary layer if App key is being held down.
284 win_appkey_pressed = false;
285 layer_on(_WSL);
286 }
287 } else {
288 if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
289 if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
290 }
291 break;
292 case KC_APP:
293 if (record->event.pressed) {
294 // Don't actually press down the app menu key
295 win_appkey_pressed = true;
296 } else {
297 if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
298 if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
299 if (win_appkey_pressed) {
300 win_appkey_pressed = false;
301 // Tap the KC_APP key on key release.
302 tap_code(KC_APP);
303 }
304 }
305 return false;
306 break;
307 case KC_MFN:
308 // Mac Fn key. Emit Fn keycode, and also transition layers similar to KC_WFN.
309 if (record->event.pressed) {
310 mac_fnkey_pressed = true;
311 layer_on(_MFL);
312 // Also enable Secondary layer if Right-Alt key is being held down.
313 if (get_mods() & MOD_BIT(KC_RALT)) {
314 layer_on(_MSL);
315 }
316 } else {
317 mac_fnkey_pressed = false;
318 if (!mac_media_locked) {
319 if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
320 if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
321 }
322 }
323 break;
324 case KC_RALT:
325 // Disable MSL/WFL layer on key-up.
326 if (!record->event.pressed) {
327 if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
328 if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
329 }
330 break;
331 case MO_WSL:
332 if (record->event.pressed) {
333 layer_on(_WSL);
334 } else {
335 if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
336 if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
337 }
338 break;
339 case MO_MSL:
340 if (record->event.pressed) {
341 layer_on(_MSL);
342 } else {
343 if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
344 if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
345 }
346 break;
347 case DF_W2MBL:
348 if (!record->event.pressed) {
349 // Switch base layer, but preserve first/secondary layers.
350 default_layer_set(1UL<<_MBL);
351 layer_state_set(1UL<<_MFL | 1UL<<_MSL);
352 }
353 break;
354 case DF_M2WBL:
355 if (!record->event.pressed) {
356 // Switch base layer, but preserve first/secondary layers.
357 default_layer_set(1UL<<_WBL);
358 layer_state_set(1UL<<_WFL | 1UL<<_WSL);
359 }
360 break;
361 case RESET:
362 if (record->event.pressed) {
363 // Flash LEDs to indicate bootloader mode is enabled.
364 on_all_leds();
365 }
366 break;
367 }
368 return true;
369}
370
371void keyboard_post_init_user(void) {
372 default_layer_set(1UL<<DEFAULT_LAYOUT);
373}
diff --git a/keyboards/durgod/k3x0/keymaps/typhon/readme.md b/keyboards/durgod/k3x0/keymaps/typhon/readme.md
new file mode 100644
index 000000000..9ddef43aa
--- /dev/null
+++ b/keyboards/durgod/k3x0/keymaps/typhon/readme.md
@@ -0,0 +1,65 @@
1# A keymap for Durgod Taurus K310/K320 that supports toggling between Mac and Windows
2
3Supports both ANSI and ISO layouts.
4
5Layer 0 : Standard layout (Windows)
6
7Layer 1 : Media control and Windows lock key (Windows)
8- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7
9- Fn + Windows to toggle Windows lock key functionality
10
11Layer 2 : System layer (Windows)
12- Fn + Menu + Esc : Bootloader mode
13- Fn + Menu + F1 : System Sleep
14- Fn + Menu + F4 : Turning Off System
15- Fn + Menu + F12 : Switch to Mac layout
16
17Layer 3 : Mac layout
18
19Layer 4 : Media control and Media lock key (Mac)
20 - Standard Mac Media keys for Fn + F1 ~ Fn + F12.
21 - Fn + F13 to toggle Media lock key functionality
22
23Layer 5 : System layer (Mac)
24- Fn + R-ALT + Esc : Bootloader mode
25- Fn + R-ALT + F4 : Shutdown/Sleep (Hold down on Mac)
26- Fn + R-ALT + F12 : Switch to Windows layout
27
28## Toggle between Mac and Windows layout
29
30You can switch between Mac and Windows layout by doing the following:
31- Hold down Fn + Menu (Windows Layout) or Fn + Right-Alt (Mac layout) (These are the same physical keys)
32- Press F12
33
34The 'M' led will be lit when you are using the alternate layout. By default Mac is the alternate layout.
35
36You can change the default & alternate layout by setting the following flags to either '_WBL'(Windows) or '_MBL' (Mac)
37- DEFAULT_LAYOUT (initial layout to use on boot)
38- ALT_LAYOUT (layout that will light the 'M' LED when active)
39
40For example, to configure Mac as the default layer, and Windows to be the alternate layout, compile with these flags:
41
42 make EXTRAFLAGS="-DDEFAULT_LAYOUT=_MBL -DALT_LAYOUT=_WBL" durgod/k3x0/k310:typhon
43
44## Windows key lock
45
46In windows layout, you can hold down Fn + Windows key to disable the Windows key while in locked mode. The 'Lock' LED
47indicates if the Windows key is locked.
48
49This is similar to the stock K310/K320 Windows key lock functionality.
50
51## Mac Media Lock
52
53To switch between Function row and Media row in Mac layout, press Fn + PrtSc. The 'Lock' LED indicator will be lit when in Media row mode.
54
55### Subsequent Flashing
56
57For repeating Flashing you have two options with this keymap:
581. Use BootMagic
59- BootMagic Lite has been enabled with Assigned "Esc" key
60- Unplug USB Cable
61- Holding Esc Button
62- Plug in USB Cable, Keyboard should be in ST-Bootloader state
632. Use key combination if using default keymap
64- Hold down Fn + Menu (Windows Layout) or Fn + Right-Alt (Mac layout) (These are the same physical keys)
65- Press Esc. Keyboard should go into booloader state.
diff --git a/keyboards/durgod/k3x0/keymaps/typhon/rules.mk b/keyboards/durgod/k3x0/keymaps/typhon/rules.mk
new file mode 100644
index 000000000..437d8205c
--- /dev/null
+++ b/keyboards/durgod/k3x0/keymaps/typhon/rules.mk
@@ -0,0 +1,2 @@
1OPT_DEFS += -DWINLOCK_DISABLED
2MOUSEKEY_ENABLE = yes
diff --git a/keyboards/durgod/k3x0/keymaps/via/keymap.c b/keyboards/durgod/k3x0/keymaps/via/keymap.c
new file mode 100644
index 000000000..169ee2b58
--- /dev/null
+++ b/keyboards/durgod/k3x0/keymaps/via/keymap.c
@@ -0,0 +1,92 @@
1/* Copyright 2021 Maxime Coirault, Don Kjer, Tyler Tidman
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// Layer shorthand
20enum _layer {
21 _BASE,
22 _FN,
23 _LAYER3,
24 _LAYER4
25};
26
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28 /* Keymap _BASE: Base Layer (Default Layer)
29 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
30 * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│
31 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
32 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
33 * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
34 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
35 * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
36 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │
37 * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │
38 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
39 * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
40 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
41 * │Ctrl│GUI │Alt │ │ Alt│Func│ App│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
42 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
43 */
44 [_BASE] = LAYOUT_all( /* Base Layer */
45 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_PSCR, KC_SLCK, KC_PAUS,
46 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
47 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, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
48 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
49 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
50 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
51 ),
52 /* Keymap _FN: Function Layer
53 * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
54 * │ │ │Ply│Stp│Prv│Nxt│ │Mut│Vo+│Vo-│ │ │ │ │ │ │ │ │ │ │
55 * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
56 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
57 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
58 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
59 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
60 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
61 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
62 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
63 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
64 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
65 * │ │Lock│ │ │ │Func│ Sys│ │ │ │ │ │ │ │ │ │
66 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
67 */
68 [_FN] = LAYOUT_all( /* Function Layer */
69 _______, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
70 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
71 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
72 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
73 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
74 _______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
75 ),
76 [_LAYER3] = LAYOUT_all( /* Layer 3 */
77 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
78 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
79 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
80 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
81 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
82 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
83 ),
84 [_LAYER4] = LAYOUT_all( /* Layer 4 */
85 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
86 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
87 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
88 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
89 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
90 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
91 )
92};
diff --git a/keyboards/durgod/k3x0/keymaps/via/readme.md b/keyboards/durgod/k3x0/keymaps/via/readme.md
new file mode 100644
index 000000000..ffa1c4ce0
--- /dev/null
+++ b/keyboards/durgod/k3x0/keymaps/via/readme.md
@@ -0,0 +1,6 @@
1# The via keymap for Durgod Taurus K310/K320.
2
3Layer 0 : Standard layout
4
5Layer 1 : Media control
6- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7
diff --git a/keyboards/durgod/k3x0/keymaps/via/rules.mk b/keyboards/durgod/k3x0/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/durgod/k3x0/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/durgod/k3x0/readme.md b/keyboards/durgod/k3x0/readme.md
new file mode 100644
index 000000000..cbb170160
--- /dev/null
+++ b/keyboards/durgod/k3x0/readme.md
@@ -0,0 +1,51 @@
1# K3X0 = K310, K320, etc.
2
3This K3X0 code is shared between both the ANSI and ISO variants of both the
4K310 full-sized 104/105-key and K320 TKL 87/88-key keyboards.
5
6* Keyboard Maintainers: [dkjer](https://github.com/dkjer) and [tylert](https://github.com/tylert)
7* Hardware Supported: Durgod Taurus K310 or K320 board with STM32F070RBT6
8* Hardware Availability: K310 https://www.durgod.com/page9?product_id=53&_l=en
9 and K320 https://www.durgod.com/page9?product_id=47&_l=en
10
11## Instructions
12
13### Build
14
15Instructions for building the K310 and K320 firmware can be found here:
16* [K310](k310/readme.md)
17* [K320](k320/readme.md)
18
19### Initial Flash
20
21For first Flashing from initial Stock Firmware
22
231. Back up original Firmware Image:
24- Unplug
25- Short Boot0 to Vdd (See below)
26- Plug In USB
27- Make a Flash Image's Backup in case you wanted to restore the Keyboard to Stock's Image:
28 - Using dfu-util:
29
30 dfu-util --list
31 dfu-util --alt 0 --dfuse-address 0x08000000 --upload ${OLD_STOCK_BIN}
32
332. Flash the QMK Firmware Image.
34- Put board into Bootloader mode, using the same method as when backing up the original Firmware (above)
35- Here are a few options for performing the initial Flash:
36 - Using [QMK Toolbox](https://github.com/qmk/qmk_toolbox)
37 - Using dfu-util:
38
39 dfu-util --alt 0 --dfuse-address 0x08000000 --download ${NEW_QMK_BIN}
40
41You can short Boot0 to Vdd by shorting R21 to C27 on the sides closest to the processor, as shown:
42
43<img src="https://i.imgur.com/hvDnw5a.jpg" width="520" height="693" alt="Shorting Boot0 to Vdd on K320">
44
45### Subsequent Flashing
46
47For repeating Flashing you can use BootMagic:
48- BootMagic Lite has been enabled with Assigned "Esc" key
49- Unplug USB Cable
50- Holding Esc Button
51- Plug in USB Cable, Keyboard should be in ST-Bootloader state
diff --git a/keyboards/durgod/k3x0/rules.mk b/keyboards/durgod/k3x0/rules.mk
new file mode 100644
index 000000000..b70d52057
--- /dev/null
+++ b/keyboards/durgod/k3x0/rules.mk
@@ -0,0 +1,28 @@
1# Default to K310 variant, since it will also work on a K320
2DEFAULT_FOLDER=durgod/k3x0/k310
3
4# MCU name
5# Actually F070, but close enough
6MCU = STM32F072
7BOARD = DURGOD_STM32_F070
8
9# Bootloader selection
10BOOTLOADER = stm32-dfu
11
12# Build Options
13# change yes to no to disable
14#
15BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
16MOUSEKEY_ENABLE = no # Mouse keys
17EXTRAKEY_ENABLE = yes # Audio control and System control
18CONSOLE_ENABLE = no # Console for debug
19COMMAND_ENABLE = no # Commands for debug and configuration
20# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
21SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
22# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
23NKRO_ENABLE = yes # USB Nkey Rollover
24BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
25RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
26BLUETOOTH_ENABLE = no # Enable Bluetooth
27AUDIO_ENABLE = no # Audio output
28LTO_ENABLE = yes
diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h
index f151bde68..cdb01a974 100644
--- a/users/talljoe/talljoe.h
+++ b/users/talljoe/talljoe.h
@@ -92,6 +92,7 @@ enum layers {
92#define MLT_E LT(_NUM, KC_E) 92#define MLT_E LT(_NUM, KC_E)
93 93
94#ifndef SWAP_HANDS_ENABLE 94#ifndef SWAP_HANDS_ENABLE
95#undef SH_T
95#define SH_T 96#define SH_T
96#endif 97#endif
97 98