aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/0_sixty/0_sixty.c17
-rw-r--r--keyboards/0_sixty/0_sixty.h97
-rw-r--r--keyboards/0_sixty/config.h68
-rw-r--r--keyboards/0_sixty/info.json344
-rw-r--r--keyboards/0_sixty/keymaps/default/keymap.c168
-rw-r--r--keyboards/0_sixty/keymaps/default/readme.md1
-rw-r--r--keyboards/0_sixty/keymaps/ven0mtr0n/keymap.c59
-rw-r--r--keyboards/0_sixty/keymaps/ven0mtr0n/readme.md1
-rw-r--r--keyboards/0_sixty/keymaps/ven0mtr0n/rules.mk1
-rw-r--r--keyboards/0_sixty/keymaps/via/keymap.c116
-rw-r--r--keyboards/0_sixty/keymaps/via/readme.md1
-rw-r--r--keyboards/0_sixty/keymaps/via/rules.mk2
-rw-r--r--keyboards/0_sixty/readme.md27
-rw-r--r--keyboards/0_sixty/rules.mk21
-rw-r--r--keyboards/melody96/keymaps/zunger/keymap.c268
15 files changed, 1168 insertions, 23 deletions
diff --git a/keyboards/0_sixty/0_sixty.c b/keyboards/0_sixty/0_sixty.c
new file mode 100644
index 000000000..40f1362d0
--- /dev/null
+++ b/keyboards/0_sixty/0_sixty.c
@@ -0,0 +1,17 @@
1/* Copyright 2020 Vinam Arora <vinam@posteo.de>
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 "0_sixty.h"
diff --git a/keyboards/0_sixty/0_sixty.h b/keyboards/0_sixty/0_sixty.h
new file mode 100644
index 000000000..5152c246a
--- /dev/null
+++ b/keyboards/0_sixty/0_sixty.h
@@ -0,0 +1,97 @@
1/* Copyright 2020 Vinam Arora <vinam@posteo.de>
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 "quantum.h"
20
21// This a shortcut to help you visually see your layout.
22// The first section contains all of the arguements
23// The second converts the arguments into a two-dimensional array
24#define LAYOUT_ortho_5x12( \
25 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
26 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
27 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
28 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
29 k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \
30) \
31{ \
32 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
33 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
34 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
35 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
36 { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \
37}
38
39#define LAYOUT_1x2uL( \
40 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
41 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
42 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
43 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
44 k40, k41, k42, k43, k45, k46, k47, k48, k49, k4a, k4b \
45) \
46{ \
47 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
48 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
49 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
50 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
51 { k40, k41, k42, k43, k45, k45, k46, k47, k48, k49, k4a, k4b } \
52}
53
54#define LAYOUT_1x2uC( \
55 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
56 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
57 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
58 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
59 k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b \
60) \
61{ \
62 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
63 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
64 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
65 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
66 { k40, k41, k42, k43, k44, k46, k46, k47, k48, k49, k4a, k4b } \
67}
68
69#define LAYOUT_1x2uR( \
70 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
71 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
72 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
73 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
74 k40, k41, k42, k43, k44, k45, k46, k48, k49, k4a, k4b \
75) \
76{ \
77 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
78 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
79 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
80 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
81 { k40, k41, k42, k43, k44, k45, k46, k46, k48, k49, k4a, k4b } \
82}
83
84#define LAYOUT_2x2uC( \
85 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
86 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
87 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
88 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
89 k40, k41, k42, k43, k45, k46, k48, k49, k4a, k4b \
90) \
91{ \
92 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
93 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
94 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
95 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
96 { k40, k41, k42, k43, k45, k45, k46, k46, k48, k49, k4a, k4b } \
97}
diff --git a/keyboards/0_sixty/config.h b/keyboards/0_sixty/config.h
new file mode 100644
index 000000000..fa371a54c
--- /dev/null
+++ b/keyboards/0_sixty/config.h
@@ -0,0 +1,68 @@
1/* Copyright 2020 Vinam Arora <vinam@posteo.de>
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
23#define VENDOR_ID 0x7654
24#define PRODUCT_ID 0x0060
25#define DEVICE_VER 0x0001
26
27#define MANUFACTURER ven0mtr0n
28#define PRODUCT 0-Sixty
29
30/* key matrix size */
31// Rows are doubled-up
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 12
34#define MATRIX_ROW_PINS { B1, F7, F6, F5, F4 }
35#define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B3, B2 }
36#define UNUSED_PINS
37
38/* COL2ROW or ROW2COL */
39#define DIODE_DIRECTION COL2ROW
40
41/* Set 0 if debouncing isn't needed */
42#define DEBOUNCE 5
43
44/* indicator leds */
45#define LED_CAPS_LOCK_PIN B6
46
47/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
48#define LOCKING_SUPPORT_ENABLE
49/* Locking resynchronize hack */
50#define LOCKING_RESYNC_ENABLE
51
52/*
53 * Feature disable options
54 * These options are also useful to firmware size reduction.
55 */
56
57/* disable debug print */
58// #define NO_DEBUG
59
60/* disable print */
61// #define NO_PRINT
62
63/* disable action features */
64//#define NO_ACTION_LAYER
65//#define NO_ACTION_TAPPING
66//#define NO_ACTION_ONESHOT
67//#define NO_ACTION_MACRO
68//#define NO_ACTION_FUNCTION
diff --git a/keyboards/0_sixty/info.json b/keyboards/0_sixty/info.json
new file mode 100644
index 000000000..70cf5f48b
--- /dev/null
+++ b/keyboards/0_sixty/info.json
@@ -0,0 +1,344 @@
1{
2 "keyboard_name": "0-Sixty",
3 "url": "",
4 "maintainer": "vinamarora8",
5 "width": 12,
6 "height": 5,
7 "layouts": {
8 "LAYOUT_1x2uC": {
9 "layout": [
10 {"x": 0, "y": 0},
11 {"x": 1, "y": 0},
12 {"x": 2, "y": 0},
13 {"x": 3, "y": 0},
14 {"x": 4, "y": 0},
15 {"x": 5, "y": 0},
16 {"x": 6, "y": 0},
17 {"x": 7, "y": 0},
18 {"x": 8, "y": 0},
19 {"x": 9, "y": 0},
20 {"x": 10, "y": 0},
21 {"x": 11, "y": 0},
22
23 {"x": 0, "y": 1},
24 {"x": 1, "y": 1},
25 {"x": 2, "y": 1},
26 {"x": 3, "y": 1},
27 {"x": 4, "y": 1},
28 {"x": 5, "y": 1},
29 {"x": 6, "y": 1},
30 {"x": 7, "y": 1},
31 {"x": 8, "y": 1},
32 {"x": 9, "y": 1},
33 {"x": 10, "y": 1},
34 {"x": 11, "y": 1},
35
36 {"x": 0, "y": 2},
37 {"x": 1, "y": 2},
38 {"x": 2, "y": 2},
39 {"x": 3, "y": 2},
40 {"x": 4, "y": 2},
41 {"x": 5, "y": 2},
42 {"x": 6, "y": 2},
43 {"x": 7, "y": 2},
44 {"x": 8, "y": 2},
45 {"x": 9, "y": 2},
46 {"x": 10, "y": 2},
47 {"x": 11, "y": 2},
48
49 {"x": 0, "y": 3},
50 {"x": 1, "y": 3},
51 {"x": 2, "y": 3},
52 {"x": 3, "y": 3},
53 {"x": 4, "y": 3},
54 {"x": 5, "y": 3},
55 {"x": 6, "y": 3},
56 {"x": 7, "y": 3},
57 {"x": 8, "y": 3},
58 {"x": 9, "y": 3},
59 {"x": 10, "y": 3},
60 {"x": 11, "y": 3},
61
62 {"x": 0, "y": 4},
63 {"x": 1, "y": 4},
64 {"x": 2, "y": 4},
65 {"x": 3, "y": 4},
66 {"x": 4, "y": 4},
67 {"x": 5, "y": 4, "w": 2},
68 {"x": 7, "y": 4},
69 {"x": 8, "y": 4},
70 {"x": 9, "y": 4},
71 {"x": 10, "y": 4},
72 {"x": 11, "y": 4}
73 ]
74 },
75 "LAYOUT_2x2uC": {
76 "layout": [
77 {"x": 0, "y": 0},
78 {"x": 1, "y": 0},
79 {"x": 2, "y": 0},
80 {"x": 3, "y": 0},
81 {"x": 4, "y": 0},
82 {"x": 5, "y": 0},
83 {"x": 6, "y": 0},
84 {"x": 7, "y": 0},
85 {"x": 8, "y": 0},
86 {"x": 9, "y": 0},
87 {"x": 10, "y": 0},
88 {"x": 11, "y": 0},
89
90 {"x": 0, "y": 1},
91 {"x": 1, "y": 1},
92 {"x": 2, "y": 1},
93 {"x": 3, "y": 1},
94 {"x": 4, "y": 1},
95 {"x": 5, "y": 1},
96 {"x": 6, "y": 1},
97 {"x": 7, "y": 1},
98 {"x": 8, "y": 1},
99 {"x": 9, "y": 1},
100 {"x": 10, "y": 1},
101 {"x": 11, "y": 1},
102
103 {"x": 0, "y": 2},
104 {"x": 1, "y": 2},
105 {"x": 2, "y": 2},
106 {"x": 3, "y": 2},
107 {"x": 4, "y": 2},
108 {"x": 5, "y": 2},
109 {"x": 6, "y": 2},
110 {"x": 7, "y": 2},
111 {"x": 8, "y": 2},
112 {"x": 9, "y": 2},
113 {"x": 10, "y": 2},
114 {"x": 11, "y": 2},
115
116 {"x": 0, "y": 3},
117 {"x": 1, "y": 3},
118 {"x": 2, "y": 3},
119 {"x": 3, "y": 3},
120 {"x": 4, "y": 3},
121 {"x": 5, "y": 3},
122 {"x": 6, "y": 3},
123 {"x": 7, "y": 3},
124 {"x": 8, "y": 3},
125 {"x": 9, "y": 3},
126 {"x": 10, "y": 3},
127 {"x": 11, "y": 3},
128
129 {"x": 0, "y": 4},
130 {"x": 1, "y": 4},
131 {"x": 2, "y": 4},
132 {"x": 3, "y": 4},
133 {"x": 4, "y": 4, "w": 2},
134 {"x": 6, "y": 4, "w": 2},
135 {"x": 8, "y": 4},
136 {"x": 9, "y": 4},
137 {"x": 10, "y": 4},
138 {"x": 11, "y": 4}
139 ]
140 },
141 "LAYOUT_ortho_5x12": {
142 "layout": [
143 {"x": 0, "y": 0},
144 {"x": 1, "y": 0},
145 {"x": 2, "y": 0},
146 {"x": 3, "y": 0},
147 {"x": 4, "y": 0},
148 {"x": 5, "y": 0},
149 {"x": 6, "y": 0},
150 {"x": 7, "y": 0},
151 {"x": 8, "y": 0},
152 {"x": 9, "y": 0},
153 {"x": 10, "y": 0},
154 {"x": 11, "y": 0},
155
156 {"x": 0, "y": 1},
157 {"x": 1, "y": 1},
158 {"x": 2, "y": 1},
159 {"x": 3, "y": 1},
160 {"x": 4, "y": 1},
161 {"x": 5, "y": 1},
162 {"x": 6, "y": 1},
163 {"x": 7, "y": 1},
164 {"x": 8, "y": 1},
165 {"x": 9, "y": 1},
166 {"x": 10, "y": 1},
167 {"x": 11, "y": 1},
168
169 {"x": 0, "y": 2},
170 {"x": 1, "y": 2},
171 {"x": 2, "y": 2},
172 {"x": 3, "y": 2},
173 {"x": 4, "y": 2},
174 {"x": 5, "y": 2},
175 {"x": 6, "y": 2},
176 {"x": 7, "y": 2},
177 {"x": 8, "y": 2},
178 {"x": 9, "y": 2},
179 {"x": 10, "y": 2},
180 {"x": 11, "y": 2},
181
182 {"x": 0, "y": 3},
183 {"x": 1, "y": 3},
184 {"x": 2, "y": 3},
185 {"x": 3, "y": 3},
186 {"x": 4, "y": 3},
187 {"x": 5, "y": 3},
188 {"x": 6, "y": 3},
189 {"x": 7, "y": 3},
190 {"x": 8, "y": 3},
191 {"x": 9, "y": 3},
192 {"x": 10, "y": 3},
193 {"x": 11, "y": 3},
194
195 {"x": 0, "y": 4},
196 {"x": 1, "y": 4},
197 {"x": 2, "y": 4},
198 {"x": 3, "y": 4},
199 {"x": 4, "y": 4},
200 {"x": 5, "y": 4},
201 {"x": 6, "y": 4},
202 {"x": 7, "y": 4},
203 {"x": 8, "y": 4},
204 {"x": 9, "y": 4},
205 {"x": 10, "y": 4},
206 {"x": 11, "y": 4}
207 ]
208 },
209 "LAYOUT_1x2uR": {
210 "layout": [
211 {"x": 0, "y": 0},
212 {"x": 1, "y": 0},
213 {"x": 2, "y": 0},
214 {"x": 3, "y": 0},
215 {"x": 4, "y": 0},
216 {"x": 5, "y": 0},
217 {"x": 6, "y": 0},
218 {"x": 7, "y": 0},
219 {"x": 8, "y": 0},
220 {"x": 9, "y": 0},
221 {"x": 10, "y": 0},
222 {"x": 11, "y": 0},
223
224 {"x": 0, "y": 1},
225 {"x": 1, "y": 1},
226 {"x": 2, "y": 1},
227 {"x": 3, "y": 1},
228 {"x": 4, "y": 1},
229 {"x": 5, "y": 1},
230 {"x": 6, "y": 1},
231 {"x": 7, "y": 1},
232 {"x": 8, "y": 1},
233 {"x": 9, "y": 1},
234 {"x": 10, "y": 1},
235 {"x": 11, "y": 1},
236
237 {"x": 0, "y": 2},
238 {"x": 1, "y": 2},
239 {"x": 2, "y": 2},
240 {"x": 3, "y": 2},
241 {"x": 4, "y": 2},
242 {"x": 5, "y": 2},
243 {"x": 6, "y": 2},
244 {"x": 7, "y": 2},
245 {"x": 8, "y": 2},
246 {"x": 9, "y": 2},
247 {"x": 10, "y": 2},
248 {"x": 11, "y": 2},
249
250 {"x": 0, "y": 3},
251 {"x": 1, "y": 3},
252 {"x": 2, "y": 3},
253 {"x": 3, "y": 3},
254 {"x": 4, "y": 3},
255 {"x": 5, "y": 3},
256 {"x": 6, "y": 3},
257 {"x": 7, "y": 3},
258 {"x": 8, "y": 3},
259 {"x": 9, "y": 3},
260 {"x": 10, "y": 3},
261 {"x": 11, "y": 3},
262
263 {"x": 0, "y": 4},
264 {"x": 1, "y": 4},
265 {"x": 2, "y": 4},
266 {"x": 3, "y": 4},
267 {"x": 4, "y": 4},
268 {"x": 5, "y": 4},
269 {"x": 6, "y": 4, "w": 2},
270 {"x": 8, "y": 4},
271 {"x": 9, "y": 4},
272 {"x": 10, "y": 4},
273 {"x": 11, "y": 4}
274 ]
275 },
276 "LAYOUT_1x2uL": {
277 "layout": [
278 {"x": 0, "y": 0},
279 {"x": 1, "y": 0},
280 {"x": 2, "y": 0},
281 {"x": 3, "y": 0},
282 {"x": 4, "y": 0},
283 {"x": 5, "y": 0},
284 {"x": 6, "y": 0},
285 {"x": 7, "y": 0},
286 {"x": 8, "y": 0},
287 {"x": 9, "y": 0},
288 {"x": 10, "y": 0},
289 {"x": 11, "y": 0},
290
291 {"x": 0, "y": 1},
292 {"x": 1, "y": 1},
293 {"x": 2, "y": 1},
294 {"x": 3, "y": 1},
295 {"x": 4, "y": 1},
296 {"x": 5, "y": 1},
297 {"x": 6, "y": 1},
298 {"x": 7, "y": 1},
299 {"x": 8, "y": 1},
300 {"x": 9, "y": 1},
301 {"x": 10, "y": 1},
302 {"x": 11, "y": 1},
303
304 {"x": 0, "y": 2},
305 {"x": 1, "y": 2},
306 {"x": 2, "y": 2},
307 {"x": 3, "y": 2},
308 {"x": 4, "y": 2},
309 {"x": 5, "y": 2},
310 {"x": 6, "y": 2},
311 {"x": 7, "y": 2},
312 {"x": 8, "y": 2},
313 {"x": 9, "y": 2},
314 {"x": 10, "y": 2},
315 {"x": 11, "y": 2},
316
317 {"x": 0, "y": 3},
318 {"x": 1, "y": 3},
319 {"x": 2, "y": 3},
320 {"x": 3, "y": 3},
321 {"x": 4, "y": 3},
322 {"x": 5, "y": 3},
323 {"x": 6, "y": 3},
324 {"x": 7, "y": 3},
325 {"x": 8, "y": 3},
326 {"x": 9, "y": 3},
327 {"x": 10, "y": 3},
328 {"x": 11, "y": 3},
329
330 {"x": 0, "y": 4},
331 {"x": 1, "y": 4},
332 {"x": 2, "y": 4},
333 {"x": 3, "y": 4},
334 {"x": 4, "y": 4, "w": 2},
335 {"x": 6, "y": 4},
336 {"x": 7, "y": 4},
337 {"x": 8, "y": 4},
338 {"x": 9, "y": 4},
339 {"x": 10, "y": 4},
340 {"x": 11, "y": 4}
341 ]
342 }
343 }
344}
diff --git a/keyboards/0_sixty/keymaps/default/keymap.c b/keyboards/0_sixty/keymaps/default/keymap.c
new file mode 100644
index 000000000..21a5a218a
--- /dev/null
+++ b/keyboards/0_sixty/keymaps/default/keymap.c
@@ -0,0 +1,168 @@
1/* Copyright 2020 Vinam Arora <vinam@posteo.de>
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
19enum zero_sixty_layers {
20 _QWERTY,
21 _COLEMAK,
22 _DVORAK,
23 _LOWER,
24 _RAISE,
25 _ADJUST
26};
27
28#define QWERTY DF(_QWERTY)
29#define COLEMAK DF(_COLEMAK)
30#define DVORAK DF(_DVORAK)
31#define LOWER MO(_LOWER)
32#define RAISE MO(_RAISE)
33#define ADJUST MO(_ADJUST)
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36
37/* Qwerty
38 * ,-----------------------------------------------------------------------------------.
39 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
40 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
42 * |------+------+------+------+------+-------------+------+------+------+------+------|
43 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
44 * |------+------+------+------+------+------|------+------+------+------+------+------|
45 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
46 * |------+------+------+------+------+------+------+------+------+------+------+------|
47 * | Caps | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
48 * `-----------------------------------------------------------------------------------'
49 */
50[_QWERTY] = LAYOUT_ortho_5x12(
51 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
52 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
53 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
54 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
55 KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
56),
57
58/* Colemak
59 * ,-----------------------------------------------------------------------------------.
60 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
61 * |------+------+------+------+------+------+------+------+------+------+------+------|
62 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
63 * |------+------+------+------+------+-------------+------+------+------+------+------|
64 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
65 * |------+------+------+------+------+------|------+------+------+------+------+------|
66 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
67 * |------+------+------+------+------+------+------+------+------+------+------+------|
68 * | Caps | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
69 * `-----------------------------------------------------------------------------------'
70 */
71[_COLEMAK] = LAYOUT_ortho_5x12(
72 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
73 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL,
74 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
75 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
76 KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
77),
78
79/* Dvorak
80 * ,-----------------------------------------------------------------------------------.
81 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
82 * |------+------+------+------+------+------+------+------+------+------+------+------|
83 * | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
84 * |------+------+------+------+------+-------------+------+------+------+------+------|
85 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
86 * |------+------+------+------+------+------|------+------+------+------+------+------|
87 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
88 * |------+------+------+------+------+------+------+------+------+------+------+------|
89 * | Caps | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
90 * `-----------------------------------------------------------------------------------'
91 */
92[_DVORAK] = LAYOUT_ortho_5x12(
93 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
94 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL,
95 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
96 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT,
97 KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
98),
99
100/* Lower
101 * ,-----------------------------------------------------------------------------------.
102 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
103 * |------+------+------+------+------+-------------+------+------+------+------+------|
104 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
105 * |------+------+------+------+------+-------------+------+------+------+------+------|
106 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
107 * |------+------+------+------+------+------|------+------+------+------+------+------|
108 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
109 * |------+------+------+------+------+------+------+------+------+------+------+------|
110 * | | | | | | | | Next | Vol- | Vol+ | Play |
111 * `-----------------------------------------------------------------------------------'
112 */
113[_LOWER] = LAYOUT_ortho_5x12(
114 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
115 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
116 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
117 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______,
118 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
119),
120
121/* Raise
122 * ,-----------------------------------------------------------------------------------.
123 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
124 * |------+------+------+------+------+------+------+------+------+------+------+------|
125 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
126 * |------+------+------+------+------+-------------+------+------+------+------+------|
127 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
128 * |------+------+------+------+------+------|------+------+------+------+------+------|
129 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
130 * |------+------+------+------+------+------+------+------+------+------+------+------|
131 * | | | | | | | | Next | Vol- | Vol+ | Play |
132 * `-----------------------------------------------------------------------------------'
133 */
134[_RAISE] = LAYOUT_ortho_5x12(
135 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
136 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
137 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
138 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
139 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
140),
141
142/* Adjust
143 * ,-----------------------------------------------------------------------------------.
144 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
145 * |------+------+------+------+------+------+------+------+------+------+------+------|
146 * | | Reset| | | | | | | | | | Del |
147 * |------+------+------+------+------+-------------+------+------+------+------+------|
148 * | | | | | | | |Qwerty|Colemk|Dvorak| | |
149 * |------+------+------+------+------+------|------+------+------+------+------+------|
150 * | | | | | | | | | | | | |
151 * |------+------+------+------+------+------+------+------+------+------+------+------|
152 * | | | | | | | | | | | |
153 * `-----------------------------------------------------------------------------------'
154 */
155[_ADJUST] = LAYOUT_ortho_5x12(
156 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
157 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
158 _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______,
159 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
160 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
161)
162
163
164};
165
166layer_state_t layer_state_set_user(layer_state_t state) {
167 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
168}
diff --git a/keyboards/0_sixty/keymaps/default/readme.md b/keyboards/0_sixty/keymaps/default/readme.md
new file mode 100644
index 000000000..8922bb9ee
--- /dev/null
+++ b/keyboards/0_sixty/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default 0-Sixty layout - largely based on the Preonic's and Planck's \ No newline at end of file
diff --git a/keyboards/0_sixty/keymaps/ven0mtr0n/keymap.c b/keyboards/0_sixty/keymaps/ven0mtr0n/keymap.c
new file mode 100644
index 000000000..f1869cd22
--- /dev/null
+++ b/keyboards/0_sixty/keymaps/ven0mtr0n/keymap.c
@@ -0,0 +1,59 @@
1/* Copyright 2020 Vinam Arora <vinam@posteo.de>
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
19enum zero_sixty_layers {
20 _DEFAULT,
21 _L1,
22 _L2,
23 _L3,
24};
25
26const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
27[_DEFAULT] = LAYOUT_1x2uC( /* qwerty */
28 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC ,
29 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT ,
30 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RCTL ,
31 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT ,
32 KC_LGUI, MO(_L3), MO(_L2), KC_LALT, MO(_L1), KC_SPC, MO(_L1), KC_RALT, MO(_L2), MO(_L3), KC_RGUI
33),
34
35[_L1] = LAYOUT_1x2uC(
36 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
37 _______, KC_LBRC, KC_LT, KC_GT, KC_RBRC, KC_TILD, KC_PIPE, KC_GRV, KC_QUOT, KC_DQUO, KC_PGUP, _______ ,
38 _______, KC_LCBR, KC_LPRN, KC_RPRN, KC_RCBR, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGDN, _______ ,
39 _______, KC_APP, _______, _______, _______, _______, KC_EQL, KC_UNDS, KC_MINS, KC_PLUS, KC_BSLS, _______ ,
40 _______, _______, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, _______
41),
42
43[_L2] = LAYOUT_1x2uC(
44 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______ ,
45 _______, _______, _______, _______, _______, KC_VOLU, _______, KC_7, KC_8, KC_9, KC_F11, _______ ,
46 _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_4, KC_5, KC_6, KC_F12, _______ ,
47 _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MUTE, KC_1, KC_2, KC_3, KC_PSCR, _______ ,
48 _______, _______, KC_CAPS, _______, _______, _______, KC_0, _______, KC_CAPS, _______, _______
49),
50
51[_L3] = LAYOUT_1x2uC(
52 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
53 _______, _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______ ,
54 _______, _______, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______ ,
55 _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______ ,
56 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
57),
58
59};
diff --git a/keyboards/0_sixty/keymaps/ven0mtr0n/readme.md b/keyboards/0_sixty/keymaps/ven0mtr0n/readme.md
new file mode 100644
index 000000000..584faadf7
--- /dev/null
+++ b/keyboards/0_sixty/keymaps/ven0mtr0n/readme.md
@@ -0,0 +1 @@
# Keymap used by vinam. Keeps changing ofcourse :3 \ No newline at end of file
diff --git a/keyboards/0_sixty/keymaps/ven0mtr0n/rules.mk b/keyboards/0_sixty/keymaps/ven0mtr0n/rules.mk
new file mode 100644
index 000000000..6c605daec
--- /dev/null
+++ b/keyboards/0_sixty/keymaps/ven0mtr0n/rules.mk
@@ -0,0 +1 @@
MOUSEKEY_ENABLE = yes
diff --git a/keyboards/0_sixty/keymaps/via/keymap.c b/keyboards/0_sixty/keymaps/via/keymap.c
new file mode 100644
index 000000000..758e2533d
--- /dev/null
+++ b/keyboards/0_sixty/keymaps/via/keymap.c
@@ -0,0 +1,116 @@
1/* Copyright 2020 Vinam Arora <vinam@posteo.de>
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// 4 layers, because that is what VIA can support by default
20enum zero_sixty_layers {
21 _QWERTY,
22 _LOWER,
23 _RAISE,
24 _ADJUST,
25};
26
27#define LOWER MO(_LOWER)
28#define RAISE MO(_RAISE)
29#define ADJUST MO(_ADJUST)
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
36 * |------+------+------+------+------+------+------+------+------+------+------+------|
37 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
38 * |------+------+------+------+------+-------------+------+------+------+------+------|
39 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
40 * |------+------+------+------+------+------|------+------+------+------+------+------|
41 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
42 * |------+------+------+------+------+------+------+------+------+------+------+------|
43 * | Caps | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
44 * `-----------------------------------------------------------------------------------'
45 */
46[_QWERTY] = LAYOUT_ortho_5x12(
47 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
48 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
49 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
50 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
51 KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
52),
53
54/* Lower
55 * ,-----------------------------------------------------------------------------------.
56 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
57 * |------+------+------+------+------+-------------+------+------+------+------+------|
58 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
59 * |------+------+------+------+------+-------------+------+------+------+------+------|
60 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
61 * |------+------+------+------+------+------|------+------+------+------+------+------|
62 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
63 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * | | | | | | | | Next | Vol- | Vol+ | Play |
65 * `-----------------------------------------------------------------------------------'
66 */
67[_LOWER] = LAYOUT_ortho_5x12(
68 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
69 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
70 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
71 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______,
72 _______, _______, _______, _______, _______, _______, _______, ADJUST, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
73),
74
75/* Raise
76 * ,-----------------------------------------------------------------------------------.
77 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
78 * |------+------+------+------+------+------+------+------+------+------+------+------|
79 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
80 * |------+------+------+------+------+-------------+------+------+------+------+------|
81 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
82 * |------+------+------+------+------+------|------+------+------+------+------+------|
83 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
84 * |------+------+------+------+------+------+------+------+------+------+------+------|
85 * | | | | | | | | Next | Vol- | Vol+ | Play |
86 * `-----------------------------------------------------------------------------------'
87 */
88[_RAISE] = LAYOUT_ortho_5x12(
89 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
90 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
91 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
92 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
93 _______, _______, _______, _______, ADJUST, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
94),
95
96/* Adjust
97 * ,-----------------------------------------------------------------------------------.
98 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
99 * |------+------+------+------+------+------+------+------+------+------+------+------|
100 * | | Reset| | | | | | | | | | Del |
101 * |------+------+------+------+------+-------------+------+------+------+------+------|
102 * | | | | | | | | | | | | |
103 * |------+------+------+------+------+------|------+------+------+------+------+------|
104 * | | | | | | | | | | | | |
105 * |------+------+------+------+------+------+------+------+------+------+------+------|
106 * | | | | | | | | | | | |
107 * `-----------------------------------------------------------------------------------'
108 */
109[_ADJUST] = LAYOUT_ortho_5x12(
110 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
111 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
112 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
113 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
114 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
115),
116};
diff --git a/keyboards/0_sixty/keymaps/via/readme.md b/keyboards/0_sixty/keymaps/via/readme.md
new file mode 100644
index 000000000..106c6d795
--- /dev/null
+++ b/keyboards/0_sixty/keymaps/via/readme.md
@@ -0,0 +1 @@
# The default via-supported 0-Sixty layout - largely based on the Preonic's and Planck's \ No newline at end of file
diff --git a/keyboards/0_sixty/keymaps/via/rules.mk b/keyboards/0_sixty/keymaps/via/rules.mk
new file mode 100644
index 000000000..eb5b445dd
--- /dev/null
+++ b/keyboards/0_sixty/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2MOUSEKEY_ENABLE = yes
diff --git a/keyboards/0_sixty/readme.md b/keyboards/0_sixty/readme.md
new file mode 100644
index 000000000..19b4ef96d
--- /dev/null
+++ b/keyboards/0_sixty/readme.md
@@ -0,0 +1,27 @@
1# 0-Sixty
2
3![0-Sixty](https://imgur.com/azmMb6Rl.jpg)
4
5![0-Sixty PCB](https://i.imgur.com/I0TkQ0Rl.jpg)
6
70-Sixty (pronounced "zero to sixty") is a 60 key ortholinear keyboard inspired by the [Discipline](https://github.com/coseyfannitutti/discipline) and the [Preonic](https://drop.com/buy/preonic-mechanical-keyboard). It is designed as a DIY through-hole kit and uses the ProMicro as its controller.
8
9[More images here](https://imgur.com/a/b0JINqX)
10
11* Keyboard Maintainer: [vinamarora8](https://github.com/vinamarora8)
12* Hardware Supported: 0-Sixty PCB
13* Hardware Availability: Private Group-Buy
14
15Getting the board into bootloader mode:
16
17To be able to flash firmware onto this board, you'll need to bring the ProMicro into bootloader mode. Simply tap the small reset button twice. The button is placed to the right of the ProMicro.
18
19Make example for this keyboard (after setting up your build environment):
20
21 make 0_sixty:default
22
23Flashing example for this keyboard:
24
25 make 0_sixty:default:flash
26
27See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/0_sixty/rules.mk b/keyboards/0_sixty/rules.mk
new file mode 100644
index 000000000..92df0f561
--- /dev/null
+++ b/keyboards/0_sixty/rules.mk
@@ -0,0 +1,21 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = caterina
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
11EXTRAKEY_ENABLE = yes # Audio control and System control
12CONSOLE_ENABLE = yes # Console for debug
13COMMAND_ENABLE = yes # Commands for debug and configuration
14# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
15SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
16# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
17NKRO_ENABLE = yes # USB Nkey Rollover
18BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
19RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
20BLUETOOTH_ENABLE = no # Enable Bluetooth
21AUDIO_ENABLE = no # Audio output
diff --git a/keyboards/melody96/keymaps/zunger/keymap.c b/keyboards/melody96/keymaps/zunger/keymap.c
index d396de683..d0d2698b7 100644
--- a/keyboards/melody96/keymaps/zunger/keymap.c
+++ b/keyboards/melody96/keymaps/zunger/keymap.c
@@ -14,6 +14,83 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17#include <assert.h>
18
19// This keymap is designed to make it easy to type in a wide variety of languages, as well as
20// generate mathematical symbols (à la Space Cadet).
21//
22// LAYER MAGIC (aka, typing in many alphabets)
23// This keyboard has three "base" layers: QWERTY, GREEK, and CADET. The GREEK and CADET layers
24// are actually full of Unicode points, and so which point they generate depends on things like
25// whether the shift key is down. To handle this, each of those layers is actually *two* layers, one
26// with and one without shift. In our main loop, we manage modifier state detection, as well as
27// layer switch detection, and pick the right layer on the fly.
28// Layers are selected with a combination of three keys. The "Greek" and "Cadet" keys act like
29// modifiers: When held down, they transiently select the indicated base layer. The "Layer Lock" key
30// locks the value of the base layer at whatever is currently held; so e.g., if you hold Greek +
31// Layer Lock, you'll stay in Greek mode until you hit Layer Lock again without any of the mods
32// held.
33// TODO: This system of layer selection is nice for math, but it's not very nice for actually
34// typing in multiple languages. It seems like a better plan will be to reserve one key for each
35// base layer -- maybe fn + F(n) -- which can either be held as a modifier or tapped to switch
36// layers. That will open up adding some more languages, like Yiddish, but to do this effectively
37// we'll need to find a good UI with which to show the currently selected layer. Need to check what
38// the melody96 has in the way of outputs (LEDs, sound, etc).
39//
40// ACCENT MAGIC (aka, typing conveniently in Romance languages)
41// We want to support easy typing of diacritical marks. We can't rely on the host OS for this,
42// because (e.g.) on MacOS, to make any of the other stuff work, we need to be using the Unicode
43// input method at the OS level, which breaks all the normal accent stuff on that end. So we do it
44// ourselves. Accents can actually be invoked in two different ways: one fast and very compatible,
45// one very versatile but with occasional compatibility problems.
46//
47// THE MAIN WAY: You can hit one of the "accent request" key patterns immediately *before* typing
48// a letter to be accented. It will emit the corresponding accented Unicode. For example, you can
49// hit fn-e to request an acute accent, followed by i, and it will output í, U+00ED LATIN SMALL
50// LETTER I WITH ACUTE. These "combined characters" are in Unicode normal form C (NFKC), which is
51// important because many European websites and apps, in particular, tend to behave very badly
52// (misunderstanding and/or crashing) when presented with characters in other forms! The catch is
53// that this only works for the various combinations of letters and accents found in the Latin-1
54// supplement block of Unicode -- basically, things you need for Western European languages.
55//
56// (NB: If you make an accent request followed by a letter which can't take the corresponding
57// accent, it will output the uncombined form of the accent followed by whatever you typed; so
58// e.g., if you hit fn-e followed by f, it will output ´f, U+00B4 ACUTE ACCENT followed by an
59// ordinary f. This is very similar to the default behavior of MacOS.)
60//
61// THE FLEXIBLE WAY: If you hit the accent request with a shift -- e.g., fn-shift-e -- it will
62// instead immediately output the corresponding *combining* Unicode accent mark, which will modify
63// the *previous* character you typed. For example, if you type i followed by fn-shift-e, it will
64// generate í. But don't be fooled by visual similarity: unlike the previous example, this one is
65// an ordinary i followed by U+0301 COMBINING ACUTE ACCENT. It's actually *two symbols*, and this
66// is Unicode normal form D (NFKD). Unlike NFKC, there are NFKD representations of far more
67// combinations of letters and accents, and it's easy to add more of these if you need. (The NFKC
68// representation of such combinations is identical to their NFKD representation)
69//
70// Programs that try to compare Unicode strings *should* first normalize them by converting them
71// all into one normal form or another, and there are functions in every programming language to
72// do this -- e.g., JavaScript's string.normalize() -- but lots of programmers fail to understand
73// this, and so write code that massively freaks out when it encounters the wrong form.
74//
75// The current accent request codes are modeled on the ones in MacOS.
76//
77// fn+` Grave accent (`)
78// fn+e Acute accent (´)
79// fn+i Circumflex (^)
80// fn+u Diaresis / umlaut / trema (¨)
81// fn+c Cedilla (¸)
82// fn+n Tilde (˜)
83//
84// Together, these functions make for a nice "polyglot" keyboard: one that can easily type in a wide
85// variety of languages, which is very useful for people who, well, need to type in a bunch of
86// languages.
87//
88// The major TODOs are:
89// - Update the layer selection logic (and add visible layer cues);
90// - Factor the code below so that the data layers are more clearly separated from the code logic,
91// so that other users of this keymap can easily add whichever alphabets they need without
92// having to deeply understand the implementation.
93
17 94
18enum custom_keycodes { 95enum custom_keycodes {
19 // We provide special layer management keys: 96 // We provide special layer management keys:
@@ -32,6 +109,16 @@ enum custom_keycodes {
32 KC_GREEK = SAFE_RANGE, 109 KC_GREEK = SAFE_RANGE,
33 KC_CADET, 110 KC_CADET,
34 KC_LAYER_LOCK, 111 KC_LAYER_LOCK,
112
113 // These are the keycodes generated by the various "accent request" keystrokes.
114 KC_ACCENT_START,
115 KC_CGRV = KC_ACCENT_START, // Grave accent
116 KC_CAGU, // Acute accent
117 KC_CDIA, // Diaresis / umlaut / trema
118 KC_CCIR, // Circumflex
119 KC_CCED, // Cedilla
120 KC_CTIL, // Tilde
121 KC_ACCENT_END,
35}; 122};
36 123
37enum layers_keymap { 124enum layers_keymap {
@@ -49,21 +136,6 @@ enum layers_keymap {
49#define MO_FN MO(_FUNCTION) 136#define MO_FN MO(_FUNCTION)
50#define KC_LLCK KC_LAYER_LOCK 137#define KC_LLCK KC_LAYER_LOCK
51 138
52// TODO: To generalize this, we want some #defines that let us specify how each key on the base
53// layer should map to the four special layers, and then use that plus the base layer definition to
54// autogenerate the keymaps for the other layers.
55// TODO: It would also be nice to be able to put the actual code points in here, rather than
56// numbers.
57
58// Accent marks
59#define CMB_GRV H(0300)
60#define CMB_AGU H(0301)
61#define CMB_DIA H(0308)
62#define CMB_CIR H(0302)
63#define CMB_MAC H(0304)
64#define CMB_CED H(0327)
65#define CMB_TIL H(0303)
66
67 139
68const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 140const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
69 // NB: Using GESC for escape in the QWERTY layer as a temporary hack because I messed up the 141 // NB: Using GESC for escape in the QWERTY layer as a temporary hack because I messed up the
@@ -164,14 +236,119 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
164 // Function layer is mostly for keyboard meta-control operations, but also contains the combining 236 // Function layer is mostly for keyboard meta-control operations, but also contains the combining
165 // accent marks. These are deliberately placed to match where the analogous controls go on Mac OS. 237 // accent marks. These are deliberately placed to match where the analogous controls go on Mac OS.
166 [_FUNCTION] = LAYOUT_hotswap( 238 [_FUNCTION] = LAYOUT_hotswap(
167 CMB_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RESET, 239 KC_CGRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RESET,
168 CMB_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 240 KC_CGRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
169 _______, _______, _______, CMB_AGU, _______, _______, _______, CMB_DIA, CMB_CIR, CMB_MAC, _______, _______, _______, _______, _______, _______, _______, 241 _______, _______, _______, KC_CAGU, _______, _______, _______, KC_CDIA, KC_CCIR, _______, _______, _______, _______, _______, _______, _______, _______,
170 _______, _______, _______, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_BS, UC_M_WC, _______, _______, _______, _______, _______, _______, _______, _______, _______, 242 _______, _______, _______, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_BS, UC_M_WC, _______, _______, _______, _______, _______, _______, _______, _______, _______,
171 _______, _______, _______, CMB_CED, _______, _______, CMB_TIL, _______, _______, _______, _______, _______, _______, _______, _______, _______, 243 _______, _______, _______, KC_CCED, _______, _______, KC_CTIL, _______, _______, _______, _______, _______, _______, _______, _______, _______,
172 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), 244 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
173}; 245};
174 246
247////////////////////////////////////////////////////////////////////////////////////////////////////
248// Accent implementation
249//
250// In the body of process_record_user, we store an "accent_request", which is the accent keycode if
251// one was just selected, or zero otherwise. When the *next* key is hit, we look up whether the
252// accent request plus that next keycode (plus the state of the shift key) together amount to an
253// interesting combined (NFKC) character, and if so, emit it; otherwise, we emit the accent as a
254// separate character and then process the next key normally. The resulting UI behavior is similar
255// to that of the combining accent keys in MacOS.
256//
257// We store two arrays, depending on whether shift is or isn't held. Each is two-dimensional, with
258// its outer key by the next keycode struck, and the inner key by the accent requested. The outer
259// array has KC_Z + 1 as its upper bound, so that we can save memory by only coding alphabetic keys.
260// The contents are either Unicode code points, or zero to indicate that we don't have a point for
261// this combination.
262
263#define KC_NUM_ACCENTS (KC_ACCENT_END - KC_ACCENT_START)
264#define KC_NUM_SLOTS (KC_Z + 1)
265
266const uint16_t PROGMEM unshifted_accents[KC_NUM_SLOTS][KC_NUM_ACCENTS] = {
267 // KC_CGRV, KC_CAGU, KC_CDIA, KC_CCIR, KC_CCED, KC_CTIL
268 [KC_A] = { 0x00e0, 0x00e1, 0x00e4, 0x00e2, 0, 0x00e3 },
269 [KC_E] = { 0x00e8, 0x00e9, 0x00eb, 0x00ea, 0, 0 },
270 [KC_I] = { 0x00ec, 0x00ed, 0x00ef, 0x00ee, 0, 0 },
271 [KC_O] = { 0x00f2, 0x00f3, 0x00f6, 0x00f4, 0, 0x00f5 },
272 [KC_U] = { 0x00f9, 0x00fa, 0x00fc, 0x00fb, 0, 0 },
273 [KC_Y] = { 0, 0, 0x00ff, 0, 0, 0 },
274 [KC_N] = { 0, 0, 0, 0, 0, 0x00f1 },
275 [KC_C] = { 0, 0, 0, 0, 0x00e7, 0 },
276};
277
278const uint16_t PROGMEM shifted_accents[KC_NUM_SLOTS][KC_NUM_ACCENTS] = {
279 // KC_CGRV, KC_CAGU, KC_CDIA, KC_CCIR, KC_CCED, KC_CTIL
280 [KC_A] = { 0x00c0, 0x00c1, 0x00c4, 0x00c2, 0, 0x00c3 },
281 [KC_E] = { 0x00c8, 0x00c9, 0x00cb, 0x00ca, 0, 0 },
282 [KC_I] = { 0x00cc, 0x00cd, 0x00cf, 0x00ce, 0, 0 },
283 [KC_O] = { 0x00d2, 0x00d3, 0x00d6, 0x00d4, 0, 0x00d5 },
284 [KC_U] = { 0x00d9, 0x00da, 0x00dc, 0x00db, 0, 0 },
285 [KC_Y] = { 0, 0, 0x00df, 0, 0, 0 },
286 [KC_N] = { 0, 0, 0, 0, 0, 0x00d1 },
287 [KC_C] = { 0, 0, 0, 0, 0x00c7, 0 },
288};
289
290// The uncombined and combined forms of the accents, for when we want to emit them as single
291// characters.
292const uint16_t PROGMEM uncombined_accents[KC_NUM_ACCENTS] = {
293 [KC_CGRV - KC_ACCENT_START] = 0x0060,
294 [KC_CAGU - KC_ACCENT_START] = 0x00b4,
295 [KC_CDIA - KC_ACCENT_START] = 0x00a8,
296 [KC_CCIR - KC_ACCENT_START] = 0x005e,
297 [KC_CCED - KC_ACCENT_START] = 0x00b8,
298 [KC_CTIL - KC_ACCENT_START] = 0x02dc,
299};
300
301const uint16_t PROGMEM combined_accents[KC_NUM_ACCENTS] = {
302 [KC_CGRV - KC_ACCENT_START] = 0x0300,
303 [KC_CAGU - KC_ACCENT_START] = 0x0301,
304 [KC_CDIA - KC_ACCENT_START] = 0x0308,
305 [KC_CCIR - KC_ACCENT_START] = 0x0302,
306 [KC_CCED - KC_ACCENT_START] = 0x0327,
307 [KC_CTIL - KC_ACCENT_START] = 0x0303,
308};
309
310// This function manages keypresses that happen after an accent has been selected by an earlier
311// keypress.
312// Args:
313// accent_key: The accent key which was earlier selected. This must be in the range
314// [KC_ACCENT_START, KC_ACCENT_END).
315// keycode: The keycode which was just pressed.
316// is_shifted: The current shift state (as set by a combination of shift and caps lock)
317// force_no_accent: If true, we're in a situation where we want to force there to be no
318// accent combination -- if e.g. we're in a non-QWERTY layer, or if other modifier keys
319// are held.
320//
321// Returns true if the keycode has been completely handled by this function (and so should not be
322// processed further by process_record_user) or false otherwise.
323bool process_key_after_accent(
324 uint16_t accent_key,
325 uint16_t keycode,
326 bool is_shifted,
327 bool force_no_accent
328) {
329 assert(accent_key >= KC_ACCENT_START);
330 assert(accent_key < KC_ACCENT_END);
331 const int accent_index = accent_key - KC_ACCENT_START;
332
333 // If the keycode is outside A..Z, or force_no_accent is set, we know we shouldn't even bother
334 // with a table lookup.
335 if (keycode <= KC_Z && !force_no_accent) {
336 // Pick the correct array. Because this is progmem, we're going to need to do the
337 // two-dimensional array indexing by hand, and so we just cast it to a single-dimensional array.
338 const uint16_t *points = (const uint16_t*)(is_shifted ? shifted_accents : unshifted_accents);
339 const uint16_t code_point = pgm_read_word_near(points + KC_NUM_ACCENTS * keycode + accent_index);
340 if (code_point) {
341 register_unicode(code_point);
342 return true;
343 }
344 }
345
346 // If we get here, there was no accent match. Emit the accent as its own character, and then let
347 // the caller figure out what to do next.
348 register_unicode(pgm_read_word_near(uncombined_accents + accent_index));
349 return false;
350}
351
175// Layer bitfields. 352// Layer bitfields.
176#define GREEK_LAYER (1UL << _GREEK) 353#define GREEK_LAYER (1UL << _GREEK)
177#define SHIFTGREEK_LAYER (1UL << _SHIFTGREEK) 354#define SHIFTGREEK_LAYER (1UL << _SHIFTGREEK)
@@ -185,6 +362,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
185 // get_mods or the like, because this function is called *before* that's updated! 362 // get_mods or the like, because this function is called *before* that's updated!
186 static bool shift_held = false; 363 static bool shift_held = false;
187 static bool alt_held = false; 364 static bool alt_held = false;
365 static bool ctrl_held = false;
366 static bool super_held = false;
188 static bool greek_held = false; 367 static bool greek_held = false;
189 static bool cadet_held = false; 368 static bool cadet_held = false;
190 369
@@ -192,18 +371,36 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
192 static bool shift_lock = false; 371 static bool shift_lock = false;
193 static int layer_lock = _QWERTY; 372 static int layer_lock = _QWERTY;
194 373
195 // Process any modifier key presses. 374 // The accent request, or zero if there isn't one.
375 static uint16_t accent_request = 0;
376
377 // If this is set to true, don't trigger any handling of pending accent requests. That's what we
378 // want to do if e.g. the user just hit the shift key or something.
379 bool ignore_accent_change = !record->event.pressed;
380
381 // Step 1: Process any modifier key state changes, so we can maintain that state.
196 if (keycode == KC_LSHIFT || keycode == KC_RSHIFT) { 382 if (keycode == KC_LSHIFT || keycode == KC_RSHIFT) {
197 shift_held = record->event.pressed; 383 shift_held = record->event.pressed;
384 ignore_accent_change = true;
198 } else if (keycode == KC_LALT || keycode == KC_RALT) { 385 } else if (keycode == KC_LALT || keycode == KC_RALT) {
199 alt_held = record->event.pressed; 386 alt_held = record->event.pressed;
387 ignore_accent_change = true;
388 } else if (keycode == KC_LCTRL || keycode == KC_RCTRL) {
389 ctrl_held = record->event.pressed;
390 ignore_accent_change = true;
391 } else if (keycode == KC_LGUI || keycode == KC_RGUI) {
392 super_held = record->event.pressed;
393 ignore_accent_change = true;
200 } else if (keycode == KC_GREEK) { 394 } else if (keycode == KC_GREEK) {
201 greek_held = record->event.pressed; 395 greek_held = record->event.pressed;
396 ignore_accent_change = true;
202 } else if (keycode == KC_CADET) { 397 } else if (keycode == KC_CADET) {
203 cadet_held = record->event.pressed; 398 cadet_held = record->event.pressed;
399 ignore_accent_change = true;
204 } 400 }
205 401
206 // Now let's transform these into the "cadet request" and "greek request." 402 // Step 2: Figure out which layer we're supposed to be in, by transforming all the prior stuff
403 // into layer requests.
207 const bool greek_request = (greek_held && !alt_held); 404 const bool greek_request = (greek_held && !alt_held);
208 const bool cadet_request = (cadet_held || (greek_held && alt_held)); 405 const bool cadet_request = (cadet_held || (greek_held && alt_held));
209 406
@@ -260,8 +457,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
260 layer_state_set(new_layer_state); 457 layer_state_set(new_layer_state);
261 } 458 }
262 459
263 // TODO: We can update LED states based on shift_lock (caps), layer_lock (layer lock), and 460 // Step 3: Handle accents. If there's a pending accent request, process it. If what the user just
264 // base_layer (base layer). 461 // hit creates a new accent request, update the pending state for the next keypress.
462 if (!ignore_accent_change && accent_request && record->event.pressed) {
463 // Only do the accent stuff if we're in the QWERTY layer and we aren't modifying something.
464 const bool force_no_accent = (
465 actual_layer != _QWERTY ||
466 ctrl_held ||
467 super_held ||
468 alt_held
469 );
470 const uint16_t old_accent = accent_request;
471 accent_request = 0;
472 if (process_key_after_accent(old_accent, keycode, shifted, force_no_accent)) {
473 return false;
474 }
475 }
476
477 // And if a new accent request just arrived, update accent_request.
478 if (keycode >= KC_ACCENT_START && keycode < KC_ACCENT_END && record->event.pressed) {
479 if (shifted) {
480 // Shift + accent request generates the combining accent key, and leaves accent_request alone.
481 register_unicode(pgm_read_word_near(combined_accents + keycode - KC_ACCENT_START));
482 return false;
483 } else {
484 accent_request = keycode;
485 }
486 }
265 487
266 return true; 488 return true;
267} 489}