aboutsummaryrefslogtreecommitdiff
path: root/keyboards/butterstick/keymaps
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/butterstick/keymaps')
-rw-r--r--keyboards/butterstick/keymaps/default/keymap.c183
-rw-r--r--keyboards/butterstick/keymaps/dennytom/README.md11
-rw-r--r--keyboards/butterstick/keymaps/dennytom/keymap.c1418
-rw-r--r--keyboards/butterstick/keymaps/dennytom/keymap_def.json309
-rw-r--r--keyboards/butterstick/keymaps/dennytom/rules.mk8
5 files changed, 1929 insertions, 0 deletions
diff --git a/keyboards/butterstick/keymaps/default/keymap.c b/keyboards/butterstick/keymaps/default/keymap.c
new file mode 100644
index 000000000..749e9ba07
--- /dev/null
+++ b/keyboards/butterstick/keymaps/default/keymap.c
@@ -0,0 +1,183 @@
1#include QMK_KEYBOARD_H
2
3#include "sten.h"
4/*
5 * Key names are inherited from steno machines
6 * .-----------------------------------------------------.
7 * | LSU | LFT | LP | LH | ST1 | RF | RP | RL | RT | RD |
8 * |-----------------------------------------------------|
9 * | LSD | LK | LW | LR | ST2 | RR | RB | RG | RS | RZ |
10 * '-----------------------------------------------------'
11 */
12
13// Function prefixes
14#define MEDIA (LSD | LK | LW | LR)
15#define FUNCT (LSD | LK | LP | LH)
16#define MOVE (LSU | LFT | LP | LH)
17#define SYMB (RD | RZ)
18#define NUMA (LW | LR)
19#define NUMB (RR | RB)
20
21// QMK Layer Numbers
22 #define BASE 0
23 #define GAME 1
24
25// Do not change QMK Layer 0! This is your main keyboard.
26// Make your QMK modifications to the later layers, to add
27// keys/customize on the first layer modify processQwerty():
28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29 [BASE] = LAYOUT_butter(
30 STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
31 STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR
32 ),
33 // I don't game don't roast me thanks
34 [GAME] = LAYOUT_butter(
35 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_ENT,
36 KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TO(BASE)
37 )
38};
39
40// Note: You can only use basic keycodes here!
41// P() is just a wrapper to make your life easier, any C code can be executed.
42// Only the longest matched chord is run!
43//
44// http://docs.gboards.ca
45uint32_t processQwerty(bool lookup) {
46 // SECRET AGENT CHORDS
47 P( LSU | LK | RS | RD, SEND_STRING(VERSION); SEND_STRING(__DATE__));
48 P( LR | ST2| RR | RB, SEND(KC_BSPC));
49 P( LSD | RZ, SEND(KC_SPC));
50
51 // Dual chords
52 P( LP | LH, CLICK_MOUSE(KC_MS_BTN2));
53 P( ST1 | RF, CLICK_MOUSE(KC_MS_BTN1));
54 P( LSU | LFT, SEND(KC_ESC));
55 P( LSD | LK, SEND(KC_LSFT));
56 P( RZ | RS, SEND(KC_LSFT));
57 P( ST2 | RR, SEND(KC_SPC));
58 P( RP | RL, SEND(KC_LGUI));
59 P( RT | RD, SEND(KC_LCTL));
60 P( RL | RT, SEND(KC_LALT));
61 P( LSU | LSD | LFT | LK, SEND(KC_LCTL));
62 P( RS | RT | RD | RZ, SEND(KC_ENT));
63
64 // Function Layer
65 P( FUNCT | RF, SEND(KC_F1));
66 P( FUNCT | RP, SEND(KC_F2));
67 P( FUNCT | RL, SEND(KC_F3));
68 P( FUNCT | RT, SEND(KC_F4));
69 P( FUNCT | RF | RR, SEND(KC_F5));
70 P( FUNCT | RP | RB, SEND(KC_F6));
71 P( FUNCT | RL | RG, SEND(KC_F7));
72 P( FUNCT | RT | RS, SEND(KC_F8));
73 P( FUNCT | RR, SEND(KC_F9));
74 P( FUNCT | RB, SEND(KC_F10));
75 P( FUNCT | RG, SEND(KC_F11));
76 P( FUNCT | RS, SEND(KC_F12));
77
78 // Movement Layer
79 P( MOVE | RF, SEND(KC_LEFT));
80 P( MOVE | RP, SEND(KC_DOWN));
81 P( MOVE | RL, SEND(KC_UP));
82 P( MOVE | RT, SEND(KC_RIGHT));
83 P( MOVE | ST1, SEND(KC_PGUP));
84 P( MOVE | ST2, SEND(KC_PGDN));
85
86 // Media Layer
87 P( MEDIA | RF, SEND(KC_MPRV));
88 P( MEDIA | RP, SEND(KC_MPLY));
89 P( MEDIA | RL, SEND(KC_MPLY));
90 P( MEDIA | RT, SEND(KC_MNXT));
91 P( MEDIA | RG, SEND(KC_VOLU));
92 P( MEDIA | RB, SEND(KC_VOLD));
93 P( MEDIA | RS, SEND(KC_MUTE));
94
95 // Number Row, Right
96 P( NUMB | LSU, SEND(KC_1));
97 P( NUMB | LFT, SEND(KC_2));
98 P( NUMB | LP, SEND(KC_3));
99 P( NUMB | LH, SEND(KC_4));
100 P( NUMB | ST1, SEND(KC_5));
101 P( NUMB | RF, SEND(KC_6));
102 P( NUMB | RP, SEND(KC_7));
103 P( NUMB | RL, SEND(KC_8));
104 P( NUMB | RT, SEND(KC_9));
105 P( NUMB | RD, SEND(KC_0));
106
107 // Number Row, Left
108 P( NUMA | LSU, SEND(KC_1));
109 P( NUMA | LFT, SEND(KC_2));
110 P( NUMA | LP, SEND(KC_3));
111 P( NUMA | LH, SEND(KC_4));
112 P( NUMA | ST1, SEND(KC_5));
113 P( NUMA | RF, SEND(KC_6));
114 P( NUMA | RP, SEND(KC_7));
115 P( NUMA | RL, SEND(KC_8));
116 P( NUMA | RT, SEND(KC_9));
117 P( NUMA | RD, SEND(KC_0));
118
119
120 // Symbols and Numbers
121 P( SYMB | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // (
122 P( SYMB | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // )
123 P( SYMB | ST1 | ST2, SEND(KC_GRV)); // `
124 P( SYMB | RR | RF, SEND(KC_LSFT); SEND(KC_3)); // #
125 P( SYMB | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $
126 P( SYMB | LSU, SEND(KC_LSFT); SEND(KC_1)); // !
127 P( SYMB | LSD, SEND(KC_LSFT); SEND(KC_5)); // %
128 P( SYMB | LFT, SEND(KC_LSFT); SEND(KC_2)); // @
129 P( SYMB | LK, SEND(KC_LSFT); SEND(KC_6)); // ^
130 P( SYMB | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // {
131 P( SYMB | LW, SEND(KC_LBRC));
132 P( SYMB | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // }
133 P( SYMB | LR, SEND(KC_RBRC));
134 P( SYMB | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // |
135 P( SYMB | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~
136 P( SYMB | RP | RB, SEND(KC_QUOT));
137 P( SYMB | RP | RG, SEND(KC_LSFT); SEND(KC_QUOT)); // "
138 P( SYMB | RF, SEND(KC_KP_PLUS));
139 P( SYMB | RR, SEND(KC_LSFT); SEND(KC_7)); // &
140 P( SYMB | RP, SEND(KC_MINS));
141 P( SYMB | RB, SEND(KC_EQL));
142 P( SYMB | RL, SEND(KC_SLSH));
143 P( SYMB | RG, SEND(KC_COMM));
144 P( SYMB | RT, SEND(KC_PAST));
145 P( SYMB | RS, SEND(KC_DOT));
146
147 // Letters
148 P( LSU | LSD, SEND(KC_A));
149 P( LFT | LK, SEND(KC_S));
150 P( LP | LW, SEND(KC_D));
151 P( LH | LR, SEND(KC_F));
152 P( ST1 | ST2, SEND(KC_G));
153 P( RF | RR, SEND(KC_H));
154 P( RT | RS, SEND(KC_L));
155 P( RD | RZ, SEND(KC_SCLN));
156 P( RG | RL, SEND(KC_K));
157 P( RP | RB, SEND(KC_J));
158 P( LSU, SEND(KC_Q));
159 P( LSD, SEND(KC_Z));
160 P( LFT, SEND(KC_W));
161 P( LK, SEND(KC_X));
162 P( LP, SEND(KC_E));
163 P( LW, SEND(KC_C));
164 P( LH, SEND(KC_R));
165 P( LR, SEND(KC_V));
166 P( ST1, SEND(KC_T));
167 P( ST2, SEND(KC_B));
168 P( RF, SEND(KC_Y));
169 P( RR, SEND(KC_N));
170 P( RP, SEND(KC_U));
171 P( RB, SEND(KC_M));
172 P( RL, SEND(KC_I));
173 P( RG, SEND(KC_COMM));
174 P( RT, SEND(KC_O));
175 P( RS, SEND(KC_DOT));
176 P( RD, SEND(KC_P));
177 P( RZ, SEND(KC_SLSH));
178
179 return 0;
180}
181
182// Don't fuck with this, thanks.
183size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]);
diff --git a/keyboards/butterstick/keymaps/dennytom/README.md b/keyboards/butterstick/keymaps/dennytom/README.md
new file mode 100644
index 000000000..a75bcc750
--- /dev/null
+++ b/keyboards/butterstick/keymaps/dennytom/README.md
@@ -0,0 +1,11 @@
1# # Dennytom's Butterstick Layout
2
3This keymap is using a custom chording engine. Head out to my (DennyTom) user space to find the source files and details.
4
5To make a real keymap from the JSON file, run
6
7```sh
8python3 parser.py keymap_def.json keymap.c
9```
10
11Somehow it fits the whole keyboard on 20 keys. For longer typing sessions, use the ASET NIOP mode. \ No newline at end of file
diff --git a/keyboards/butterstick/keymaps/dennytom/keymap.c b/keyboards/butterstick/keymaps/dennytom/keymap.c
new file mode 100644
index 000000000..bfe0aa215
--- /dev/null
+++ b/keyboards/butterstick/keymaps/dennytom/keymap.c
@@ -0,0 +1,1418 @@
1#include QMK_KEYBOARD_H
2
3#define CHORD_TIMEOUT 100
4#define DANCE_TIMEOUT 200
5#define LEADER_TIMEOUT 750
6#define TAP_TIMEOUT 50
7#define LONG_PRESS_MULTIPLIER 3
8#define DYNAMIC_MACRO_MAX_LENGTH 20
9#define COMMAND_MAX_LENGTH 5
10#define LEADER_MAX_LENGTH 5
11#define HASH_TYPE uint32_t
12#define NUMBER_OF_KEYS 20
13#define DEFAULT_PSEUDOLAYER QWERTY
14
15#define H_TOP1 ((HASH_TYPE) 1 << 0)
16#define H_TOP2 ((HASH_TYPE) 1 << 1)
17#define H_TOP3 ((HASH_TYPE) 1 << 2)
18#define H_TOP4 ((HASH_TYPE) 1 << 3)
19#define H_TOP5 ((HASH_TYPE) 1 << 4)
20#define H_TOP6 ((HASH_TYPE) 1 << 5)
21#define H_TOP7 ((HASH_TYPE) 1 << 6)
22#define H_TOP8 ((HASH_TYPE) 1 << 7)
23#define H_TOP9 ((HASH_TYPE) 1 << 8)
24#define H_TOP0 ((HASH_TYPE) 1 << 9)
25#define H_BOT1 ((HASH_TYPE) 1 << 10)
26#define H_BOT2 ((HASH_TYPE) 1 << 11)
27#define H_BOT3 ((HASH_TYPE) 1 << 12)
28#define H_BOT4 ((HASH_TYPE) 1 << 13)
29#define H_BOT5 ((HASH_TYPE) 1 << 14)
30#define H_BOT6 ((HASH_TYPE) 1 << 15)
31#define H_BOT7 ((HASH_TYPE) 1 << 16)
32#define H_BOT8 ((HASH_TYPE) 1 << 17)
33#define H_BOT9 ((HASH_TYPE) 1 << 18)
34#define H_BOT0 ((HASH_TYPE) 1 << 19)
35
36enum internal_keycodes {
37 TOP1 = SAFE_RANGE,
38 TOP2, TOP3, TOP4, TOP5, TOP6, TOP7, TOP8, TOP9, TOP0, BOT1, BOT2, BOT3, BOT4, BOT5, BOT6, BOT7, BOT8, BOT9, BOT0,
39 FIRST_INTERNAL_KEYCODE = TOP1,
40 LAST_INTERNAL_KEYCODE = BOT0
41};
42
43enum pseudolayers {
44 ALWAYS_ON, QWERTY, NUM, MOV, MOUSE, ASETNIOP, ASETNIOP_123, ASETNIOP_FN
45};
46
47const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
48 [0] = LAYOUT_butter(TOP1, TOP2, TOP3, TOP4, TOP5, TOP6, TOP7, TOP8, TOP9, TOP0, BOT1, BOT2, BOT3, BOT4, BOT5, BOT6, BOT7, BOT8, BOT9, BOT0),
49};
50size_t keymapsCount = 1;
51
52uint8_t keycodes_buffer_array[] = {
53 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
54};
55
56uint8_t command_buffer[] = {
57 0, 0, 0, 0, 0
58};
59
60uint16_t leader_buffer[] = {
61 0, 0, 0, 0, 0
62};
63
64uint8_t dynamic_macro_buffer[] = {
65 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
66};
67
68enum chord_states {
69 IDLE,
70 READY,
71 ACTIVATED,
72 DEACTIVATED,
73 PRESS_FROM_ACTIVE,
74 FINISHED_FROM_ACTIVE,
75 IDLE_IN_DANCE,
76 READY_IN_DANCE,
77 FINISHED,
78 LOCKED,
79 READY_LOCKED,
80 RESTART,
81 IN_ONE_SHOT
82};
83
84struct Chord {
85 uint32_t keycodes_hash;
86 uint8_t pseudolayer;
87 uint8_t* state;
88 uint8_t* counter;
89 uint16_t value1;
90 uint8_t value2;
91 void (*function) (const struct Chord*);
92};
93
94uint8_t current_pseudolayer = DEFAULT_PSEUDOLAYER;
95bool lock_next = false;
96uint16_t chord_timer = 0;
97uint16_t dance_timer = 0;
98bool autoshift_mode = true;
99uint8_t keycode_index = 0;
100uint8_t command_mode = 0;
101uint8_t command_ind = 0;
102bool in_leader_mode = false;
103uint8_t leader_ind = 0;
104uint16_t leader_timer = 0;
105uint8_t dynamic_macro_mode = false;
106uint8_t dynamic_macro_ind = 0;
107bool a_key_went_through = false;
108struct Chord* last_chord = NULL;
109
110bool handle_US_ANSI_shifted_keys(int16_t keycode, bool in) {
111 bool is_US_ANSI_shifted = true;
112
113 int16_t regular_keycode = KC_NO;
114 switch (keycode) {
115 case KC_TILDE:
116 regular_keycode = KC_GRAVE;
117 break;
118 case KC_EXCLAIM:
119 regular_keycode = KC_1;
120 break;
121 case KC_AT:
122 regular_keycode = KC_2;
123 break;
124 case KC_HASH:
125 regular_keycode = KC_3;
126 break;
127 case KC_DOLLAR:
128 regular_keycode = KC_4;
129 break;
130 case KC_PERCENT:
131 regular_keycode = KC_5;
132 break;
133 case KC_CIRCUMFLEX:
134 regular_keycode = KC_6;
135 break;
136 case KC_AMPERSAND:
137 regular_keycode = KC_7;
138 break;
139 case KC_ASTERISK:
140 regular_keycode = KC_8;
141 break;
142 case KC_LEFT_PAREN:
143 regular_keycode = KC_9;
144 break;
145 case KC_RIGHT_PAREN:
146 regular_keycode = KC_0;
147 break;
148 case KC_UNDERSCORE:
149 regular_keycode = KC_MINUS;
150 break;
151 case KC_PLUS:
152 regular_keycode = KC_EQUAL;
153 break;
154 case KC_LEFT_CURLY_BRACE:
155 regular_keycode = KC_LBRACKET;
156 break;
157 case KC_RIGHT_CURLY_BRACE:
158 regular_keycode = KC_RBRACKET;
159 break;
160 case KC_PIPE:
161 regular_keycode = KC_BSLASH;
162 break;
163 case KC_COLON:
164 regular_keycode = KC_SCOLON;
165 break;
166 case KC_DOUBLE_QUOTE:
167 regular_keycode = KC_QUOTE;
168 break;
169 case KC_LEFT_ANGLE_BRACKET:
170 regular_keycode = KC_COMMA;
171 break;
172 case KC_RIGHT_ANGLE_BRACKET:
173 regular_keycode = KC_DOT;
174 break;
175 case KC_QUESTION:
176 regular_keycode = KC_SLASH;
177 break;
178 default:
179 is_US_ANSI_shifted = false;
180 }
181 if (is_US_ANSI_shifted) {
182 if (in) {
183 register_code(KC_LSFT);
184 register_code(regular_keycode);
185 } else {
186 unregister_code(regular_keycode);
187 unregister_code(KC_LSFT);
188 }
189 }
190 return is_US_ANSI_shifted;
191}
192
193void key_in(int16_t keycode) {
194 if (command_mode == 1 && command_ind < COMMAND_MAX_LENGTH) {
195 command_buffer[command_ind] = keycode;
196 command_ind++;
197 a_key_went_through = true;
198 } else if (in_leader_mode && leader_ind < LEADER_MAX_LENGTH) {
199 leader_buffer[leader_ind] = keycode;
200 leader_ind++;
201 a_key_went_through = true;
202 } else if (dynamic_macro_mode && dynamic_macro_ind < DYNAMIC_MACRO_MAX_LENGTH) {
203 dynamic_macro_buffer[dynamic_macro_ind] = keycode;
204 dynamic_macro_ind++;
205 a_key_went_through = true;
206 } else {
207 if (!handle_US_ANSI_shifted_keys(keycode, true)) {
208 register_code(keycode);
209 }
210 send_keyboard_report();
211 a_key_went_through = true;
212 }
213}
214
215void key_out(int16_t keycode) {
216 if (command_mode == 0) {
217 if (!handle_US_ANSI_shifted_keys(keycode, false)) {
218 if (command_mode == 0 && in_leader_mode == false && dynamic_macro_mode == false) {
219 unregister_code(keycode);
220 }
221 }
222 send_keyboard_report();
223 }
224}
225
226void tap_key(int16_t keycode) {
227 key_in(keycode);
228 wait_ms(TAP_TIMEOUT);
229 key_out(keycode);
230}
231void single_dance(const struct Chord* self) {
232 switch (*self->state) {
233 case ACTIVATED:
234 key_in(self->value1);
235 break;
236 case DEACTIVATED:
237 key_out(self->value1);
238 *self->state = IDLE;
239 break;
240 case RESTART:
241 key_out(self->value1);
242 break;
243 default:
244 break;
245 }
246}
247
248void key_layer_dance(const struct Chord* self) {
249 switch (*self->state) {
250 case ACTIVATED:
251 current_pseudolayer = self->value2;
252 a_key_went_through = false;
253 break;
254 case DEACTIVATED:
255 case RESTART:
256 if (!a_key_went_through) {
257 tap_key(self->value1);
258 }
259 current_pseudolayer = self->pseudolayer;
260 *self->state = IDLE; // does not have effect if the state was RESTART
261 break;
262 default:
263 break;
264 }
265}
266
267void key_mod_dance(const struct Chord* self) {
268 switch (*self->state) {
269 case ACTIVATED:
270 key_in(self->value2);
271 a_key_went_through = false;
272 break;
273 case DEACTIVATED:
274 case RESTART:
275 key_out(self->value2);
276 if (!a_key_went_through) {
277 tap_key(self->value1);
278 }
279 *self->state = IDLE; // does not have effect if the state was RESTART
280 break;
281 default:
282 break;
283 }
284}
285
286void key_key_dance(const struct Chord* self) {
287 switch (*self->state) {
288 case ACTIVATED:
289 break;
290 case DEACTIVATED:
291 tap_key(self->value1);
292 *self->state = IDLE;
293 break;
294 case FINISHED:
295 case PRESS_FROM_ACTIVE:
296 key_in(self->value2);
297 break;
298 case RESTART:
299 key_out(self->value2);
300 break;
301 default:
302 break;
303 }
304}
305
306void autoshift_dance_impl(const struct Chord* self) {
307 switch (*self->state) {
308 case ACTIVATED:
309 *self->counter = 0;
310 break;
311 case DEACTIVATED:
312 case RESTART:
313 tap_key(self->value1);
314 *self->state = IDLE;
315 break;
316 case FINISHED_FROM_ACTIVE:
317 if (*self->counter == (LONG_PRESS_MULTIPLIER - 2)) {
318 key_in(KC_LSFT);
319 tap_key(self->value1);
320 key_out(KC_LSFT);
321 *self->state = IDLE;
322 // the skip to IDLE is usually just a lag optimization,
323 // in this case it has a logic function, on a short
324 // press (still longer than a tap) the key does not get shifted
325 } else {
326 *self->counter += 1;
327 *self->state = PRESS_FROM_ACTIVE;
328 dance_timer = timer_read();
329 }
330 break;
331 default:
332 break;
333 }
334}
335
336void autoshift_dance(const struct Chord* self) {
337 if (autoshift_mode) {
338 autoshift_dance_impl(self);
339 } else {
340 single_dance(self);
341 }
342}
343
344void autoshift_toggle(const struct Chord* self){
345 if (*self->state == ACTIVATED) {
346 autoshift_mode = !autoshift_mode;
347 *self->state = IDLE;
348 }
349}
350
351void temp_pseudolayer(const struct Chord* self) {
352 switch (*self->state) {
353 case ACTIVATED:
354 current_pseudolayer = self->value1;
355 break;
356 case DEACTIVATED:
357 current_pseudolayer = self->pseudolayer;
358 *self->state = IDLE;
359 break;
360 case RESTART:
361 current_pseudolayer = self->pseudolayer;
362 break;
363 default:
364 break;
365 }
366}
367
368void perm_pseudolayer(const struct Chord* self) {
369 if (*self->state == ACTIVATED) {
370 current_pseudolayer = self->value1;
371 *self->state = IDLE;
372 }
373}
374
375void switch_layer(const struct Chord* self) {
376 if (*self->state == ACTIVATED) {
377 layer_move(self->value1);
378 *self->state = IDLE;
379 }
380}
381
382void lock(const struct Chord* self) {
383 if (*self->state == ACTIVATED) {
384 lock_next = true;
385 *self->state = IDLE;
386 }
387}
388
389void one_shot_key(const struct Chord* self) {
390 switch (*self->state) {
391 case ACTIVATED:
392 break;
393 case DEACTIVATED:
394 key_in(self->value1);
395 *self->state = IN_ONE_SHOT;
396 break;
397 case FINISHED:
398 case PRESS_FROM_ACTIVE:
399 key_in(self->value1);
400 a_key_went_through = false;
401 break;
402 case RESTART:
403 if (a_key_went_through) {
404 key_out(self->value1);
405 } else {
406 *self->state = IN_ONE_SHOT;
407 }
408 default:
409 break;
410 }
411}
412
413void one_shot_layer(const struct Chord* self) {
414 switch (*self->state) {
415 case ACTIVATED:
416 break;
417 case DEACTIVATED:
418 current_pseudolayer = self->value1;
419 *self->state = IN_ONE_SHOT;
420 break;
421 case FINISHED:
422 case PRESS_FROM_ACTIVE:
423 current_pseudolayer = self->value1;
424 a_key_went_through = false;
425 break;
426 case RESTART:
427 if (a_key_went_through) {
428 current_pseudolayer = self->pseudolayer;
429 } else {
430 *self->state = IN_ONE_SHOT;
431 }
432 default:
433 break;
434 }
435}
436
437void command(const struct Chord* self) {
438 if (*self->state == ACTIVATED) {
439 command_mode++;
440 *self->state = IDLE;
441 }
442}
443
444bool identical(uint16_t* buffer1, uint16_t* buffer2) {
445 bool same = true;
446 for (int i = 0; i < LEADER_MAX_LENGTH; i++) {
447 same = same && (buffer1[i] == buffer2[i]);
448 }
449 return same;
450}
451
452void leader(const struct Chord* self) {
453 if (*self->state == ACTIVATED) {
454 in_leader_mode = true;
455 *self->state = IDLE;
456 }
457}
458
459void dynamic_macro_record(const struct Chord* self) {
460 if (*self->state == ACTIVATED) {
461 for (int i = 0; i < DYNAMIC_MACRO_MAX_LENGTH; i++) {
462 dynamic_macro_buffer[i] = 0;
463 }
464 dynamic_macro_mode = true;
465 *self->state = IDLE;
466 }
467}
468
469void dynamic_macro_next(const struct Chord* self) {
470 if (*self->state == ACTIVATED) {
471 if (dynamic_macro_mode && dynamic_macro_ind < DYNAMIC_MACRO_MAX_LENGTH) {
472 dynamic_macro_buffer[dynamic_macro_ind] = 0;
473 dynamic_macro_ind++;
474 }
475 *self->state = IDLE;
476 }
477}
478
479void dynamic_macro_end(const struct Chord* self) {
480 if (*self->state == ACTIVATED) {
481 if (dynamic_macro_mode) {
482 dynamic_macro_mode = false;
483 }
484 *self->state = IDLE;
485 }
486}
487
488void dynamic_macro_play(const struct Chord* self) {
489 if (*self->state == ACTIVATED) {
490 int ind_start = 0;
491 while (ind_start < DYNAMIC_MACRO_MAX_LENGTH) {
492 for (int i = ind_start; i < DYNAMIC_MACRO_MAX_LENGTH; i++) {
493 if (dynamic_macro_buffer[i] == 0) {
494 break;
495 }
496 register_code(dynamic_macro_buffer[i]);
497 }
498 send_keyboard_report();
499 wait_ms(TAP_TIMEOUT);
500 for (int i = ind_start; i < DYNAMIC_MACRO_MAX_LENGTH; i++) {
501 if (dynamic_macro_buffer[i] == 0) {
502 ind_start = i + 1;
503 break;
504 }
505 unregister_code(dynamic_macro_buffer[i]);
506 }
507 send_keyboard_report();
508 }
509 *self->state = IDLE;
510 }
511}
512
513void clear(const struct Chord* self);
514
515void reset_keyboard_kb(void){
516#ifdef WATCHDOG_ENABLE
517 MCUSR = 0;
518 wdt_disable();
519 wdt_reset();
520#endif
521 reset_keyboard();
522}
523
524void reset(const struct Chord* self) {
525 if (*self->state == ACTIVATED) {
526 reset_keyboard_kb();
527 }
528}
529
530uint8_t state_0 = IDLE;
531const struct Chord chord_0 PROGMEM = {H_TOP1 + H_TOP2 + H_BOT1 + H_BOT2, ALWAYS_ON, &state_0, NULL, 0, 0, lock};
532uint8_t state_1 = IDLE;
533const struct Chord chord_1 PROGMEM = {H_TOP2 + H_TOP3 + H_BOT2 + H_BOT3, ALWAYS_ON, &state_1, NULL, 0, 0, autoshift_toggle};
534uint8_t state_2 = IDLE;
535const struct Chord chord_2 PROGMEM = {H_TOP5 + H_TOP6 + H_BOT5 + H_BOT6, ALWAYS_ON, &state_2, NULL, 0, 0, command};
536uint8_t state_3 = IDLE;
537const struct Chord chord_3 PROGMEM = {H_TOP1 + H_TOP2 + H_TOP9 + H_TOP0 + H_BOT1 + H_BOT2 + H_BOT9 + H_BOT0, ALWAYS_ON, &state_3, NULL, 0, 0, clear};
538uint8_t state_4 = IDLE;
539uint8_t counter_4 = 0;
540const struct Chord chord_4 PROGMEM = {H_TOP1, QWERTY, &state_4, &counter_4, KC_Q, 0, autoshift_dance};
541uint8_t state_5 = IDLE;
542uint8_t counter_5 = 0;
543const struct Chord chord_5 PROGMEM = {H_TOP2, QWERTY, &state_5, &counter_5, KC_W, 0, autoshift_dance};
544uint8_t state_6 = IDLE;
545uint8_t counter_6 = 0;
546const struct Chord chord_6 PROGMEM = {H_TOP3, QWERTY, &state_6, &counter_6, KC_E, 0, autoshift_dance};
547uint8_t state_7 = IDLE;
548uint8_t counter_7 = 0;
549const struct Chord chord_7 PROGMEM = {H_TOP4, QWERTY, &state_7, &counter_7, KC_R, 0, autoshift_dance};
550uint8_t state_8 = IDLE;
551uint8_t counter_8 = 0;
552const struct Chord chord_8 PROGMEM = {H_TOP5, QWERTY, &state_8, &counter_8, KC_T, 0, autoshift_dance};
553uint8_t state_9 = IDLE;
554uint8_t counter_9 = 0;
555const struct Chord chord_9 PROGMEM = {H_TOP6, QWERTY, &state_9, &counter_9, KC_Y, 0, autoshift_dance};
556uint8_t state_10 = IDLE;
557uint8_t counter_10 = 0;
558const struct Chord chord_10 PROGMEM = {H_TOP7, QWERTY, &state_10, &counter_10, KC_U, 0, autoshift_dance};
559uint8_t state_11 = IDLE;
560uint8_t counter_11 = 0;
561const struct Chord chord_11 PROGMEM = {H_TOP8, QWERTY, &state_11, &counter_11, KC_I, 0, autoshift_dance};
562uint8_t state_12 = IDLE;
563uint8_t counter_12 = 0;
564const struct Chord chord_12 PROGMEM = {H_TOP9, QWERTY, &state_12, &counter_12, KC_O, 0, autoshift_dance};
565uint8_t state_13 = IDLE;
566uint8_t counter_13 = 0;
567const struct Chord chord_13 PROGMEM = {H_TOP0, QWERTY, &state_13, &counter_13, KC_P, 0, autoshift_dance};
568uint8_t state_14 = IDLE;
569uint8_t counter_14 = 0;
570const struct Chord chord_14 PROGMEM = {H_TOP1 + H_BOT1, QWERTY, &state_14, &counter_14, KC_A, 0, autoshift_dance};
571uint8_t state_15 = IDLE;
572uint8_t counter_15 = 0;
573const struct Chord chord_15 PROGMEM = {H_TOP2 + H_BOT2, QWERTY, &state_15, &counter_15, KC_S, 0, autoshift_dance};
574uint8_t state_16 = IDLE;
575uint8_t counter_16 = 0;
576const struct Chord chord_16 PROGMEM = {H_TOP3 + H_BOT3, QWERTY, &state_16, &counter_16, KC_D, 0, autoshift_dance};
577uint8_t state_17 = IDLE;
578uint8_t counter_17 = 0;
579const struct Chord chord_17 PROGMEM = {H_TOP4 + H_BOT4, QWERTY, &state_17, &counter_17, KC_F, 0, autoshift_dance};
580uint8_t state_18 = IDLE;
581uint8_t counter_18 = 0;
582const struct Chord chord_18 PROGMEM = {H_TOP5 + H_BOT5, QWERTY, &state_18, &counter_18, KC_G, 0, autoshift_dance};
583uint8_t state_19 = IDLE;
584uint8_t counter_19 = 0;
585const struct Chord chord_19 PROGMEM = {H_TOP6 + H_BOT6, QWERTY, &state_19, &counter_19, KC_H, 0, autoshift_dance};
586uint8_t state_20 = IDLE;
587uint8_t counter_20 = 0;
588const struct Chord chord_20 PROGMEM = {H_TOP7 + H_BOT7, QWERTY, &state_20, &counter_20, KC_J, 0, autoshift_dance};
589uint8_t state_21 = IDLE;
590uint8_t counter_21 = 0;
591const struct Chord chord_21 PROGMEM = {H_TOP8 + H_BOT8, QWERTY, &state_21, &counter_21, KC_K, 0, autoshift_dance};
592uint8_t state_22 = IDLE;
593uint8_t counter_22 = 0;
594const struct Chord chord_22 PROGMEM = {H_TOP9 + H_BOT9, QWERTY, &state_22, &counter_22, KC_L, 0, autoshift_dance};
595uint8_t state_23 = IDLE;
596uint8_t counter_23 = 0;
597const struct Chord chord_23 PROGMEM = {H_TOP0 + H_BOT0, QWERTY, &state_23, &counter_23, KC_SCOLON, 0, autoshift_dance};
598uint8_t state_24 = IDLE;
599uint8_t counter_24 = 0;
600const struct Chord chord_24 PROGMEM = {H_BOT1, QWERTY, &state_24, &counter_24, KC_Z, 0, autoshift_dance};
601uint8_t state_25 = IDLE;
602uint8_t counter_25 = 0;
603const struct Chord chord_25 PROGMEM = {H_BOT2, QWERTY, &state_25, &counter_25, KC_X, 0, autoshift_dance};
604uint8_t state_26 = IDLE;
605uint8_t counter_26 = 0;
606const struct Chord chord_26 PROGMEM = {H_BOT3, QWERTY, &state_26, &counter_26, KC_C, 0, autoshift_dance};
607uint8_t state_27 = IDLE;
608uint8_t counter_27 = 0;
609const struct Chord chord_27 PROGMEM = {H_BOT4, QWERTY, &state_27, &counter_27, KC_V, 0, autoshift_dance};
610uint8_t state_28 = IDLE;
611uint8_t counter_28 = 0;
612const struct Chord chord_28 PROGMEM = {H_BOT5, QWERTY, &state_28, &counter_28, KC_B, 0, autoshift_dance};
613uint8_t state_29 = IDLE;
614uint8_t counter_29 = 0;
615const struct Chord chord_29 PROGMEM = {H_BOT6, QWERTY, &state_29, &counter_29, KC_N, 0, autoshift_dance};
616uint8_t state_30 = IDLE;
617uint8_t counter_30 = 0;
618const struct Chord chord_30 PROGMEM = {H_BOT7, QWERTY, &state_30, &counter_30, KC_M, 0, autoshift_dance};
619uint8_t state_31 = IDLE;
620uint8_t counter_31 = 0;
621const struct Chord chord_31 PROGMEM = {H_BOT8, QWERTY, &state_31, &counter_31, KC_COMMA, 0, autoshift_dance};
622uint8_t state_32 = IDLE;
623uint8_t counter_32 = 0;
624const struct Chord chord_32 PROGMEM = {H_BOT9, QWERTY, &state_32, &counter_32, KC_DOT, 0, autoshift_dance};
625uint8_t state_33 = IDLE;
626uint8_t counter_33 = 0;
627const struct Chord chord_33 PROGMEM = {H_BOT0, QWERTY, &state_33, &counter_33, KC_SLASH, 0, autoshift_dance};
628uint8_t state_34 = IDLE;
629const struct Chord chord_34 PROGMEM = {H_TOP1 + H_TOP2, QWERTY, &state_34, NULL, KC_ESC, 0, single_dance};
630uint8_t state_35 = IDLE;
631const struct Chord chord_35 PROGMEM = {H_TOP2 + H_TOP3, QWERTY, &state_35, NULL, MOV, 0, temp_pseudolayer};
632uint8_t state_36 = IDLE;
633const struct Chord chord_36 PROGMEM = {H_TOP3 + H_TOP4, QWERTY, &state_36, NULL, KC_TAB, 0, single_dance};
634uint8_t state_37 = IDLE;
635const struct Chord chord_37 PROGMEM = {H_TOP5 + H_TOP6, QWERTY, &state_37, NULL, KC_RGUI, 0, one_shot_key};
636uint8_t state_38 = IDLE;
637const struct Chord chord_38 PROGMEM = {H_TOP7 + H_TOP8, QWERTY, &state_38, NULL, KC_INS, 0, single_dance};
638uint8_t state_39 = IDLE;
639const struct Chord chord_39 PROGMEM = {H_TOP8 + H_TOP9, QWERTY, &state_39, NULL, KC_DEL, 0, single_dance};
640uint8_t state_40 = IDLE;
641const struct Chord chord_40 PROGMEM = {H_TOP9 + H_TOP0, QWERTY, &state_40, NULL, KC_BSPC, 0, single_dance};
642uint8_t state_41 = IDLE;
643const struct Chord chord_41 PROGMEM = {H_TOP9 + H_TOP0 + H_BOT9 + H_BOT0, QWERTY, &state_41, NULL, KC_ENTER, 0, single_dance};
644uint8_t state_42 = IDLE;
645const struct Chord chord_42 PROGMEM = {H_BOT1 + H_BOT2, QWERTY, &state_42, NULL, KC_LSFT, 0, one_shot_key};
646uint8_t state_43 = IDLE;
647const struct Chord chord_43 PROGMEM = {H_BOT2 + H_BOT3, QWERTY, &state_43, NULL, KC_LCTL, 0, one_shot_key};
648uint8_t state_44 = IDLE;
649const struct Chord chord_44 PROGMEM = {H_BOT3 + H_BOT4, QWERTY, &state_44, NULL, KC_LALT, 0, one_shot_key};
650uint8_t state_45 = IDLE;
651const struct Chord chord_45 PROGMEM = {H_BOT4 + H_BOT5, QWERTY, &state_45, NULL, NUM, 0, one_shot_layer};
652uint8_t state_46 = IDLE;
653const struct Chord chord_46 PROGMEM = {H_BOT5 + H_BOT6, QWERTY, &state_46, NULL, KC_LGUI, 0, one_shot_key};
654uint8_t state_47 = IDLE;
655const struct Chord chord_47 PROGMEM = {H_BOT6 + H_BOT7, QWERTY, &state_47, NULL, NUM, 0, one_shot_layer};
656uint8_t state_48 = IDLE;
657const struct Chord chord_48 PROGMEM = {H_BOT7 + H_BOT8, QWERTY, &state_48, NULL, KC_RALT, 0, one_shot_key};
658uint8_t state_49 = IDLE;
659const struct Chord chord_49 PROGMEM = {H_BOT8 + H_BOT9, QWERTY, &state_49, NULL, KC_RCTL, 0, one_shot_key};
660uint8_t state_50 = IDLE;
661const struct Chord chord_50 PROGMEM = {H_BOT9 + H_BOT0, QWERTY, &state_50, NULL, KC_RSFT, 0, one_shot_key};
662uint8_t state_51 = IDLE;
663const struct Chord chord_51 PROGMEM = {H_BOT1 + H_BOT0, QWERTY, &state_51, NULL, KC_SPACE, 0, single_dance};
664uint8_t state_52 = IDLE;
665const struct Chord chord_52 PROGMEM = {H_TOP1 + H_TOP2 + H_TOP3 + H_TOP4, QWERTY, &state_52, NULL, MOUSE, 0, temp_pseudolayer};
666uint8_t state_53 = IDLE;
667const struct Chord chord_53 PROGMEM = {H_TOP1 + H_TOP2 + H_TOP3 + H_TOP4, QWERTY, &state_53, NULL, ASETNIOP, 0, perm_pseudolayer};
668uint8_t state_54 = IDLE;
669uint8_t counter_54 = 0;
670const struct Chord chord_54 PROGMEM = {H_TOP1, NUM, &state_54, &counter_54, KC_1, 0, autoshift_dance};
671uint8_t state_55 = IDLE;
672uint8_t counter_55 = 0;
673const struct Chord chord_55 PROGMEM = {H_TOP2, NUM, &state_55, &counter_55, KC_2, 0, autoshift_dance};
674uint8_t state_56 = IDLE;
675uint8_t counter_56 = 0;
676const struct Chord chord_56 PROGMEM = {H_TOP3, NUM, &state_56, &counter_56, KC_3, 0, autoshift_dance};
677uint8_t state_57 = IDLE;
678uint8_t counter_57 = 0;
679const struct Chord chord_57 PROGMEM = {H_TOP4, NUM, &state_57, &counter_57, KC_4, 0, autoshift_dance};
680uint8_t state_58 = IDLE;
681uint8_t counter_58 = 0;
682const struct Chord chord_58 PROGMEM = {H_TOP5, NUM, &state_58, &counter_58, KC_5, 0, autoshift_dance};
683uint8_t state_59 = IDLE;
684uint8_t counter_59 = 0;
685const struct Chord chord_59 PROGMEM = {H_TOP6, NUM, &state_59, &counter_59, KC_6, 0, autoshift_dance};
686uint8_t state_60 = IDLE;
687uint8_t counter_60 = 0;
688const struct Chord chord_60 PROGMEM = {H_TOP7, NUM, &state_60, &counter_60, KC_7, 0, autoshift_dance};
689uint8_t state_61 = IDLE;
690uint8_t counter_61 = 0;
691const struct Chord chord_61 PROGMEM = {H_TOP8, NUM, &state_61, &counter_61, KC_8, 0, autoshift_dance};
692uint8_t state_62 = IDLE;
693uint8_t counter_62 = 0;
694const struct Chord chord_62 PROGMEM = {H_TOP9, NUM, &state_62, &counter_62, KC_9, 0, autoshift_dance};
695uint8_t state_63 = IDLE;
696uint8_t counter_63 = 0;
697const struct Chord chord_63 PROGMEM = {H_TOP0, NUM, &state_63, &counter_63, KC_0, 0, autoshift_dance};
698uint8_t state_64 = IDLE;
699const struct Chord chord_64 PROGMEM = {H_TOP1 + H_BOT1, NUM, &state_64, NULL, KC_F1, 0, single_dance};
700uint8_t state_65 = IDLE;
701const struct Chord chord_65 PROGMEM = {H_TOP2 + H_BOT2, NUM, &state_65, NULL, KC_F2, 0, single_dance};
702uint8_t state_66 = IDLE;
703const struct Chord chord_66 PROGMEM = {H_TOP3 + H_BOT3, NUM, &state_66, NULL, KC_F3, 0, single_dance};
704uint8_t state_67 = IDLE;
705const struct Chord chord_67 PROGMEM = {H_TOP4 + H_BOT4, NUM, &state_67, NULL, KC_F4, 0, single_dance};
706uint8_t state_68 = IDLE;
707const struct Chord chord_68 PROGMEM = {H_TOP5 + H_BOT5, NUM, &state_68, NULL, KC_F5, 0, single_dance};
708uint8_t state_69 = IDLE;
709const struct Chord chord_69 PROGMEM = {H_TOP6 + H_BOT6, NUM, &state_69, NULL, KC_F6, 0, single_dance};
710uint8_t state_70 = IDLE;
711const struct Chord chord_70 PROGMEM = {H_TOP7 + H_BOT7, NUM, &state_70, NULL, KC_F7, 0, single_dance};
712uint8_t state_71 = IDLE;
713const struct Chord chord_71 PROGMEM = {H_TOP8 + H_BOT8, NUM, &state_71, NULL, KC_F8, 0, single_dance};
714uint8_t state_72 = IDLE;
715const struct Chord chord_72 PROGMEM = {H_TOP9 + H_BOT9, NUM, &state_72, NULL, KC_F9, 0, single_dance};
716uint8_t state_73 = IDLE;
717const struct Chord chord_73 PROGMEM = {H_TOP0 + H_BOT0, NUM, &state_73, NULL, KC_F10, 0, single_dance};
718uint8_t state_74 = IDLE;
719uint8_t counter_74 = 0;
720const struct Chord chord_74 PROGMEM = {H_BOT1, NUM, &state_74, &counter_74, KC_GRAVE, 0, autoshift_dance};
721uint8_t state_75 = IDLE;
722uint8_t counter_75 = 0;
723const struct Chord chord_75 PROGMEM = {H_BOT2, NUM, &state_75, &counter_75, KC_MINUS, 0, autoshift_dance};
724uint8_t state_76 = IDLE;
725uint8_t counter_76 = 0;
726const struct Chord chord_76 PROGMEM = {H_BOT3, NUM, &state_76, &counter_76, KC_EQUAL, 0, autoshift_dance};
727uint8_t state_77 = IDLE;
728uint8_t counter_77 = 0;
729const struct Chord chord_77 PROGMEM = {H_BOT4, NUM, &state_77, &counter_77, KC_LBRACKET, 0, autoshift_dance};
730uint8_t state_78 = IDLE;
731uint8_t counter_78 = 0;
732const struct Chord chord_78 PROGMEM = {H_BOT5, NUM, &state_78, &counter_78, KC_RBRACKET, 0, autoshift_dance};
733uint8_t state_79 = IDLE;
734uint8_t counter_79 = 0;
735const struct Chord chord_79 PROGMEM = {H_BOT6, NUM, &state_79, &counter_79, KC_BSLASH, 0, autoshift_dance};
736uint8_t state_80 = IDLE;
737uint8_t counter_80 = 0;
738const struct Chord chord_80 PROGMEM = {H_BOT7, NUM, &state_80, &counter_80, KC_QUOTE, 0, autoshift_dance};
739uint8_t state_81 = IDLE;
740const struct Chord chord_81 PROGMEM = {H_BOT9, NUM, &state_81, NULL, KC_F11, 0, single_dance};
741uint8_t state_82 = IDLE;
742const struct Chord chord_82 PROGMEM = {H_BOT0, NUM, &state_82, NULL, KC_F12, 0, single_dance};
743uint8_t state_83 = IDLE;
744const struct Chord chord_83 PROGMEM = {H_TOP1 + H_TOP2, NUM, &state_83, NULL, KC_ESC, 0, single_dance};
745uint8_t state_84 = IDLE;
746const struct Chord chord_84 PROGMEM = {H_TOP3 + H_TOP4, NUM, &state_84, NULL, KC_TAB, 0, single_dance};
747uint8_t state_85 = IDLE;
748const struct Chord chord_85 PROGMEM = {H_TOP5 + H_TOP6, NUM, &state_85, NULL, KC_RGUI, 0, one_shot_key};
749uint8_t state_86 = IDLE;
750const struct Chord chord_86 PROGMEM = {H_TOP7 + H_TOP8, NUM, &state_86, NULL, KC_INS, 0, single_dance};
751uint8_t state_87 = IDLE;
752const struct Chord chord_87 PROGMEM = {H_TOP8 + H_TOP9, NUM, &state_87, NULL, KC_DEL, 0, single_dance};
753uint8_t state_88 = IDLE;
754const struct Chord chord_88 PROGMEM = {H_TOP9 + H_TOP0, NUM, &state_88, NULL, KC_BSPC, 0, single_dance};
755uint8_t state_89 = IDLE;
756const struct Chord chord_89 PROGMEM = {H_TOP9 + H_TOP0 + H_BOT9 + H_BOT0, NUM, &state_89, NULL, KC_ENTER, 0, single_dance};
757uint8_t state_90 = IDLE;
758const struct Chord chord_90 PROGMEM = {H_BOT1 + H_BOT2, NUM, &state_90, NULL, KC_LSFT, 0, one_shot_key};
759uint8_t state_91 = IDLE;
760const struct Chord chord_91 PROGMEM = {H_BOT2 + H_BOT3, NUM, &state_91, NULL, KC_LCTL, 0, one_shot_key};
761uint8_t state_92 = IDLE;
762const struct Chord chord_92 PROGMEM = {H_BOT3 + H_BOT4, NUM, &state_92, NULL, KC_LALT, 0, one_shot_key};
763uint8_t state_93 = IDLE;
764const struct Chord chord_93 PROGMEM = {H_BOT5 + H_BOT6, NUM, &state_93, NULL, KC_LGUI, 0, one_shot_key};
765uint8_t state_94 = IDLE;
766const struct Chord chord_94 PROGMEM = {H_BOT7 + H_BOT8, NUM, &state_94, NULL, KC_RALT, 0, one_shot_key};
767uint8_t state_95 = IDLE;
768const struct Chord chord_95 PROGMEM = {H_BOT8 + H_BOT9, NUM, &state_95, NULL, KC_RCTL, 0, one_shot_key};
769uint8_t state_96 = IDLE;
770const struct Chord chord_96 PROGMEM = {H_BOT9 + H_BOT0, NUM, &state_96, NULL, KC_RSFT, 0, one_shot_key};
771uint8_t state_97 = IDLE;
772const struct Chord chord_97 PROGMEM = {H_BOT1 + H_BOT0, NUM, &state_97, NULL, KC_SPACE, 0, single_dance};
773uint8_t state_98 = IDLE;
774const struct Chord chord_98 PROGMEM = {H_TOP7, MOV, &state_98, NULL, KC_HOME, 0, single_dance};
775uint8_t state_99 = IDLE;
776const struct Chord chord_99 PROGMEM = {H_TOP8, MOV, &state_99, NULL, KC_UP, 0, single_dance};
777uint8_t state_100 = IDLE;
778const struct Chord chord_100 PROGMEM = {H_TOP9, MOV, &state_100, NULL, KC_END, 0, single_dance};
779uint8_t state_101 = IDLE;
780const struct Chord chord_101 PROGMEM = {H_TOP0, MOV, &state_101, NULL, KC_PGUP, 0, single_dance};
781uint8_t state_102 = IDLE;
782const struct Chord chord_102 PROGMEM = {H_BOT3, MOV, &state_102, NULL, KC_LSFT, 0, single_dance};
783uint8_t state_103 = IDLE;
784const struct Chord chord_103 PROGMEM = {H_BOT4, MOV, &state_103, NULL, KC_LCTL, 0, single_dance};
785uint8_t state_104 = IDLE;
786const struct Chord chord_104 PROGMEM = {H_BOT5, MOV, &state_104, NULL, KC_LALT, 0, single_dance};
787uint8_t state_105 = IDLE;
788const struct Chord chord_105 PROGMEM = {H_BOT6, MOV, &state_105, NULL, KC_LGUI, 0, single_dance};
789uint8_t state_106 = IDLE;
790const struct Chord chord_106 PROGMEM = {H_BOT7, MOV, &state_106, NULL, KC_LEFT, 0, single_dance};
791uint8_t state_107 = IDLE;
792const struct Chord chord_107 PROGMEM = {H_BOT8, MOV, &state_107, NULL, KC_DOWN, 0, single_dance};
793uint8_t state_108 = IDLE;
794const struct Chord chord_108 PROGMEM = {H_BOT9, MOV, &state_108, NULL, KC_RIGHT, 0, single_dance};
795uint8_t state_109 = IDLE;
796const struct Chord chord_109 PROGMEM = {H_BOT0, MOV, &state_109, NULL, KC_PGDN, 0, single_dance};
797uint8_t state_110 = IDLE;
798const struct Chord chord_110 PROGMEM = {H_TOP7, MOUSE, &state_110, NULL, KC_BTN1, 0, single_dance};
799uint8_t state_111 = IDLE;
800const struct Chord chord_111 PROGMEM = {H_TOP8, MOUSE, &state_111, NULL, KC_MS_U, 0, single_dance};
801uint8_t state_112 = IDLE;
802const struct Chord chord_112 PROGMEM = {H_TOP9, MOUSE, &state_112, NULL, KC_BTN2, 0, single_dance};
803uint8_t state_113 = IDLE;
804const struct Chord chord_113 PROGMEM = {H_TOP0, MOUSE, &state_113, NULL, KC_WH_U, 0, single_dance};
805uint8_t state_114 = IDLE;
806const struct Chord chord_114 PROGMEM = {H_BOT3, MOUSE, &state_114, NULL, KC_LSFT, 0, single_dance};
807uint8_t state_115 = IDLE;
808const struct Chord chord_115 PROGMEM = {H_BOT4, MOUSE, &state_115, NULL, KC_LCTL, 0, single_dance};
809uint8_t state_116 = IDLE;
810const struct Chord chord_116 PROGMEM = {H_BOT5, MOUSE, &state_116, NULL, KC_LALT, 0, single_dance};
811uint8_t state_117 = IDLE;
812const struct Chord chord_117 PROGMEM = {H_BOT6, MOUSE, &state_117, NULL, KC_LGUI, 0, single_dance};
813uint8_t state_118 = IDLE;
814const struct Chord chord_118 PROGMEM = {H_BOT7, MOUSE, &state_118, NULL, KC_MS_L, 0, single_dance};
815uint8_t state_119 = IDLE;
816const struct Chord chord_119 PROGMEM = {H_BOT8, MOUSE, &state_119, NULL, KC_MS_D, 0, single_dance};
817uint8_t state_120 = IDLE;
818const struct Chord chord_120 PROGMEM = {H_BOT9, MOUSE, &state_120, NULL, KC_MS_R, 0, single_dance};
819uint8_t state_121 = IDLE;
820const struct Chord chord_121 PROGMEM = {H_BOT0, MOUSE, &state_121, NULL, KC_WH_D, 0, single_dance};
821uint8_t state_122 = IDLE;
822const struct Chord chord_122 PROGMEM = {H_TOP1, ASETNIOP, &state_122, NULL, KC_A, 0, single_dance};
823uint8_t state_123 = IDLE;
824const struct Chord chord_123 PROGMEM = {H_TOP2, ASETNIOP, &state_123, NULL, KC_S, 0, single_dance};
825uint8_t state_124 = IDLE;
826const struct Chord chord_124 PROGMEM = {H_TOP3, ASETNIOP, &state_124, NULL, KC_E, 0, single_dance};
827uint8_t state_125 = IDLE;
828const struct Chord chord_125 PROGMEM = {H_TOP4, ASETNIOP, &state_125, NULL, KC_T, 0, single_dance};
829uint8_t state_126 = IDLE;
830const struct Chord chord_126 PROGMEM = {H_TOP7, ASETNIOP, &state_126, NULL, KC_N, 0, single_dance};
831uint8_t state_127 = IDLE;
832const struct Chord chord_127 PROGMEM = {H_TOP8, ASETNIOP, &state_127, NULL, KC_I, 0, single_dance};
833uint8_t state_128 = IDLE;
834const struct Chord chord_128 PROGMEM = {H_TOP9, ASETNIOP, &state_128, NULL, KC_O, 0, single_dance};
835uint8_t state_129 = IDLE;
836const struct Chord chord_129 PROGMEM = {H_TOP0, ASETNIOP, &state_129, NULL, KC_P, 0, single_dance};
837uint8_t state_130 = IDLE;
838const struct Chord chord_130 PROGMEM = {H_TOP1 + H_TOP2, ASETNIOP, &state_130, NULL, KC_W, 0, single_dance};
839uint8_t state_131 = IDLE;
840const struct Chord chord_131 PROGMEM = {H_TOP2 + H_TOP3, ASETNIOP, &state_131, NULL, KC_D, 0, single_dance};
841uint8_t state_132 = IDLE;
842const struct Chord chord_132 PROGMEM = {H_TOP3 + H_TOP4, ASETNIOP, &state_132, NULL, KC_R, 0, single_dance};
843uint8_t state_133 = IDLE;
844const struct Chord chord_133 PROGMEM = {H_TOP4 + H_TOP7, ASETNIOP, &state_133, NULL, KC_B, 0, single_dance};
845uint8_t state_134 = IDLE;
846const struct Chord chord_134 PROGMEM = {H_TOP7 + H_TOP8, ASETNIOP, &state_134, NULL, KC_H, 0, single_dance};
847uint8_t state_135 = IDLE;
848const struct Chord chord_135 PROGMEM = {H_TOP8 + H_TOP9, ASETNIOP, &state_135, NULL, KC_L, 0, single_dance};
849uint8_t state_136 = IDLE;
850const struct Chord chord_136 PROGMEM = {H_TOP9 + H_TOP0, ASETNIOP, &state_136, NULL, KC_SCOLON, 0, single_dance};
851uint8_t state_137 = IDLE;
852const struct Chord chord_137 PROGMEM = {H_TOP1 + H_TOP3, ASETNIOP, &state_137, NULL, KC_X, 0, single_dance};
853uint8_t state_138 = IDLE;
854const struct Chord chord_138 PROGMEM = {H_TOP2 + H_TOP4, ASETNIOP, &state_138, NULL, KC_C, 0, single_dance};
855uint8_t state_139 = IDLE;
856const struct Chord chord_139 PROGMEM = {H_TOP3 + H_TOP7, ASETNIOP, &state_139, NULL, KC_Y, 0, single_dance};
857uint8_t state_140 = IDLE;
858const struct Chord chord_140 PROGMEM = {H_TOP4 + H_TOP8, ASETNIOP, &state_140, NULL, KC_V, 0, single_dance};
859uint8_t state_141 = IDLE;
860const struct Chord chord_141 PROGMEM = {H_TOP7 + H_TOP9, ASETNIOP, &state_141, NULL, KC_U, 0, single_dance};
861uint8_t state_142 = IDLE;
862const struct Chord chord_142 PROGMEM = {H_TOP1 + H_TOP4, ASETNIOP, &state_142, NULL, KC_F, 0, single_dance};
863uint8_t state_143 = IDLE;
864const struct Chord chord_143 PROGMEM = {H_TOP2 + H_TOP7, ASETNIOP, &state_143, NULL, KC_J, 0, single_dance};
865uint8_t state_144 = IDLE;
866const struct Chord chord_144 PROGMEM = {H_TOP3 + H_TOP8, ASETNIOP, &state_144, NULL, KC_COMMA, 0, single_dance};
867uint8_t state_145 = IDLE;
868const struct Chord chord_145 PROGMEM = {H_TOP4 + H_TOP9, ASETNIOP, &state_145, NULL, KC_G, 0, single_dance};
869uint8_t state_146 = IDLE;
870const struct Chord chord_146 PROGMEM = {H_TOP7 + H_TOP0, ASETNIOP, &state_146, NULL, KC_M, 0, single_dance};
871uint8_t state_147 = IDLE;
872const struct Chord chord_147 PROGMEM = {H_TOP1 + H_TOP7, ASETNIOP, &state_147, NULL, KC_Q, 0, single_dance};
873uint8_t state_148 = IDLE;
874const struct Chord chord_148 PROGMEM = {H_TOP2 + H_TOP8, ASETNIOP, &state_148, NULL, KC_K, 0, single_dance};
875uint8_t state_149 = IDLE;
876const struct Chord chord_149 PROGMEM = {H_TOP3 + H_TOP9, ASETNIOP, &state_149, NULL, KC_MINUS, 0, single_dance};
877uint8_t state_150 = IDLE;
878const struct Chord chord_150 PROGMEM = {H_TOP4 + H_TOP0, ASETNIOP, &state_150, NULL, KC_BSPC, 0, single_dance};
879uint8_t state_151 = IDLE;
880const struct Chord chord_151 PROGMEM = {H_TOP1 + H_TOP8, ASETNIOP, &state_151, NULL, KC_Z, 0, single_dance};
881uint8_t state_152 = IDLE;
882const struct Chord chord_152 PROGMEM = {H_TOP2 + H_TOP9, ASETNIOP, &state_152, NULL, KC_DOT, 0, single_dance};
883uint8_t state_153 = IDLE;
884const struct Chord chord_153 PROGMEM = {H_TOP3 + H_TOP0, ASETNIOP, &state_153, NULL, KC_QUOTE, 0, single_dance};
885uint8_t state_154 = IDLE;
886const struct Chord chord_154 PROGMEM = {H_TOP1 + H_TOP9, ASETNIOP, &state_154, NULL, KC_LBRACKET, 0, single_dance};
887uint8_t state_155 = IDLE;
888const struct Chord chord_155 PROGMEM = {H_TOP2 + H_TOP0, ASETNIOP, &state_155, NULL, KC_RBRACKET, 0, single_dance};
889uint8_t state_156 = IDLE;
890const struct Chord chord_156 PROGMEM = {H_TOP1 + H_TOP0, ASETNIOP, &state_156, NULL, KC_SLASH, 0, single_dance};
891uint8_t state_157 = IDLE;
892const struct Chord chord_157 PROGMEM = {H_TOP5, ASETNIOP, &state_157, NULL, KC_ESC, 0, single_dance};
893uint8_t state_158 = IDLE;
894const struct Chord chord_158 PROGMEM = {H_TOP6, ASETNIOP, &state_158, NULL, KC_DEL, 0, single_dance};
895uint8_t state_159 = IDLE;
896const struct Chord chord_159 PROGMEM = {H_BOT4, ASETNIOP, &state_159, NULL, KC_LSFT, 0, single_dance};
897uint8_t state_160 = IDLE;
898const struct Chord chord_160 PROGMEM = {H_BOT5, ASETNIOP, &state_160, NULL, KC_LCTL, 0, single_dance};
899uint8_t state_161 = IDLE;
900const struct Chord chord_161 PROGMEM = {H_BOT6, ASETNIOP, &state_161, NULL, KC_LALT, 0, single_dance};
901uint8_t state_162 = IDLE;
902uint8_t counter_162 = 0;
903const struct Chord chord_162 PROGMEM = {H_BOT7, ASETNIOP, &state_162, &counter_162, KC_SPACE, ASETNIOP_123, key_layer_dance};
904uint8_t state_163 = IDLE;
905const struct Chord chord_163 PROGMEM = {H_TOP5 + H_TOP6, ASETNIOP, &state_163, NULL, KC_LGUI, 0, single_dance};
906uint8_t state_164 = IDLE;
907const struct Chord chord_164 PROGMEM = {H_TOP1 + H_TOP2 + H_TOP3 + H_TOP4, ASETNIOP, &state_164, NULL, QWERTY, 0, perm_pseudolayer};
908uint8_t state_165 = IDLE;
909const struct Chord chord_165 PROGMEM = {H_BOT4 + H_BOT7, ASETNIOP, &state_165, NULL, ASETNIOP_FN, 0, temp_pseudolayer};
910uint8_t state_166 = IDLE;
911const struct Chord chord_166 PROGMEM = {H_TOP1, ASETNIOP_123, &state_166, NULL, KC_1, 0, single_dance};
912uint8_t state_167 = IDLE;
913const struct Chord chord_167 PROGMEM = {H_TOP2, ASETNIOP_123, &state_167, NULL, KC_2, 0, single_dance};
914uint8_t state_168 = IDLE;
915const struct Chord chord_168 PROGMEM = {H_TOP3, ASETNIOP_123, &state_168, NULL, KC_3, 0, single_dance};
916uint8_t state_169 = IDLE;
917const struct Chord chord_169 PROGMEM = {H_TOP4, ASETNIOP_123, &state_169, NULL, KC_4, 0, single_dance};
918uint8_t state_170 = IDLE;
919const struct Chord chord_170 PROGMEM = {H_TOP7, ASETNIOP_123, &state_170, NULL, KC_7, 0, single_dance};
920uint8_t state_171 = IDLE;
921const struct Chord chord_171 PROGMEM = {H_TOP8, ASETNIOP_123, &state_171, NULL, KC_8, 0, single_dance};
922uint8_t state_172 = IDLE;
923const struct Chord chord_172 PROGMEM = {H_TOP9, ASETNIOP_123, &state_172, NULL, KC_9, 0, single_dance};
924uint8_t state_173 = IDLE;
925const struct Chord chord_173 PROGMEM = {H_TOP0, ASETNIOP_123, &state_173, NULL, KC_0, 0, single_dance};
926uint8_t state_174 = IDLE;
927const struct Chord chord_174 PROGMEM = {H_TOP3 + H_TOP4, ASETNIOP_123, &state_174, NULL, KC_5, 0, single_dance};
928uint8_t state_175 = IDLE;
929const struct Chord chord_175 PROGMEM = {H_TOP4 + H_TOP7, ASETNIOP_123, &state_175, NULL, KC_EQUAL, 0, single_dance};
930uint8_t state_176 = IDLE;
931const struct Chord chord_176 PROGMEM = {H_TOP7 + H_TOP8, ASETNIOP_123, &state_176, NULL, KC_6, 0, single_dance};
932uint8_t state_177 = IDLE;
933const struct Chord chord_177 PROGMEM = {H_TOP8 + H_TOP9, ASETNIOP_123, &state_177, NULL, KC_BSLASH, 0, single_dance};
934uint8_t state_178 = IDLE;
935const struct Chord chord_178 PROGMEM = {H_TOP9 + H_TOP0, ASETNIOP_123, &state_178, NULL, KC_SCOLON, 0, single_dance};
936uint8_t state_179 = IDLE;
937const struct Chord chord_179 PROGMEM = {H_TOP4 + H_TOP0, ASETNIOP_123, &state_179, NULL, KC_BSPC, 0, single_dance};
938uint8_t state_180 = IDLE;
939const struct Chord chord_180 PROGMEM = {H_TOP5, ASETNIOP_123, &state_180, NULL, KC_ESC, 0, single_dance};
940uint8_t state_181 = IDLE;
941const struct Chord chord_181 PROGMEM = {H_TOP6, ASETNIOP_123, &state_181, NULL, KC_DEL, 0, single_dance};
942uint8_t state_182 = IDLE;
943const struct Chord chord_182 PROGMEM = {H_BOT4, ASETNIOP_123, &state_182, NULL, KC_LSFT, 0, single_dance};
944uint8_t state_183 = IDLE;
945const struct Chord chord_183 PROGMEM = {H_BOT5, ASETNIOP_123, &state_183, NULL, KC_LCTL, 0, single_dance};
946uint8_t state_184 = IDLE;
947const struct Chord chord_184 PROGMEM = {H_BOT6, ASETNIOP_123, &state_184, NULL, KC_LALT, 0, single_dance};
948uint8_t state_185 = IDLE;
949const struct Chord chord_185 PROGMEM = {H_TOP5 + H_TOP6, ASETNIOP_123, &state_185, NULL, KC_LGUI, 0, single_dance};
950uint8_t state_186 = IDLE;
951const struct Chord chord_186 PROGMEM = {H_TOP1, ASETNIOP_FN, &state_186, NULL, KC_HOME, 0, single_dance};
952uint8_t state_187 = IDLE;
953const struct Chord chord_187 PROGMEM = {H_TOP2, ASETNIOP_FN, &state_187, NULL, KC_PGDN, 0, single_dance};
954uint8_t state_188 = IDLE;
955const struct Chord chord_188 PROGMEM = {H_TOP3, ASETNIOP_FN, &state_188, NULL, KC_PGUP, 0, single_dance};
956uint8_t state_189 = IDLE;
957const struct Chord chord_189 PROGMEM = {H_TOP4, ASETNIOP_FN, &state_189, NULL, KC_END, 0, single_dance};
958uint8_t state_190 = IDLE;
959const struct Chord chord_190 PROGMEM = {H_TOP7, ASETNIOP_FN, &state_190, NULL, KC_LEFT, 0, single_dance};
960uint8_t state_191 = IDLE;
961const struct Chord chord_191 PROGMEM = {H_TOP8, ASETNIOP_FN, &state_191, NULL, KC_DOWN, 0, single_dance};
962uint8_t state_192 = IDLE;
963const struct Chord chord_192 PROGMEM = {H_TOP9, ASETNIOP_FN, &state_192, NULL, KC_UP, 0, single_dance};
964uint8_t state_193 = IDLE;
965const struct Chord chord_193 PROGMEM = {H_TOP0, ASETNIOP_FN, &state_193, NULL, KC_RIGHT, 0, single_dance};
966uint8_t state_194 = IDLE;
967const struct Chord chord_194 PROGMEM = {H_TOP1 + H_TOP2, ASETNIOP_FN, &state_194, NULL, KC_F1, 0, single_dance};
968uint8_t state_195 = IDLE;
969const struct Chord chord_195 PROGMEM = {H_TOP2 + H_TOP3, ASETNIOP_FN, &state_195, NULL, KC_F2, 0, single_dance};
970uint8_t state_196 = IDLE;
971const struct Chord chord_196 PROGMEM = {H_TOP3 + H_TOP4, ASETNIOP_FN, &state_196, NULL, KC_F3, 0, single_dance};
972uint8_t state_197 = IDLE;
973const struct Chord chord_197 PROGMEM = {H_TOP4 + H_TOP7, ASETNIOP_FN, &state_197, NULL, KC_F4, 0, single_dance};
974uint8_t state_198 = IDLE;
975const struct Chord chord_198 PROGMEM = {H_TOP7 + H_TOP8, ASETNIOP_FN, &state_198, NULL, KC_F5, 0, single_dance};
976uint8_t state_199 = IDLE;
977const struct Chord chord_199 PROGMEM = {H_TOP8 + H_TOP9, ASETNIOP_FN, &state_199, NULL, KC_F6, 0, single_dance};
978uint8_t state_200 = IDLE;
979const struct Chord chord_200 PROGMEM = {H_TOP9 + H_TOP0, ASETNIOP_FN, &state_200, NULL, KC_F7, 0, single_dance};
980uint8_t state_201 = IDLE;
981const struct Chord chord_201 PROGMEM = {H_TOP1 + H_TOP3, ASETNIOP_FN, &state_201, NULL, KC_F10, 0, single_dance};
982uint8_t state_202 = IDLE;
983const struct Chord chord_202 PROGMEM = {H_TOP8 + H_TOP0, ASETNIOP_FN, &state_202, NULL, KC_F8, 0, single_dance};
984uint8_t state_203 = IDLE;
985const struct Chord chord_203 PROGMEM = {H_TOP1 + H_TOP4, ASETNIOP_FN, &state_203, NULL, KC_F11, 0, single_dance};
986uint8_t state_204 = IDLE;
987const struct Chord chord_204 PROGMEM = {H_TOP7 + H_TOP0, ASETNIOP_FN, &state_204, NULL, KC_F9, 0, single_dance};
988uint8_t state_205 = IDLE;
989const struct Chord chord_205 PROGMEM = {H_TOP1 + H_TOP7, ASETNIOP_FN, &state_205, NULL, KC_F12, 0, single_dance};
990uint8_t state_206 = IDLE;
991const struct Chord chord_206 PROGMEM = {H_TOP4 + H_TOP0, ASETNIOP_FN, &state_206, NULL, KC_BSPC, 0, single_dance};
992uint8_t state_207 = IDLE;
993const struct Chord chord_207 PROGMEM = {H_TOP5, ASETNIOP_FN, &state_207, NULL, KC_ESC, 0, single_dance};
994uint8_t state_208 = IDLE;
995const struct Chord chord_208 PROGMEM = {H_TOP6, ASETNIOP_FN, &state_208, NULL, KC_DEL, 0, single_dance};
996uint8_t state_209 = IDLE;
997const struct Chord chord_209 PROGMEM = {H_BOT4, ASETNIOP_FN, &state_209, NULL, KC_LSFT, 0, single_dance};
998uint8_t state_210 = IDLE;
999const struct Chord chord_210 PROGMEM = {H_BOT5, ASETNIOP_FN, &state_210, NULL, KC_LCTL, 0, single_dance};
1000uint8_t state_211 = IDLE;
1001const struct Chord chord_211 PROGMEM = {H_BOT6, ASETNIOP_FN, &state_211, NULL, KC_LALT, 0, single_dance};
1002uint8_t state_212 = IDLE;
1003const struct Chord chord_212 PROGMEM = {H_TOP5 + H_TOP6, ASETNIOP_FN, &state_212, NULL, KC_LGUI, 0, single_dance};
1004
1005const struct Chord* const list_of_chords[] PROGMEM = {
1006 &chord_0, &chord_1, &chord_2, &chord_3, &chord_4, &chord_5, &chord_6, &chord_7, &chord_8, &chord_9, &chord_10, &chord_11, &chord_12, &chord_13, &chord_14, &chord_15, &chord_16, &chord_17, &chord_18, &chord_19, &chord_20, &chord_21, &chord_22, &chord_23, &chord_24, &chord_25, &chord_26, &chord_27, &chord_28, &chord_29, &chord_30, &chord_31, &chord_32, &chord_33, &chord_34, &chord_35, &chord_36, &chord_37, &chord_38, &chord_39, &chord_40, &chord_41, &chord_42, &chord_43, &chord_44, &chord_45, &chord_46, &chord_47, &chord_48, &chord_49, &chord_50, &chord_51, &chord_52, &chord_53, &chord_54, &chord_55, &chord_56, &chord_57, &chord_58, &chord_59, &chord_60, &chord_61, &chord_62, &chord_63, &chord_64, &chord_65, &chord_66, &chord_67, &chord_68, &chord_69, &chord_70, &chord_71, &chord_72, &chord_73, &chord_74, &chord_75, &chord_76, &chord_77, &chord_78, &chord_79, &chord_80, &chord_81, &chord_82, &chord_83, &chord_84, &chord_85, &chord_86, &chord_87, &chord_88, &chord_89, &chord_90, &chord_91, &chord_92, &chord_93, &chord_94, &chord_95, &chord_96, &chord_97, &chord_98, &chord_99, &chord_100, &chord_101, &chord_102, &chord_103, &chord_104, &chord_105, &chord_106, &chord_107, &chord_108, &chord_109, &chord_110, &chord_111, &chord_112, &chord_113, &chord_114, &chord_115, &chord_116, &chord_117, &chord_118, &chord_119, &chord_120, &chord_121, &chord_122, &chord_123, &chord_124, &chord_125, &chord_126, &chord_127, &chord_128, &chord_129, &chord_130, &chord_131, &chord_132, &chord_133, &chord_134, &chord_135, &chord_136, &chord_137, &chord_138, &chord_139, &chord_140, &chord_141, &chord_142, &chord_143, &chord_144, &chord_145, &chord_146, &chord_147, &chord_148, &chord_149, &chord_150, &chord_151, &chord_152, &chord_153, &chord_154, &chord_155, &chord_156, &chord_157, &chord_158, &chord_159, &chord_160, &chord_161, &chord_162, &chord_163, &chord_164, &chord_165, &chord_166, &chord_167, &chord_168, &chord_169, &chord_170, &chord_171, &chord_172, &chord_173, &chord_174, &chord_175, &chord_176, &chord_177, &chord_178, &chord_179, &chord_180, &chord_181, &chord_182, &chord_183, &chord_184, &chord_185, &chord_186, &chord_187, &chord_188, &chord_189, &chord_190, &chord_191, &chord_192, &chord_193, &chord_194, &chord_195, &chord_196, &chord_197, &chord_198, &chord_199, &chord_200, &chord_201, &chord_202, &chord_203, &chord_204, &chord_205, &chord_206, &chord_207, &chord_208, &chord_209, &chord_210, &chord_211, &chord_212
1007};
1008
1009const uint16_t** const leader_triggers PROGMEM = NULL;
1010void (*leader_functions[]) (void) = {};
1011
1012#define NUMBER_OF_CHORDS 213
1013#define NUMBER_OF_LEADER_COMBOS 0
1014
1015bool are_hashed_keycodes_in_sound(HASH_TYPE keycodes_hash, HASH_TYPE sound) {
1016 return (keycodes_hash & sound) == keycodes_hash;
1017}
1018
1019uint8_t keycode_to_index(uint16_t keycode) {
1020 return keycode - FIRST_INTERNAL_KEYCODE;
1021}
1022
1023void sound_keycode_array(uint16_t keycode) {
1024 uint8_t index = keycode_to_index(keycode);
1025 keycode_index++;
1026 keycodes_buffer_array[index] = keycode_index;
1027}
1028
1029void silence_keycode_hash_array(HASH_TYPE keycode_hash) {
1030 for (int i = 0; i < NUMBER_OF_KEYS; i++) {
1031 bool index_in_hash = ((HASH_TYPE) 1 << i) & keycode_hash;
1032 if (index_in_hash) {
1033 uint8_t current_val = keycodes_buffer_array[i];
1034 keycodes_buffer_array[i] = 0;
1035 for (int j = 0; j < NUMBER_OF_KEYS; j++) {
1036 if (keycodes_buffer_array[j] > current_val) {
1037 keycodes_buffer_array[j]--;
1038 }
1039 }
1040 keycode_index--;
1041 }
1042 }
1043}
1044
1045bool are_hashed_keycodes_in_array(HASH_TYPE keycode_hash) {
1046 for (int i = 0; i < NUMBER_OF_KEYS; i++) {
1047 bool index_in_hash = ((HASH_TYPE) 1 << i) & keycode_hash;
1048 bool index_in_array = (bool) keycodes_buffer_array[i];
1049 if (index_in_hash && !index_in_array) {
1050 return false;
1051 }
1052 }
1053 return true;
1054}
1055
1056void kill_one_shots(void) {
1057 struct Chord chord_storage;
1058 struct Chord* chord_ptr;
1059 struct Chord* chord;
1060
1061 for (int i = 0; i < NUMBER_OF_CHORDS; i++) {
1062 chord_ptr = (struct Chord*) pgm_read_word (&list_of_chords[i]);
1063 memcpy_P(&chord_storage, chord_ptr, sizeof(struct Chord));
1064 chord = &chord_storage;
1065
1066 if (*chord->state == IN_ONE_SHOT) {
1067 *chord->state = RESTART;
1068 chord->function(chord);
1069 if (*chord->state == RESTART) {
1070 *chord->state = IDLE;
1071 }
1072 }
1073 }
1074}
1075
1076void process_finished_dances(void) {
1077 struct Chord chord_storage;
1078 struct Chord* chord_ptr;
1079 struct Chord* chord;
1080
1081 for (int i = 0; i < NUMBER_OF_CHORDS; i++) {
1082 chord_ptr = (struct Chord*) pgm_read_word (&list_of_chords[i]);
1083 memcpy_P(&chord_storage, chord_ptr, sizeof(struct Chord));
1084 chord = &chord_storage;
1085
1086 if (*chord->state == ACTIVATED) {
1087 *chord->state = PRESS_FROM_ACTIVE;
1088 chord->function(chord);
1089 if (a_key_went_through) {
1090 kill_one_shots();
1091 }
1092 dance_timer = timer_read();
1093 } else if (*chord->state == IDLE_IN_DANCE) {
1094 *chord->state = FINISHED;
1095 chord->function(chord);
1096 if (*chord->state == FINISHED) {
1097 *chord->state = RESTART;
1098 if (*chord->state == RESTART) {
1099 *chord->state = IDLE;
1100 }
1101 }
1102 } else if (*chord->state == PRESS_FROM_ACTIVE) {
1103 *chord->state = FINISHED_FROM_ACTIVE;
1104 chord->function(chord);
1105 if (a_key_went_through) {
1106 kill_one_shots();
1107 }
1108 dance_timer = timer_read();
1109 }
1110 }
1111}
1112
1113uint8_t keycodes_buffer_array_min(uint8_t* first_keycode_index) {
1114 for (int i = 0; i < NUMBER_OF_KEYS; i++) {
1115 if (keycodes_buffer_array[i] == 1) {
1116 if (first_keycode_index != NULL) {
1117 *first_keycode_index = (uint8_t) i;
1118 }
1119 return 1;
1120 }
1121 }
1122 return 0;
1123}
1124
1125void remove_subchords(void) {
1126 struct Chord chord_storage;
1127 struct Chord* chord_ptr;
1128 struct Chord* chord;
1129
1130 for (int i = 0; i < NUMBER_OF_CHORDS; i++) {
1131 chord_ptr = (struct Chord*) pgm_read_word (&list_of_chords[i]);
1132 memcpy_P(&chord_storage, chord_ptr, sizeof(struct Chord));
1133 chord = &chord_storage;
1134
1135 if (!(*chord->state == READY || *chord->state == READY_IN_DANCE || *chord->state == READY_LOCKED)) {
1136 continue;
1137 }
1138
1139 struct Chord chord_storage_2;
1140 struct Chord* chord_ptr_2;
1141 struct Chord* chord_2;
1142 for (int j = 0; j < NUMBER_OF_CHORDS; j++) {
1143 if (i == j) {continue;}
1144
1145 chord_ptr_2 = (struct Chord*) pgm_read_word (&list_of_chords[j]);
1146 memcpy_P(&chord_storage_2, chord_ptr_2, sizeof(struct Chord));
1147 chord_2 = &chord_storage_2;
1148
1149 if (are_hashed_keycodes_in_sound(chord_2->keycodes_hash, chord->keycodes_hash)) {
1150 if (*chord_2->state == READY) {
1151 *chord_2->state = IDLE;
1152 }
1153 if (*chord_2->state == READY_IN_DANCE) {
1154 *chord_2->state = IDLE_IN_DANCE;
1155 }
1156 if (*chord_2->state == READY_LOCKED) {
1157 *chord_2->state = LOCKED;
1158 }
1159 }
1160 }
1161 }
1162}
1163
1164void process_ready_chords(void) {
1165 uint8_t first_keycode_index = 0;
1166 while (keycodes_buffer_array_min(&first_keycode_index)) {
1167 // find ready chords
1168 struct Chord chord_storage;
1169 struct Chord* chord_ptr;
1170 struct Chord* chord;
1171
1172 for (int i = 0; i < NUMBER_OF_CHORDS; i++) {
1173 chord_ptr = (struct Chord*) pgm_read_word (&list_of_chords[i]);
1174 memcpy_P(&chord_storage, chord_ptr, sizeof(struct Chord));
1175 chord = &chord_storage;
1176
1177 // if the chord does not contain the first keycode
1178 bool contains_first_keycode = ((uint32_t) 1 << first_keycode_index) & chord->keycodes_hash;
1179 if (!contains_first_keycode) {
1180 continue;
1181 }
1182
1183 if (!are_hashed_keycodes_in_array(chord->keycodes_hash)){
1184 continue;
1185 }
1186
1187 if (*chord->state == LOCKED) {
1188 *chord->state = READY_LOCKED;
1189 continue;
1190 }
1191
1192 if (!(chord->pseudolayer == current_pseudolayer || chord->pseudolayer == ALWAYS_ON)) {
1193 continue;
1194 }
1195
1196 if (*chord->state == IDLE) {
1197 *chord->state = READY;
1198 continue;
1199 }
1200
1201 if (*chord->state == IDLE_IN_DANCE) {
1202 *chord->state = READY_IN_DANCE;
1203 }
1204 }
1205
1206 // remove subchords
1207 remove_subchords();
1208
1209 // execute logic
1210 // this should be only one chord
1211 for (int i = 0; i < NUMBER_OF_CHORDS; i++) {
1212 chord_ptr = (struct Chord*) pgm_read_word (&list_of_chords[i]);
1213 memcpy_P(&chord_storage, chord_ptr, sizeof(struct Chord));
1214 chord = &chord_storage;
1215
1216 if (*chord->state == READY_LOCKED) {
1217 *chord->state = RESTART;
1218 chord->function(chord);
1219 if (*chord->state == RESTART) {
1220 *chord->state = IDLE;
1221 }
1222 break;
1223 }
1224
1225 if (*chord->state == READY || *chord->state == READY_IN_DANCE) {
1226 if (last_chord && last_chord != chord) {
1227 process_finished_dances();
1228 }
1229
1230 bool lock_next_prev_state = lock_next;
1231
1232 *chord->state = ACTIVATED;
1233 chord->function(chord);
1234 dance_timer = timer_read();
1235
1236 if (lock_next && lock_next == lock_next_prev_state) {
1237 lock_next = false;
1238 *chord->state = PRESS_FROM_ACTIVE;
1239 chord->function(chord);
1240 if (*chord->state == PRESS_FROM_ACTIVE) {
1241 *chord->state = LOCKED;
1242 }
1243 if (a_key_went_through) {
1244 kill_one_shots();
1245 }
1246 }
1247 break;
1248 }
1249 }
1250
1251 // silence notes
1252 silence_keycode_hash_array(chord->keycodes_hash);
1253 }
1254}
1255
1256void deactivate_active_chords(uint16_t keycode) {
1257 HASH_TYPE hash = (HASH_TYPE)1 << (keycode - SAFE_RANGE);
1258 bool broken;
1259 struct Chord chord_storage;
1260 struct Chord* chord_ptr;
1261 struct Chord* chord;
1262
1263 for (int i = 0; i < NUMBER_OF_CHORDS; i++) {
1264 chord_ptr = (struct Chord*) pgm_read_word (&list_of_chords[i]);
1265 memcpy_P(&chord_storage, chord_ptr, sizeof(struct Chord));
1266 chord = &chord_storage;
1267
1268 broken = are_hashed_keycodes_in_sound(hash, chord->keycodes_hash);
1269 if (!broken) {
1270 continue;
1271 }
1272
1273 switch (*chord->state) {
1274 case ACTIVATED:
1275 *chord->state = DEACTIVATED;
1276 chord->function(chord);
1277
1278 if (*chord->state == DEACTIVATED) {
1279 dance_timer = timer_read();
1280 *chord->state = IDLE_IN_DANCE;
1281 }
1282 if (*chord->state != IN_ONE_SHOT) {
1283 kill_one_shots();
1284 }
1285 break;
1286 case PRESS_FROM_ACTIVE:
1287 case FINISHED_FROM_ACTIVE:
1288 *chord->state = RESTART;
1289 chord->function(chord);
1290 if (*chord->state == RESTART) {
1291 *chord->state = IDLE;
1292 }
1293 kill_one_shots();
1294 break;
1295 default:
1296 break;
1297 }
1298 }
1299
1300}
1301
1302void process_command(void) {
1303 command_mode = 0;
1304 for (int i = 0; i < COMMAND_MAX_LENGTH; i++) {
1305 if (command_buffer[i]) {
1306 register_code(command_buffer[i]);
1307 }
1308 send_keyboard_report();
1309 }
1310 wait_ms(TAP_TIMEOUT);
1311 for (int i = 0; i < COMMAND_MAX_LENGTH; i++) {
1312 if (command_buffer[i]) {
1313 unregister_code(command_buffer[i]);
1314 }
1315 send_keyboard_report();
1316 }
1317 for (int i = 0; i < COMMAND_MAX_LENGTH; i++) {
1318 command_buffer[i] = 0;
1319 }
1320 command_ind = 0;
1321}
1322
1323void process_leader(void) {
1324 in_leader_mode = false;
1325 for (int i = 0; i < NUMBER_OF_LEADER_COMBOS; i++) {
1326 uint16_t trigger[LEADER_MAX_LENGTH];
1327 memcpy_P(trigger, leader_triggers[i], LEADER_MAX_LENGTH * sizeof(uint16_t));
1328
1329 if (identical(leader_buffer, trigger)) {
1330 (*leader_functions[i])();
1331 break;
1332 }
1333 }
1334 for (int i = 0; i < LEADER_MAX_LENGTH; i++) {
1335 leader_buffer[i] = 0;
1336 }
1337}
1338
1339bool process_record_user(uint16_t keycode, keyrecord_t *record) {
1340 if (keycode < FIRST_INTERNAL_KEYCODE || keycode > LAST_INTERNAL_KEYCODE) {
1341 return true;
1342 }
1343
1344 if (record->event.pressed) {
1345 sound_keycode_array(keycode);
1346 } else {
1347 process_ready_chords();
1348 deactivate_active_chords(keycode);
1349 }
1350 chord_timer = timer_read();
1351 leader_timer = timer_read();
1352
1353 return false;
1354}
1355
1356void matrix_scan_user(void) {
1357 bool chord_timer_expired = timer_elapsed(chord_timer) > CHORD_TIMEOUT;
1358 if (chord_timer_expired && keycodes_buffer_array_min(NULL)) {
1359 process_ready_chords();
1360 }
1361
1362 bool dance_timer_expired = timer_elapsed(dance_timer) > DANCE_TIMEOUT;
1363 if (dance_timer_expired) { // would love to have && in_dance but not sure how
1364 process_finished_dances();
1365 }
1366
1367 bool in_command_mode = command_mode == 2;
1368 if (in_command_mode) {
1369 process_command();
1370 }
1371
1372 bool leader_timer_expired = timer_elapsed(leader_timer) > LEADER_TIMEOUT;
1373 if (leader_timer_expired && in_leader_mode) {
1374 process_leader();
1375 }
1376
1377}
1378
1379void clear(const struct Chord* self) {
1380 if (*self->state == ACTIVATED) {
1381 // kill all chords
1382 struct Chord chord_storage;
1383 struct Chord* chord_ptr;
1384 struct Chord* chord;
1385
1386 for (int i = 0; i < NUMBER_OF_CHORDS; i++) {
1387 chord_ptr = (struct Chord*) pgm_read_word (&list_of_chords[i]);
1388 memcpy_P(&chord_storage, chord_ptr, sizeof(struct Chord));
1389 chord = &chord_storage;
1390
1391 *chord->state = IDLE;
1392
1393 if (chord->counter) {
1394 *chord->counter = 0;
1395 }
1396 }
1397
1398 // clear keyboard
1399 clear_keyboard();
1400 send_keyboard_report();
1401
1402 // switch to default pseudolayer
1403 current_pseudolayer = DEFAULT_PSEUDOLAYER;
1404
1405 // clear all keyboard states
1406 lock_next = false;
1407 autoshift_mode = true;
1408 command_mode = 0;
1409 in_leader_mode = false;
1410 leader_ind = 0;
1411 dynamic_macro_mode = false;
1412 a_key_went_through = false;
1413
1414 for (int i = 0; i < DYNAMIC_MACRO_MAX_LENGTH; i++) {
1415 dynamic_macro_buffer[i] = 0;
1416 }
1417 }
1418} \ No newline at end of file
diff --git a/keyboards/butterstick/keymaps/dennytom/keymap_def.json b/keyboards/butterstick/keymaps/dennytom/keymap_def.json
new file mode 100644
index 000000000..16f02ca52
--- /dev/null
+++ b/keyboards/butterstick/keymaps/dennytom/keymap_def.json
@@ -0,0 +1,309 @@
1{
2 "keys": [
3 "TOP1", "TOP2", "TOP3", "TOP4", "TOP5", "TOP6", "TOP7", "TOP8", "TOP9", "TOP0",
4 "BOT1", "BOT2", "BOT3", "BOT4", "BOT5", "BOT6", "BOT7", "BOT8", "BOT9", "BOT0"
5 ],
6 "parameters": {
7 "layout_function_name": "LAYOUT_butter",
8 "chord_timeout": 100,
9 "dance_timeout": 200,
10 "leader_timeout": 750,
11 "tap_timeout": 50,
12 "command_max_length": 5,
13 "leader_max_length": 5,
14 "dynamic_macro_max_length": 20,
15 "string_max_length": 16,
16 "long_press_multiplier": 3,
17 "default_pseudolayer": "QWERTY"
18 },
19 "layers": [
20 {
21 "type": "auto"
22 }
23 ],
24 "chord_sets": [
25 {
26 "name": "rows",
27 "chords": [
28 ["TOP1"], ["TOP2"], ["TOP3"], ["TOP4"], ["TOP5"], ["TOP6"], ["TOP7"], ["TOP8"], ["TOP9"], ["TOP0"],
29 ["TOP1", "BOT1"], ["TOP2", "BOT2"], ["TOP3", "BOT3"], ["TOP4", "BOT4"], ["TOP5", "BOT5"], ["TOP6", "BOT6"], ["TOP7", "BOT7"], ["TOP8", "BOT8"], ["TOP9", "BOT9"], ["TOP0", "BOT0"],
30 ["BOT1"], ["BOT2"], ["BOT3"], ["BOT4"], ["BOT5"], ["BOT6"], ["BOT7"], ["BOT8"], ["BOT9"], ["BOT0"]
31 ]
32 },
33 {
34 "name": "cols",
35 "chords": [
36 ["TOP1", "TOP2"], ["TOP2", "TOP3"], ["TOP3", "TOP4"], ["TOP4", "TOP5"], ["TOP5", "TOP6"], ["TOP6", "TOP7"], ["TOP7", "TOP8"], ["TOP8", "TOP9"], ["TOP9", "TOP0"],
37 ["TOP1", "TOP2", "BOT1", "BOT2"], ["TOP2", "TOP3", "BOT2", "BOT3"], ["TOP3", "TOP4", "BOT3", "BOT4"], ["TOP4", "TOP5", "BOT4", "BOT5"], ["TOP5", "TOP6", "BOT5", "BOT6"], ["TOP6", "TOP7", "BOT6", "BOT7"], ["TOP7", "TOP8", "BOT7", "BOT8"], ["TOP8", "TOP9", "BOT8", "BOT9"], ["TOP9", "TOP0", "BOT9", "BOT0"],
38 ["BOT1", "BOT2"], ["BOT2", "BOT3"], ["BOT3", "BOT4"], ["BOT4", "BOT5"], ["BOT5", "BOT6"], ["BOT6", "BOT7"], ["BOT7", "BOT8"], ["BOT8", "BOT9"], ["BOT9", "BOT0"]
39 ]
40 },
41 {
42 "name": "asetniop",
43 "chords": [
44 ["TOP1"], ["TOP2"], ["TOP3"], ["TOP4"], ["TOP7"], ["TOP8"], ["TOP9"], ["TOP0"],
45 ["TOP1", "TOP2"], ["TOP2", "TOP3"], ["TOP3", "TOP4"], ["TOP4", "TOP7"], ["TOP7", "TOP8"], ["TOP8", "TOP9"], ["TOP9", "TOP0"],
46 ["TOP1", "TOP3"], ["TOP2", "TOP4"], ["TOP3", "TOP7"], ["TOP4", "TOP8"], ["TOP7", "TOP9"], ["TOP8", "TOP0"],
47 ["TOP1", "TOP4"], ["TOP2", "TOP7"], ["TOP3", "TOP8"], ["TOP4", "TOP9"], ["TOP7", "TOP0"],
48 ["TOP1", "TOP7"], ["TOP2", "TOP8"], ["TOP3", "TOP9"], ["TOP4", "TOP0"],
49 ["TOP1", "TOP8"], ["TOP2", "TOP9"], ["TOP3", "TOP0"],
50 ["TOP1", "TOP9"], ["TOP2", "TOP0"],
51 ["TOP1", "TOP0"]
52 ]
53 }
54 ],
55 "pseudolayers": [
56 {
57 "name": "ALWAYS_ON",
58 "chords": [
59 {
60 "type": "chord_set",
61 "set": "cols",
62 "keycodes": [
63 " ", " ", " ", " ", " ", " ", " ", " ", " ",
64 "LOCK", " AT", " ", " ", " CMD", " ", " ", " ", " ",
65 " ", " ", " ", " ", " ", " ", " ", " ", " "
66 ]
67 },
68 {
69 "type": "visual",
70 "chord": [
71 "X", "X", " ", " ", " ", " ", " ", " ", "X", "X",
72 "X", "X", " ", " ", " ", " ", " ", " ", "X", "X"
73 ],
74 "keycode": "CLEAR_KB"
75 }
76 ]
77 },
78 {
79 "name": "QWERTY",
80 "chords": [
81 {
82 "type": "chord_set",
83 "set": "rows",
84 "keycodes": [
85 "AS(Q)", "AS(W)", "AS(E)", "AS(R)", "AS(T)", "AS(Y)", "AS(U)", "AS(I)", "AS(O)", "AS(P)",
86 "AS(A)", "AS(S)", "AS(D)", "AS(F)", "AS(G)", "AS(H)", "AS(J)", "AS(K)", "AS(L)", "AS(;)",
87 "AS(Z)", "AS(X)", "AS(C)", "AS(V)", "AS(B)", "AS(N)", "AS(M)", "AS(,)", "AS(.)", "AS(/)"
88 ]
89 },
90 {
91 "type": "chord_set",
92 "set": "cols",
93 "keycodes": [
94 " ESC", "MO(MOV)", " TAB", " ", "O(RGUI)", " ", " INS", " DEL", " BSPC",
95 " ", " ", " ", " ", " ", " ", " ", " ", " ENTER",
96 "O(LSFT)", "O(LCTL)", "O(LALT)", "O(NUM)", "O(LGUI)", "O(NUM)", "O(RALT)", "O(RCTL)", "O(RSFT)"
97 ]
98 },
99 {
100 "type": "simple",
101 "chord": ["BOT1", "BOT0"],
102 "keycode": "SPACE"
103 },
104 {
105 "type": "visual",
106 "chord": [
107 "X", "X", "X", "X", " ", " ", " ", " ", " ", " ",
108 " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
109 ],
110 "keycode": "MO(MOUSE)"
111 },
112 {
113 "type": "visual",
114 "chord": [
115 "X", "X", "X", "X", " ", " ", "X", "X", "X", "X",
116 " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
117 ],
118 "keycode": "DF(ASETNIOP)"
119 }
120 ]
121 },
122 {
123 "name": "NUM",
124 "chords": [
125 {
126 "type": "chord_set",
127 "set": "rows",
128 "keycodes": [
129 "AS(1)", "AS(2)", "AS(3)", "AS(4)", "AS(5)", "AS(6)", "AS(7)", "AS(8)", "AS(9)", "AS(0)",
130 " F1", " F2", " F3", " F4", " F5", " F6", " F7", " F8", " F9", " F10",
131 "AS(`)", "AS(-)", "AS(=)", "AS([)", "AS(])", "AS(\\)", "AS(')", " ", " F11", " F12"
132 ]
133 },
134 {
135 "type": "chord_set",
136 "set": "cols",
137 "keycodes": [
138 " ESC", " ", " TAB", " ", "O(RGUI)", " ", " INS", " DEL", " BSPC",
139 " ", " ", " ", " ", " ", " ", " ", " ", " ENTER",
140 "O(LSFT)", "O(LCTL)", "O(LALT)", " ", "O(LGUI)", " ", "O(RALT)", "O(RCTL)", " O(RSFT)"
141 ]
142 },
143 {
144 "type": "simple",
145 "chord": ["BOT1", "BOT0"],
146 "keycode": "SPACE"
147 }
148 ]
149 },
150 {
151 "name": "MOV",
152 "chords": [
153 {
154 "type": "chord_set",
155 "set": "rows",
156 "keycodes": [
157 " ", " ", " ", " ", " ", " ", " HOME", " UP", " END", " PGUP",
158 " ", " ", " ", " ", " ", " ", " ", " ", " ", " ",
159 " ", " ", " LSFT", " LCTL", " LALT", " LGUI", " LEFT", " DOWN", "RIGHT", " PGDN"
160 ]
161 }
162 ]
163 },
164 {
165 "name": "MOUSE",
166 "chords": [
167 {
168 "type": "chord_set",
169 "set": "rows",
170 "keycodes": [
171 " ", " ", " ", " ", " ", " ", " BTN1", " MS_U", " BTN2", " WH_U",
172 " ", " ", " ", " ", " ", " ", " ", " ", " ", " ",
173 " ", " ", " LSFT", " LCTL", " LALT", " LGUI", " MS_L", " MS_D", " MS_R", " WH_D"
174 ]
175 }
176 ]
177 },
178 {
179 "name": "ASETNIOP",
180 "chords": [
181 {
182 "type": "chord_set",
183 "set": "asetniop",
184 "keycodes": [
185 "A", "S", "E", "T", "N", "I", "O", "P",
186 "W", "D", "R", "B", "H", "L", ";",
187 "X", "C", "Y", "V", "U", "",
188 "F", "J", ",", "G", "M",
189 "Q", "K", "-", "BSPC",
190 "Z", ".", "'",
191 "[", "]",
192 "/"
193 ]
194 },
195 {
196 "type": "chord_set",
197 "set": "rows",
198 "keycodes": [
199 " ", " ", " ", " ", " ESC", " DEL", " ", " ", " ", " ",
200 " ", " ", " ", " ", " ", " ", " ", " ", " ", " ",
201 " ", " ", " ", "LSFT", "LCTL", "LALT", "KL(SPACE, ASETNIOP_123)", "", "", ""
202 ]
203 },
204 {
205 "type": "chord_set",
206 "set": "cols",
207 "keycodes": [
208 " ", " ", " ", " ", "LGUI", " ", " ", " ", " ",
209 " ", " ", " ", " ", " ", " ", " ", " ", " ",
210 " ", " ", " ", " ", " ", " ", " ", " ", " "
211 ]
212 },
213 {
214 "type": "visual",
215 "chord": [
216 "X", "X", "X", "X", " ", " ", " ", " ", " ", " ",
217 " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
218 ],
219 "keycode": "DF(QWERTY)"
220 },
221 {
222 "type": "visual",
223 "chord": [
224 " ", " ", " ", " ", " ", " ", " ", " ", " ", " ",
225 " ", " ", " ", "X", " ", " ", "X", " ", " ", " "
226 ],
227 "keycode": "MO(ASETNIOP_FN)"
228 }
229 ]
230 },
231 {
232 "name": "ASETNIOP_123",
233 "chords": [
234 {
235 "type": "chord_set",
236 "set": "asetniop",
237 "keycodes": [
238 "1", "2", "3", "4", "7", "8", "9", "0",
239 " ", " ", "5", "=", "6", "\\", ";",
240 " ", " ", " ", " ", " ", " ",
241 " ", " ", " ", " ", " ",
242 " ", " ", " ", "BSPC",
243 " ", " ", " ",
244 " ", " ",
245 " "
246 ]
247 },
248 {
249 "type": "chord_set",
250 "set": "rows",
251 "keycodes": [
252 " ", " ", " ", " ", " ESC", " DEL", " ", " ", " ", " ",
253 " ", " ", " ", " ", " ", " ", " ", " ", " ", " ",
254 " ", " ", " ", "LSFT", "LCTL", "LALT", " ", " ", " ", " "
255 ]
256 },
257 {
258 "type": "chord_set",
259 "set": "cols",
260 "keycodes": [
261 " ", " ", " ", " ", "LGUI", " ", " ", " ", " ",
262 " ", " ", " ", " ", " ", " ", " ", " ", " ",
263 " ", " ", " ", " ", " ", " ", " ", " ", " "
264 ]
265 }
266 ]
267 },
268 {
269 "name": "ASETNIOP_FN",
270 "chords": [
271 {
272 "type": "chord_set",
273 "set": "asetniop",
274 "keycodes": [
275 "HOME", "PGDN", "PGUP", " END", "LEFT", "DOWN", " UP", "RIGHT",
276 " F1", " F2", " F3", " F4", " F5", " F6", " F7",
277 " F10", " ", " ", " ", " ", " F8",
278 " F11", " ", " ", " ", " F9",
279 " F12", " ", " ", "BSPC",
280 " ", " ", " ",
281 " ", " ",
282 " "
283 ]
284 },
285 {
286 "type": "chord_set",
287 "set": "rows",
288 "keycodes": [
289 " ", " ", " ", " ", " ESC", " DEL", " ", " ", " ", " ",
290 " ", " ", " ", " ", " ", " ", " ", " ", " ", " ",
291 " ", " ", " ", "LSFT", "LCTL", "LALT", " ", " ", " ", " "
292 ]
293 },
294 {
295 "type": "chord_set",
296 "set": "cols",
297 "keycodes": [
298 " ", " ", " ", " ", "LGUI", " ", " ", " ", " ",
299 " ", " ", " ", " ", " ", " ", " ", " ", " ",
300 " ", " ", " ", " ", " ", " ", " ", " ", " "
301 ]
302 }
303 ]
304 }
305 ],
306 "leader_sequences": [],
307 "extra_code": "",
308 "extra_dependencies": []
309} \ No newline at end of file
diff --git a/keyboards/butterstick/keymaps/dennytom/rules.mk b/keyboards/butterstick/keymaps/dennytom/rules.mk
new file mode 100644
index 000000000..1155f72c0
--- /dev/null
+++ b/keyboards/butterstick/keymaps/dennytom/rules.mk
@@ -0,0 +1,8 @@
1MOUSEKEY_ENABLE = yes
2EXTRAKEY_ENABLE = yes
3CONSOLE_ENABLE = no
4# COMMAND_ENABLE = no
5NKRO_ENABLE = yes
6
7TMPVAR := $(SRC)
8SRC = $(filter-out sten.c, $(TMPVAR)) \ No newline at end of file