aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Gebhart <e.a.gebhart@gmail.com>2022-01-13 23:40:41 -0500
committerGitHub <noreply@github.com>2022-01-13 20:40:41 -0800
commite865cab48ec25c2fff958b23d89b1f86755d445c (patch)
tree0632ae08d0bfd477469768925ba74bce67087871
parent0f110737dba362596fcdbebd6c2bd4cc574f344b (diff)
downloadqmk_firmware-e865cab48ec25c2fff958b23d89b1f86755d445c.tar.gz
qmk_firmware-e865cab48ec25c2fff958b23d89b1f86755d445c.zip
[Keymap] ericgebhart keymap and userspace updates (#15727)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com> Co-authored-by: Drashna Jael're <drashna@live.com>
-rwxr-xr-xkeyboards/crkbd/keymaps/ericgebhart/config.h24
-rwxr-xr-xkeyboards/crkbd/keymaps/ericgebhart/keymap.c60
-rw-r--r--keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c378
-rw-r--r--keyboards/ergodox_ez/keymaps/ericgebhart/layouts.h139
-rw-r--r--keyboards/keebio/viterbi/keymaps/ericgebhart/keymap.c185
-rw-r--r--keyboards/kinesis/keymaps/ericgebhart/keymap.c53
-rw-r--r--keyboards/kinesis/keymaps/ericgebhart/readme.md5
-rw-r--r--keyboards/kinesis/keymaps/ericgebhart/rules.mk16
-rw-r--r--keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/keymap.c101
-rw-r--r--keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/layouts.h113
-rw-r--r--keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/readme.md5
-rw-r--r--keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/rules.mk16
-rw-r--r--keyboards/xiudi/xd75/keymaps/ericgebhart/keymap.c169
-rwxr-xr-xusers/ericgebhart/altlocal_keys.c94
-rw-r--r--users/ericgebhart/altlocal_keys.h36
-rw-r--r--users/ericgebhart/base_layers.h283
-rw-r--r--users/ericgebhart/caps_word.c81
-rw-r--r--users/ericgebhart/caps_word.h35
-rw-r--r--users/ericgebhart/combos.def10
-rwxr-xr-xusers/ericgebhart/config.h23
-rwxr-xr-x[-rw-r--r--]users/ericgebhart/core_keys.h233
-rwxr-xr-x[-rw-r--r--]users/ericgebhart/core_keysets.h492
-rw-r--r--users/ericgebhart/edge_keys.h238
-rwxr-xr-x[-rw-r--r--]users/ericgebhart/ericgebhart.c590
-rwxr-xr-x[-rw-r--r--]users/ericgebhart/ericgebhart.h80
-rwxr-xr-xusers/ericgebhart/layers.h677
-rw-r--r--users/ericgebhart/layouts.h720
-rw-r--r--users/ericgebhart/mod_layer.h178
-rwxr-xr-xusers/ericgebhart/oled_stuff.c303
-rwxr-xr-xusers/ericgebhart/oled_stuff.h24
-rwxr-xr-xusers/ericgebhart/process_records.c255
-rwxr-xr-x[-rw-r--r--]users/ericgebhart/readme.md292
-rwxr-xr-xusers/ericgebhart/rules.mk28
-rwxr-xr-xusers/ericgebhart/tap_dances.c269
-rwxr-xr-xusers/ericgebhart/tap_dances.h19
35 files changed, 4223 insertions, 2001 deletions
diff --git a/keyboards/crkbd/keymaps/ericgebhart/config.h b/keyboards/crkbd/keymaps/ericgebhart/config.h
new file mode 100755
index 000000000..d1844f680
--- /dev/null
+++ b/keyboards/crkbd/keymaps/ericgebhart/config.h
@@ -0,0 +1,24 @@
1/*
2This is the c configuration file for the keymap
3
4Copyright 2012 Jun Wako <wakojun@gmail.com>
5Copyright 2015 Jack Humbert
6
7This program is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#pragma once
22
23// otherwise the other promicro v3 isn't found
24#define SPLIT_USB_DETECT
diff --git a/keyboards/crkbd/keymaps/ericgebhart/keymap.c b/keyboards/crkbd/keymaps/ericgebhart/keymap.c
new file mode 100755
index 000000000..e893ec596
--- /dev/null
+++ b/keyboards/crkbd/keymaps/ericgebhart/keymap.c
@@ -0,0 +1,60 @@
1/*
2 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include "ericgebhart.h"
18
19#define Crkbd_base(...) Base_3x6_3(__VA_ARGS__)
20#define Crkbd_bepo(...) Base_bepo_3x6_3(__VA_ARGS__)
21#define Crkbd_bepo6(...) Base_bepo6_3x6_3(__VA_ARGS__)
22#define Crkbd_transient(...) Transient6_3x6_3(__VA_ARGS__)
23
24/*
25 * The `Crkbd_base` macro is a template to allow the use of identical
26 * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so
27 * that there is no need to set them up for each layout, and modify all of
28 * them if I want to change them. This helps to keep consistency and ease
29 * of use. K## is a placeholder to pass through the individual keycodes
30 */
31
32const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
33 // Qwerty based Base layers
34 [_DVORAK] = Crkbd_base(___DVORAK___),
35 [_BEAKL] = Crkbd_base(___BEAKL15___),
36 [_COLEMAK] = Crkbd_base(___COLEMAK_DH___),
37 [_QWERTY] = Crkbd_base(___QWERTY___),
38
39 // Bepo base layers
40 [_BEAKL_BP] = Crkbd_bepo(___BEAKL15_FR___),
41 [_DVORAK_BP] = Crkbd_bepo(___DVORAK_FR___),
42 [_BEPO] = Crkbd_bepo6(___BEPO6___),
43
44 // Transient layers.
45 [_SYMB] = Crkbd_transient(___SYMB_BEAKLB_3x12___),
46 [_SYMB_BP] = Crkbd_transient(___SYMB_BEAKLB_BP_3x12___),
47
48 [_KEYPAD] = Crkbd_transient(___KP_C_3x12___),
49 [_KEYPAD_BP] = Crkbd_transient(___KP_C_BP_3x12___),
50
51 [_TOPROWS] = Crkbd_transient(___TOPROWS_3x12___),
52 [_TOPROWS_BP] = Crkbd_transient(___TOPROWS_BP_3x12___),
53
54 [_NAV] = Crkbd_transient(___NAV_3x12___),
55
56 [_LAYERS] = Crkbd_transient(___LAYERS_3x12___),
57 //[_RGB] = Crkbd_transient(___RGB_3x12___),
58 [_ADJUST] = Crkbd_transient(___ADJUST_3x12___),
59 ///HPT_TOG, KC_NUKE, ___, ___, TG_MODS, HPT_FBK
60};
diff --git a/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c b/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c
index 55bf4209f..e76e3296b 100644
--- a/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c
@@ -16,369 +16,33 @@
16*/ 16*/
17#include "keymap_bepo.h" 17#include "keymap_bepo.h"
18#include "ericgebhart.h" 18#include "ericgebhart.h"
19 19#include "layouts.h"
20 20
21const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 21const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
22 22
23 [DVORAK] = LAYOUT_ergodox_wrapper( 23 // Qwerty Base layers
24 // left hand 24 [_DVORAK] = Dox_base(___NUMS___, ___DVORAK___),
25 KC_GRV, ___NUMBER_L___, OSL(LAYERS), 25 [_QWERTY] = Dox_base(___NUMS___, ___QWERTY___),
26 KC_LOCK, ___DVORAK_L1___, LCTL(KC_C), 26 [_COLEMAK] = Dox_base(___NUMS___, ___COLEMAK_DH___),
27 TAB_BKTAB, ___DVORAK_L2___, 27 [_BEAKL] = Dox_base(___NUMS___, ___BEAKL15___),
28 KC_LSFT, ___DVORAK_L3___, TO(MDIA), 28 // Bepo Base layers
29 29 [_DVORAK_BP] = Dox_bepo_base(___NUMS_BP___, ___DVORAK_FR___),
30 ___BOTTOM_LEFT___, 30 [_BEAKL_BP] = Dox_bepo_base(___BKLNUMS_BP___, ___BEAKL15_FR___),
31 ___ERGODOX_THUMB_LEFT___, 31 [_BEPO] = Dox_bepo_base6(___BEPO6___),
32
33 // right hand
34 MDIA_SYMB_KP_LAYERS, ___NUMBER_R___, KC_EQL,
35 LCTL(KC_V), ___DVORAK_R1___, KC_SLASH,
36 /* */ ___DVORAK_R2___, KC_MINUS,
37 TO(KEYPAD), ___DVORAK_R3___, KC_RSFT,
38
39 ___BOTTOM_RIGHT___,
40 ___ERGODOX_THUMB_RIGHT___
41 ),
42
43 [XMONAD] = LAYOUT_ergodox_wrapper(
44 // left hand
45 ___, ___FUNC_L___, ___,
46 ___, ___DVORAK_L1___, ___,
47 ___, ___DVORAK_L2___,
48 ___, ___DVORAK_L3___, ___,
49
50 ___BOTTOM_LEFT___,
51 ___ERGODOX_THUMB_LEFT___,
52
53 // right hand
54 ___, ___FUNC_R___, ___,
55 ___, ___DVORAK_R1___, ___,
56 /**/ ___DVORAK_R2___, ___,
57 ___, ___DVORAK_R3___, ___,
58
59 ___BOTTOM_RIGHT___,
60 ___ERGODOX_THUMB_RIGHT___
61 ),
62
63 [QWERTY] = LAYOUT_ergodox_wrapper(
64 // left hand
65 KC_GRV, ___NUMBER_L___, OSL(LAYERS),
66 KC_LOCK, ___QWERTY_L1___, LCTL(KC_C),
67 TAB_BKTAB, ___QWERTY_L2___,
68 KC_LSFT, ___QWERTY_L3___, TO(MDIA),
69
70 ___BOTTOM_LEFT___,
71 ___ERGODOX_THUMB_LEFT___,
72
73 // right hand
74 MDIA_SYMB_KP_LAYERS, ___NUMBER_R___, KC_EQL,
75 LCTL(KC_V), ___QWERTY_R1___, KC_SLASH,
76 /* */ ___QWERTY_R2___, KC_MINUS,
77 TO(KEYPAD), ___QWERTY_R3___, KC_RSFT,
78
79 ___BOTTOM_RIGHT___,
80 ___ERGODOX_THUMB_RIGHT___
81 ),
82
83 [COLEMAK] = LAYOUT_ergodox_wrapper(
84 // left hand
85 KC_GRV, ___NUMBER_L___, OSL(LAYERS),
86 KC_LOCK, ___COLEMAK_L1___, LCTL(KC_C),
87 TAB_BKTAB, ___COLEMAK_L2___,
88 KC_LSFT, ___COLEMAK_L3___, TO(MDIA),
89
90 ___BOTTOM_LEFT___,
91 ___ERGODOX_THUMB_LEFT___,
92
93 // right hand
94 MDIA_SYMB_KP_LAYERS, ___NUMBER_R___, KC_EQL,
95 LCTL(KC_V), ___COLEMAK_R1___, KC_SLASH,
96 /* */ ___COLEMAK_R2___, KC_MINUS,
97 TO(KEYPAD), ___COLEMAK_R3___, KC_RSFT,
98
99 ___BOTTOM_RIGHT___,
100 ___ERGODOX_THUMB_RIGHT___
101 ),
102
103 [WORKMAN] = LAYOUT_ergodox_wrapper(
104 // left hand
105 KC_GRV, ___NUMBER_L___, OSL(LAYERS),
106 KC_LOCK, ___WORKMAN_L1___, LCTL(KC_C),
107 TAB_BKTAB, ___WORKMAN_L2___,
108 KC_LSFT, ___WORKMAN_L3___, TO(MDIA),
109
110 ___BOTTOM_LEFT___,
111 ___ERGODOX_THUMB_LEFT___,
112
113 // right hand
114 MDIA_SYMB_KP_LAYERS, ___NUMBER_R___, KC_EQL,
115 LCTL(KC_V), ___WORKMAN_R1___, KC_SLASH,
116 /* */ ___WORKMAN_R2___, KC_MINUS,
117 TO(KEYPAD), ___WORKMAN_R3___, KC_RSFT,
118
119 ___BOTTOM_RIGHT___,
120 ___ERGODOX_THUMB_RIGHT___
121 ),
122
123 [NORMAN] = LAYOUT_ergodox_wrapper(
124 // left hand
125 KC_GRV, ___NUMBER_L___, OSL(LAYERS),
126 KC_LOCK, ___NORMAN_L1___, LCTL(KC_C),
127 TAB_BKTAB, ___NORMAN_L2___,
128 KC_LSFT, ___NORMAN_L3___, TO(MDIA),
129
130 ___BOTTOM_LEFT___,
131 ___ERGODOX_THUMB_LEFT___,
132
133 // right hand
134 MDIA_SYMB_KP_LAYERS, ___NUMBER_R___, KC_EQL,
135 LCTL(KC_V), ___NORMAN_R1___, KC_SLASH,
136 /* */ ___NORMAN_R2___, KC_MINUS,
137 TO(KEYPAD), ___NORMAN_R3___, KC_RSFT,
138
139 ___BOTTOM_RIGHT___,
140 ___ERGODOX_THUMB_RIGHT___
141 ),
142
143 [DVORAK_ON_BEPO] = LAYOUT_ergodox_wrapper(
144 // left hand
145 DB_GRV, ___NUMBER_BEPO_L___, OSL(LAYERS),
146 KC_LOCK, ___DVORAK_FR_L1___, DB_LBRC,
147 TAB_BKTAB, ___DVORAK_FR_L2___,
148 KC_LSFT, ___DVORAK_FR_L3___, DB_LPRN,
149
150 ___BOTTOM_LEFT_FR___,
151 ___ERGODOX_THUMB_LEFT_BP___,
152
153
154 // right hand
155 MDIA_SYMB_KP_LAYERS, ___NUMBER_BEPO_R___, DB_EQL,
156 DB_RBRC, ___DVORAK_FR_R1___, DB_SLASH,
157
158 /* */ ___DVORAK_FR_R2___, DB_MINUS,
159 DB_RPRN, ___DVORAK_FR_R3___, KC_RSFT,
160
161 ___BOTTOM_RIGHT_FR___,
162 ___ERGODOX_THUMB_RIGHT_BP___
163 ),
164
165 [BEPO] = LAYOUT_ergodox_wrapper(
166 // Left hand
167 BP_DLR, ___SYMBOL_BEPO_L___, OSL(LAYERS),
168 KC_LOCK, ___BEPO_FR_L1___, DB_LBRC,
169 TAB_BKTAB, ___BEPO_FR_L2___,
170 BP_SFT_T_ECRC, ___BEPO_FR_L3___, DB_RBRC,
171
172 ___5___,
173 ___6___,
174 32
175 33
176 // Right hand 34 // transient layers.
177 MDIA_SYMB_KP_LAYERS, ___SYMBOL_BEPO_R___, BP_EQL, 35 // Switch to using a transient layer macro
178 BP_DCIR, ___BEPO_FR_R1___, BP_W, 36 [_SYMB] = Dox_transient(___12_FUNC___, ___SYMB_BEAKLA_3x12___),
179 /* */ ___BEPO_FR_R2___, BP_CCED, 37 [_SYMB_BP] = Dox_transient(___12_FUNC___, ___SYMB_BEAKLA_BP_3x12___),
180 BP_C, ___BEPO_FR_R3___, KC_RSFT,
181 38
182 ___5___, 39 [_TOPROWS] = Dox_transient(___12___, ___TOPROWS_3x12___),
183 ___6___ 40 [_TOPROWS_BP] = Dox_transient(___12___, ___TOPROWS_BP_3x12___),
184 ),
185 41
186 [XMONAD_FR] = LAYOUT_ergodox_wrapper( 42 [_KEYPAD] = Dox_transient(___KEYPAD_BKL_FUNC_4x12___),
187 // left hand 43 [_KEYPAD_BP] = Dox_transient(___KEYPAD_BKL_FUNC_BP_4x12___),
188 ___, ___FUNC_L___, ___,
189 ___, ___DVORAK_FR_L1___, ___,
190 ___, ___DVORAK_FR_L2___,
191 ___, ___DVORAK_FR_L3___, ___,
192 44
193 ___BOTTOM_LEFT_FR___, 45 [_NAV] = Dox_transient(___12___, ___NAV_3x12___),
194 ___ERGODOX_THUMB_LEFT_BP___, 46 [_LAYERS] = Dox_transient(___12___, ___LAYERS_3x12___),
195 47 [_RGB] = Dox_transient(___12___, ___RGB_3x12___),
196
197 // right hand
198 ___, ___FUNC_R___, ___,
199 ___, ___DVORAK_FR_R1___, ___,
200 /**/ ___DVORAK_FR_R2___, ___,
201 ___, ___DVORAK_FR_R3___, ___,
202
203 ___BOTTOM_RIGHT_FR___,
204 ___ERGODOX_THUMB_RIGHT_BP___
205 ),
206
207 // SYMBOLS
208 [SYMB] = LAYOUT_ergodox_wrapper(
209 // left hand
210 ___FUNC_1_6___, ___,
211 ___SYMBOLS6_1___, ___,
212 ___SYMBOLS6_2___,
213 ___SYMBOLS6_3___, ___,
214 ___SYMBOLS5_4___,
215 ___6___,
216
217
218 // right hand
219 ___, ___FUNC_7_12___,
220 ___, ___SYMPAD_1___,
221 /**/ ___SYMPAD_2___,
222 ___, ___SYMPAD_3___,
223 /**/ ___5_SYMPAD_4___,
224 ___6___
225 ),
226
227 [SYMB_ON_BEPO] = LAYOUT_ergodox_wrapper(
228 // left hand
229 ___FUNC_1_6___, ___,
230 ___SYMBOLS6_1_BP___, ___,
231 ___SYMBOLS6_2_BP___,
232 ___SYMBOLS6_3_BP___, ___,
233 ___SYMBOLS5_4_BP___,
234 ___6___,
235
236
237 // right hand
238 ___, ___FUNC_7_12___,
239 ___, ___SYMPAD_1_BP___,
240 /**/ ___SYMPAD_2_BP___,
241 ___, ___SYMPAD_3_BP___,
242 /**/ ___5_SYMPAD_4_BP___,
243 ___6___
244 ),
245
246 [KEYPAD] = LAYOUT_ergodox_wrapper(
247 ___FUNC_1_6___, ___,
248 ___2___, ___FUNCPAD_T___, ___, ___,
249 ___2___, ___FUNCPAD_1___, ___,
250 ___2___, ___FUNCPAD_2___, ___, ___,
251 ___2___, ___FUNCPAD_3___,
252 ___6___,
253
254 // right hand
255 ___, ___FUNC_7_12___,
256 ___, ___, ___KEYPAD_1___, ___,
257 /**/ ___, ___KEYPAD_2___, ___,
258 ___, ___, ___KEYPAD_3___, ___,
259 /* */ ___KEYPAD_4___, ___,
260 ___6___
261 ),
262
263 [KEYPAD_ON_BEPO] = LAYOUT_ergodox_wrapper(
264 ___FUNC_1_6___, ___,
265 ___2___, ___FUNCPAD_T___, ___, ___,
266 ___2___, ___FUNCPAD_1___, ___,
267 ___2___, ___FUNCPAD_2___, ___, ___,
268 ___2___, ___FUNCPAD_3___,
269 ___6___,
270
271 // right hand
272 ___, ___FUNC_7_12___,
273 ___, ___, ___KEYPAD_1_BP___, ___,
274 /**/ ___, ___KEYPAD_2_BP___, ___,
275 ___, ___, ___KEYPAD_3_BP___, ___,
276 /* */ ___KEYPAD_4_BP___, ___,
277 ___6___
278 ),
279
280 // MEDIA AND MOUSE
281 [MDIA] = LAYOUT_ergodox_wrapper(
282 // left hand
283 ___FUNC_1_6___, ___,
284 ___MOUSE_BTNS_L___, ___, ___,
285 ___, ___MOUSE_LDUR___, ___,
286 ___, ___MWHEEL_LDUR___, XXX, ___,
287 ___, ___, ___MOUSE_ACCL_012___,
288 ___6___,
289
290 // right hand
291 ___, ___FUNC_7_12___,
292 ___, KC_VOLU, ___MUTE_PRV_PLAY_NXT_STOP___,
293 /**/ KC_VOLD, ___VI_ARROWS___, ___,
294 ___, ___, ___MOUSE_BTNS_R___,
295 /* */ KC_PGDN, KC_PGUP, ___3___,
296 ___6___
297 ),
298
299 [LAYERS] = LAYOUT_ergodox_wrapper(
300 // left hand
301 ___FUNC_1_6___, ___,
302 XXX, XXX, XXX, ___2_LAYERS_B1___, XXX, ___,
303 XXX, XXX, XXX, ___2_LAYERS_B2___, XXX,
304 XXX, XXX, ___3_LAYERS_B3___, XXX, ___,
305 ___5___,
306 ___6___,
307
308 // right hand
309 ___, ___FUNC_7_12___,
310 ___, XXX, ___3_LAYERS_T_BP___, ___2___,
311 /**/ XXX, ___3_LAYERS_T___, ___2___,
312 ___, XXX, ___3_LAYERS_T_CTL___, ___2___,
313 ___5___,
314 ___6___
315 ),
316}; 48};
317
318
319
320// Runs constantly in the background, in a loop.
321void matrix_scan_user(void) {
322
323 uint8_t layer = biton32(layer_state);
324
325 ergodox_board_led_off();
326 ergodox_right_led_1_off();
327 ergodox_right_led_2_off();
328 ergodox_right_led_3_off();
329 if(!on_qwerty())
330 ergodox_right_led_1_on();
331 switch (layer) {
332 //case DVORAK:
333 //ergodox_right_led_1_off();
334 //break;
335 // first led on for a bepo software keyboard layer
336 case DVORAK_ON_BEPO:
337 ergodox_right_led_2_on();
338 break;
339 case BEPO:
340 ergodox_right_led_1_on();
341 ergodox_right_led_1_off();
342 ergodox_right_led_1_on();
343 ergodox_right_led_1_off();
344 ergodox_right_led_1_on();
345 break;
346 case SYMB:
347 ergodox_right_led_3_on();
348 break;
349 case MDIA:
350 ergodox_right_led_3_on();
351 break;
352 case LAYERS:
353 ergodox_right_led_1_on();
354 ergodox_right_led_2_on();
355 ergodox_right_led_3_on();
356 break;
357 default:
358 ergodox_board_led_off();
359 break;
360
361 /* default: */
362 /* // none */
363 /* break; */
364
365 }
366}
367
368
369/*
370 clear_oneshot_mods();
371 set_oneshot_locked_mods(mods);
372 register_mods(mods);
373
374 register_code(action.key.code);
375 unregister_code(action.key.code);
376
377 layer_on(action.layer_tap.val);
378 layer_off(action.layer_tap.val);
379
380 clear_oneshot_locked_mods();
381 clear_oneshot_mods();
382 unregister_mods(mods);
383
384*/
diff --git a/keyboards/ergodox_ez/keymaps/ericgebhart/layouts.h b/keyboards/ergodox_ez/keymaps/ericgebhart/layouts.h
new file mode 100644
index 000000000..dd8f193df
--- /dev/null
+++ b/keyboards/ergodox_ez/keymaps/ericgebhart/layouts.h
@@ -0,0 +1,139 @@
1/*
2 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18/********************************************************************/
19/* Ergodox EZ */
20/********************************************************************/
21// This one is is set up to pass in the number row.
22// Beakl and bepo both change the number row.
23// Left, middle, right, bottom, and thumbs all stay the same.
24#define Base_dox( \
25 K01, K02, K03, K04, K05, \
26 K06, K07, K08, K09, K0A, \
27 K11, K12, K13, K14, K15, \
28 K16, K17, K18, K19, K1A, \
29 K21, K22, K23, K24, K25, \
30 K26, K27, K28, K29, K2A, \
31 K31, K32, K33, K34, K35, \
32 K36, K37, K38, K39, K3A \
33 ) \
34 LVARG_edox( \
35 ROW0_LEFT(K01, K02, K03, K04, K05), \
36 ___2_MIDDLE_1___, \
37 ROW0_RIGHT(K06, K07, K08, K09, K0A), \
38 \
39 ROW1_LEFT(K11, K12, K13, K14, K15), \
40 ___2_MIDDLE_2___, \
41 ROW1_RIGHT(K16, K17, K18, K19, K1A), \
42 \
43 ROW2_LEFT(K21, K22, K23, K24, K25), \
44 ROW2_RIGHT(K26, K27, K28, K29, K2A), \
45 \
46 ROW3_LEFT(K31, K32, K33, K34, K35), \
47 ___2_MIDDLE_3___, \
48 ROW3_RIGHT(K36, K37, K38, K39, K3A), \
49 ___5_BOTTOM_LEFT___, ___5_BOTTOM_RIGHT___, \
50 ___12_DOX_ALL_THUMBS___ \
51 )
52
53#define Base_dox_bepo( \
54 K01, K02, K03, K04, K05, \
55 K06, K07, K08, K09, K0A, \
56 K11, K12, K13, K14, K15, \
57 K16, K17, K18, K19, K1A, \
58 K21, K22, K23, K24, K25, \
59 K26, K27, K28, K29, K2A, \
60 K31, K32, K33, K34, K35, \
61 K36, K37, K38, K39, K3A \
62 ) \
63 LVARG_edox( \
64 ROW0_LEFT(K01, K02, K03, K04, K05), \
65 ___2_MIDDLE_1___, \
66 ROW0_RIGHT(K06, K07, K08, K09, K0A), \
67 \
68 ROW1_LEFT(K11, K12, K13, K14, K15), \
69 ___2_MIDDLE_2___, \
70 ROW1_RIGHT(K16, K17, K18, K19, K1A), \
71 \
72 ROW2_LEFT(K21, K22, K23, K24, K25), \
73 ROW2_RIGHT(K26, K27, K28, K29, K2A), \
74 \
75 ROW3_LEFT(K31, K32, K33, K34, K35), \
76 ___2_MIDDLE_3___, \
77 ROW3_RIGHT(K36, K37, K38, K39, K3A), \
78 ___5_BOTTOM_LEFT___, ___5_BOTTOM_RIGHT___, \
79 ___12_DOX_ALL_THUMBS_BP___ \
80 )
81
82
83#define Base_dox_bepo6( \
84 K01, K02, K03, K04, K05, K06, \
85 K07, K08, K09, K0A, K0B, K0C, \
86 K11, K12, K13, K14, K15, K16, \
87 K17, K18, K19, K1A, K1B, K1C, \
88 K21, K22, K23, K24, K25, K26, \
89 K27, K28, K29, K2A, K2B, K2C \
90 ) \
91 LVARG_edox( \
92 ___6SYMBOL_BEPO_L___, \
93 ___2_MIDDLE_T_BP___, \
94 ___6SYMBOL_BEPO_R___, \
95 ROW1_LEFT_BP6(K01, K02, K03, K04, K05, K06), \
96 ___2_MIDDLE_2_BP___, \
97 ROW1_RIGHT_BP6(K07, K08, K09, K0A, K0B, K0C), \
98 \
99 ROW2_LEFT_BP6(K11, K12, K13, K14, K15, K16), \
100 ROW2_RIGHT_BP6(K17, K18, K19, K1A, K1B, K1C), \
101 \
102 ROW3_LEFT_BP6(K21, K22, K23, K24, K25, K26), \
103 ___2_MIDDLE_3_BP___, \
104 ROW3_RIGHT_BP6(K27, K28, K29, K2A, K2B, K2C), \
105 \
106 ___5_BOTTOM_LEFT_BP___, ___5_BOTTOM_RIGHT_BP___, \
107 ___12_DOX_ALL_THUMBS_BP___ \
108 )
109
110#define Transient_dox6( \
111 K01, K02, K03, K04, K05, K06, \
112 K07, K08, K09, K0A, K0B, K0C, \
113 K11, K12, K13, K14, K15, K16, \
114 K17, K18, K19, K1A, K1B, K1C, \
115 K21, K22, K23, K24, K25, K26, \
116 K27, K28, K29, K2A, K2B, K2C, \
117 K31, K32, K33, K34, K35, K36, \
118 K37, K38, K39, K3A, K3B, K3C \
119 ) \
120 LVARG_edox( \
121 K01, K02, K03, K04, K05, K06, \
122 ___2___, \
123 K07, K08, K09, K0A, K0B, K0C, \
124 K11, K12, K13, K14, K15, K16, \
125 ___2___, \
126 K17, K18, K19, K1A, K1B, K1C, \
127 K21, K22, K23, K24, K25, K26, \
128 K27, K28, K29, K2A, K2B, K2C, \
129 K31, K32, K33, K34, K35, K36, \
130 ___2___, \
131 K37, K38, K39, K3A, K3B, K3C, \
132 ___5___, ___5___, \
133 ___12___ \
134 )
135
136#define Dox_base(...) Base_dox(__VA_ARGS__)
137#define Dox_bepo_base(...) Base_dox_bepo(__VA_ARGS__)
138#define Dox_bepo_base6(...) Base_dox_bepo6(__VA_ARGS__)
139#define Dox_transient(...) Transient_dox6(__VA_ARGS__)
diff --git a/keyboards/keebio/viterbi/keymaps/ericgebhart/keymap.c b/keyboards/keebio/viterbi/keymaps/ericgebhart/keymap.c
index baf6637ea..60f7b74bc 100644
--- a/keyboards/keebio/viterbi/keymaps/ericgebhart/keymap.c
+++ b/keyboards/keebio/viterbi/keymaps/ericgebhart/keymap.c
@@ -19,175 +19,30 @@
19#include "ericgebhart.h" 19#include "ericgebhart.h"
20 20
21const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 21const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
22 // 4x10
23 [_DVORAK] = BASE_5x14(___NUMS___, ___DVORAK___),
24 [_QWERTY] = BASE_5x14(___NUMS___, ___QWERTY___),
25 [_COLEMAK] = BASE_5x14(___NUMS___, ___COLEMAK_DH___),
26 [_BEAKL] = BASE_5x14(___BKLNUMS___, ___BEAKL15___),
22 27
23 [DVORAK] = LAYOUT_ortho_5x14_wrapper( 28 //[_DVORAK_BP] = BASE_5x14_bepo(___DVORAK_FR___),
24 KC_GRV, ___12_DVORAK_1___, KC_SLASH, 29 //[_BEAKL_BP] = BASE_5x14_bepo(___BEAKL15_FR___),
25 TAB_BKTAB, ___12_DVORAK_2___, KC_MINUS,
26 KC_LSFT, ___12_DVORAK_3___, KC_RSFT,
27 ___ORTHO_14_BOTTOM___,
28 ___ORTHO_14_THUMBS_BOTTOM___
29 ),
30 30
31 [QWERTY] = LAYOUT_ortho_5x14_wrapper( 31 // 4x12
32 KC_GRV, ___12_QWERTY_1___, KC_SLASH, 32 //[_BEPO] = BASE_5x14_bepo6(___BEPO6_FR___),
33 TAB_BKTAB, ___12_QWERTY_2___, KC_MINUS,
34 KC_LSFT, ___12_QWERTY_3___, KC_RSFT,
35 ___ORTHO_14_BOTTOM___,
36 ___ORTHO_14_THUMBS_BOTTOM___
37 ),
38 33
39 [COLEMAK] = LAYOUT_ortho_5x14_wrapper( 34 // transient macro takes a 3x12 for args
40 KC_GRV, ___12_COLEMAK_1___, KC_SLASH, 35 [_SYMB] = TRANSIENT_5x14(___12___, ___SYMB_BEAKLA_3x12___),
41 TAB_BKTAB, ___12_COLEMAK_2___, KC_MINUS, 36 //[_SYMB_BP] = TRANSIENT_5x14(___SYMB_BEAKLA_BP_3x12___),
42 KC_LSFT, ___12_COLEMAK_3___, KC_RSFT,
43 ___ORTHO_14_BOTTOM___,
44 ___ORTHO_14_THUMBS_BOTTOM___
45 ),
46 37
47 [WORKMAN] = LAYOUT_ortho_5x14_wrapper( 38 [_TOPROWS] = TRANSIENT_5x14(___12___, ___TOPROWS_3x12___),
48 KC_GRV, ___12_WORKMAN_1___, KC_SLASH, 39 //[_TOPROWS_BP] = TRANSIENT_5x14(___TOPROWS_BP_3x12___),
49 TAB_BKTAB, ___12_WORKMAN_2___, KC_MINUS,
50 KC_LSFT, ___12_WORKMAN_3___, KC_RSFT,
51 ___ORTHO_14_BOTTOM___,
52 ___ORTHO_14_THUMBS_BOTTOM___
53 ),
54 40
55 [NORMAN] = LAYOUT_ortho_5x14_wrapper( 41 [_KEYPAD] = TRANSIENT_5x14(___12___, ___KP_C_3x12___),
56 KC_GRV, ___12_NORMAN_1___, KC_SLASH, 42 //[_KEYPAD_BP] = TRANSIENT_5x14(___KP_C_BP_3x12___),
57 TAB_BKTAB, ___12_NORMAN_2___, KC_MINUS,
58 KC_LSFT, ___12_NORMAN_3___, KC_RSFT,
59 ___ORTHO_14_BOTTOM___,
60 ___ORTHO_14_THUMBS_BOTTOM___
61 ),
62 43
63 [DVORAK_ON_BEPO] = LAYOUT_ortho_5x14_wrapper( 44 // Navigation and control
64 KC_GRV, ___12_DVORAK_B_1___, KC_SLASH, 45 [_NAV] = TRANSIENT_5x14(___12___, ___NAV_3x12___),
65 TAB_BKTAB, ___12_DVORAK_B_2___, KC_MINUS, 46 [_LAYERS] = TRANSIENT_5x14(___12___, ___LAYERS_3x12___),
66 KC_LSFT, ___12_DVORAK_B_3___, KC_RSFT, 47 //[_RGB] = TRANSIENT_5x14(___12___, ___RGB_3x12___),
67 ___ORTHO_14_BOTTOM_FR___,
68 ___ORTHO_14_THUMBS_BOTTOM___
69 ),
70
71 [BEPO] = LAYOUT_ortho_5x14_wrapper(
72 KC_GRV, ___12_DVORAK_B_1___, KC_SLASH,
73 TAB_BKTAB, ___12_DVORAK_B_2___, KC_MINUS,
74 KC_LSFT, ___12_DVORAK_B_3___, KC_RSFT,
75 ___ORTHO_14_BOTTOM_BP___,
76 ___ORTHO_14_THUMBS_BOTTOM___
77 ),
78
79 [XMONAD] = LAYOUT_ortho_5x14_wrapper(
80 ___, ___12_DVORAK_1___, ___,
81 ___, ___12_DVORAK_2___, ___,
82 ___, ___12_DVORAK_3___, ___,
83 ___14___,
84 ___14___
85 ),
86
87 [XMONAD_FR] = LAYOUT_ortho_5x14_wrapper(
88 ___, ___12_DVORAK_B_1___, ___,
89 ___, ___12_DVORAK_B_2___, ___,
90 ___, ___12_DVORAK_B_3___, ___,
91 ___14___,
92 ___14___
93 ),
94
95
96 // SYMBOLS
97 [SYMB] = LAYOUT_ortho_5x14_wrapper(
98 ___14_SYMB_1___,
99 ___14_SYMB_2___,
100 ___14_SYMB_3___,
101 ___14_SYMB_4___,
102 ___14___
103 ),
104
105 [KEYPAD] = LAYOUT_ortho_5x14_wrapper(
106 ___14_KP_1___,
107 ___14_KP_2___,
108 ___14_KP_3___,
109 ___14_KP_4___,
110 ___14___
111 ),
112
113 [KEYPAD_ON_BEPO] = LAYOUT_ortho_5x14_wrapper(
114 ___14_KP_B_1___,
115 ___14_KP_B_2___,
116 ___14_KP_B_3___,
117 ___14_KP_B_4___,
118 ___14___
119 ),
120
121 [SYMB_ON_BEPO] = LAYOUT_ortho_5x14_wrapper(
122 ___14_SYMB_B_1___,
123 ___14_SYMB_B_2___,
124 ___14_SYMB_B_3___,
125 ___14_SYMB_B_4___,
126 ___14___
127 ),
128
129 // MEDIA AND MOUSE
130 [MDIA] = LAYOUT_ortho_5x14_wrapper(
131 ___14_MDIA_1___,
132 ___14_MDIA_2___,
133 ___14_MDIA_3___,
134 ___14_MDIA_4___,
135 ___14___
136 ),
137
138 [LAYERS] = LAYOUT_ortho_5x14_wrapper(
139 ___14_LAYERS_1___,
140 ___14_LAYERS_2___,
141 ___14_LAYERS_3___,
142 ___14___,
143 ___14___
144 ),
145
146 [_RGB] = LAYOUT_ortho_5x14_wrapper(
147 ___14_RGB_1___,
148 ___14_RGB_2___,
149 ___14_RGB_3___,
150 ___14___,
151 ___14___
152 ),
153}; 48};
154
155/* bool process_record_user(uint16_t keycode, keyrecord_t *record) { */
156/* switch (keycode) { */
157/* case QWERTY: */
158/* if (record->event.pressed) { */
159/* set_single_persistent_default_layer(_QWERTY); */
160/* } */
161/* return false; */
162/* break; */
163/* case LOWER: */
164/* if (record->event.pressed) { */
165/* layer_on(_LOWER); */
166/* update_tri_layer(_LOWER, _RAISE, _ADJUST); */
167/* } else { */
168/* layer_off(_LOWER); */
169/* update_tri_layer(_LOWER, _RAISE, _ADJUST); */
170/* } */
171/* return false; */
172/* break; */
173/* case RAISE: */
174/* if (record->event.pressed) { */
175/* layer_on(_RAISE); */
176/* update_tri_layer(_LOWER, _RAISE, _ADJUST); */
177/* } else { */
178/* layer_off(_RAISE); */
179/* update_tri_layer(_LOWER, _RAISE, _ADJUST); */
180/* } */
181/* return false; */
182/* break; */
183/* case ADJUST: */
184/* if (record->event.pressed) { */
185/* layer_on(_ADJUST); */
186/* } else { */
187/* layer_off(_ADJUST); */
188/* } */
189/* return false; */
190/* break; */
191/* } */
192/* return true; */
193/* } */
diff --git a/keyboards/kinesis/keymaps/ericgebhart/keymap.c b/keyboards/kinesis/keymaps/ericgebhart/keymap.c
new file mode 100644
index 000000000..731e257b0
--- /dev/null
+++ b/keyboards/kinesis/keymaps/ericgebhart/keymap.c
@@ -0,0 +1,53 @@
1/*
2 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include "keymap_bepo.h"
18#include "ericgebhart.h"
19
20#define LAYOUT_PVARG(...) LAYOUT_pretty(__VA_ARGS__)
21
22#define Kinesis_base(...) Base_4x6_4_6(__VA_ARGS__)
23#define Kinesis_bepo_base(...) Base_bepo_4x6_4_6(__VA_ARGS__)
24#define Kinesis_bepo_base6(...) Base_bepo6_4x6_4_6(__VA_ARGS__)
25#define Kinesis_transient(...) Transient6_4x6_4_6(__VA_ARGS__)
26
27
28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29
30 // Qwerty Base layers
31 [_DVORAK] = Kinesis_base(___NUMS___, ___DVORAK___),
32 [_QWERTY] = Kinesis_base(___NUMS___, ___QWERTY___),
33 [_COLEMAK] = Kinesis_base(___NUMS___, ___COLEMAK_DH___),
34 [_BEAKL] = Kinesis_base(___BKLNUMS___, ___BEAKL15___),
35 // Bepo Base layers
36 [_DVORAK_BP] = Kinesis_bepo_base(___NUMS_BP___, ___DVORAK_FR___),
37 [_BEAKL_BP] = Kinesis_bepo_base(___BKLNUMS_BP___, ___BEAKL15_FR___),
38
39 [_BEPO] = Kinesis_bepo_base6(___BEPO6___),
40
41 // transient layers.
42 // Switch to using a transient layer macro
43 [_SYMB] = Kinesis_transient(___12_FUNC___, ___SYMB_BEAKLA_3x12___),
44 [_SYMB_BP] = Kinesis_transient(___12_FUNC___, ___SYMB_BEAKLA_BP_3x12___),
45
46 [_TOPROWS] = Kinesis_transient(___12___, ___TOPROWS_3x12___),
47 [_TOPROWS_BP] = Kinesis_transient(___12___, ___TOPROWS_BP_3x12___),
48
49 [_NAV] = Kinesis_transient(___12___, ___NAV_3x12___),
50 [_LAYERS] = Kinesis_transient(___12___, ___LAYERS_3x12___),
51 [_ADJUST] = Kinesis_transient(___12___, ___ADJUST_3x12___),
52 //[_RGB] = Kinesis_transient(___12___, ___RGB_3x12___),
53};
diff --git a/keyboards/kinesis/keymaps/ericgebhart/readme.md b/keyboards/kinesis/keymaps/ericgebhart/readme.md
new file mode 100644
index 000000000..3a4796859
--- /dev/null
+++ b/keyboards/kinesis/keymaps/ericgebhart/readme.md
@@ -0,0 +1,5 @@
1Overview
2========
3
4These are my keymaps. There isn't much here. Go take a look at my Userspace readme.
5That's where all the code is.
diff --git a/keyboards/kinesis/keymaps/ericgebhart/rules.mk b/keyboards/kinesis/keymaps/ericgebhart/rules.mk
new file mode 100644
index 000000000..61115e927
--- /dev/null
+++ b/keyboards/kinesis/keymaps/ericgebhart/rules.mk
@@ -0,0 +1,16 @@
1# Build Options
2# change yes to no to disable
3#
4BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
5MOUSEKEY_ENABLE = yes # Mouse keys
6EXTRAKEY_ENABLE = yes # Audio control and System control
7CONSOLE_ENABLE = no # Console for debug
8COMMAND_ENABLE = yes # Commands for debug and configuration
9NKRO_ENABLE = yes # Enable N-Key Rollover
10BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
11MIDI_ENABLE = no # MIDI controls
12AUDIO_ENABLE = no # Audio output
13UNICODE_ENABLE = no # Unicode
14RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
15SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
16
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/keymap.c
new file mode 100644
index 000000000..59f2a2373
--- /dev/null
+++ b/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/keymap.c
@@ -0,0 +1,101 @@
1/*
2 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include "ericgebhart.h"
18#include "layouts.h"
19
20
21const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
22 // Qwerty based Base layers
23 [_DVORAK] = Rebound_base(___DVORAK___),
24 [_BEAKL] = Rebound_base(___BEAKL15___),
25 [_COLEMAK] = Rebound_base(___COLEMAK_DH___),
26 [_QWERTY] = Rebound_base(___QWERTY___),
27
28 // Bepo base layers
29 [_BEAKL_BP] = Rebound_base_bepo(___BEAKL15_FR___),
30 [_DVORAK_BP] = Rebound_base_bepo(___DVORAK_FR___),
31 [_BEPO] = Rebound_base_bepo6(___BEPO6___),
32
33 // Transient layers.
34 [_SYMB] = Rebound_transient(___SYMB_BEAKLA_3x12___),
35 [_SYMB_BP] = Rebound_transient(___SYMB_BEAKLA_BP_3x12___),
36
37 [_KEYPAD] = Rebound_transient(___KP_C_3x12___),
38 [_KEYPAD_BP] = Rebound_transient(___KP_C_BP_3x12___),
39
40 [_TOPROWS] = Rebound_transient(___TOPROWS_3x12___),
41 [_TOPROWS_BP] = Rebound_transient(___TOPROWS_BP_3x12___),
42 [_NAV] = Rebound_transient(___NAV_3x12___),
43 [_LAYERS] = Rebound_transient(___LAYERS_3x12___),
44};
45
46
47bool encoder_update_user(uint8_t index, bool clockwise) {
48 switch(get_highest_layer(layer_state)){
49 case _DVORAK:
50 if (clockwise) {
51 tap_code16(KC_VOLD);
52 } else {
53 tap_code16(KC_VOLU);
54 }
55 break;
56
57 case _NAV:
58 if (clockwise) {
59 tap_code16(S(KC_TAB));
60 } else {
61 tap_code16(KC_TAB);
62 }
63 break;
64 }
65 return true;
66}
67
68#ifdef OLED_ENABLE
69void oled_task_user(void) {
70 // Host Keyboard Layer Status
71 oled_write_P(PSTR(""), false);
72
73 switch (get_highest_layer(layer_state)) {
74 case _BASE:
75 oled_write_P(PSTR("Rebound\n"), false);
76 oled_write_P(PSTR("Rev4\n"), false);
77 break;
78 case _NAV:
79 oled_write_P(PSTR("Nav\n"), false);
80 break;
81 case _SYMB_BEAKL:
82 case _SYMB:
83 oled_write_P(PSTR("Symbols\n"), false);
84 break;
85 case _KEYPAD:
86 oled_write_P(PSTR("Top Rows\n"), false);
87 break;
88 default:
89 // Or use the write_ln shortcut over adding '\n' to the end of your string
90 oled_write_ln_P(PSTR("Undefined"), false);
91 }
92
93 // Host Keyboard LED Status
94 led_t led_state = host_keyboard_led_state();
95 oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
96 oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false);
97 oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
98
99}
100
101#endif
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/layouts.h b/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/layouts.h
new file mode 100644
index 000000000..f6b7fc151
--- /dev/null
+++ b/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/layouts.h
@@ -0,0 +1,113 @@
1/*
2 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18/********************************************************************/
19/* Rebound 4 rows, 1x12, 3x13 */
20/********************************************************************/
21
22#define LVARG_rebound(...) LAYOUT_all(__VA_ARGS__)
23#define LAYOUT_rebound_base( \
24 K01, K02, K03, K04, K05, \
25 K06, K07, K08, K09, K0A, \
26 K11, K12, K13, K14, K15, \
27 K16, K17, K18, K19, K1A, \
28 K21, K22, K23, K24, K25, \
29 K26, K27, K28, K29, K2A \
30 ) \
31 LVARG_rebound( \
32 ROW1_LEFT(K01, K02, K03, K04, K05), \
33 ROW1_RIGHT(K06, K07, K08, K09, K0A), \
34 \
35 ROW2_LEFT(K11, K12, K13, K14, K15), \
36 KC_CCCV, \
37 ROW2_RIGHT(K16, K17, K18, K19, K1A), \
38 \
39 ROW3_LEFT(K21, K22, K23, K24, K25), \
40 MO(_ADJUST), \
41 ROW3_RIGHT(K26, K27, K28, K29, K2A), \
42 ___13_BOTTOM___ \
43 )
44
45#define LAYOUT_rebound_base_bepo( \
46 K01, K02, K03, K04, K05, \
47 K06, K07, K08, K09, K0A, \
48 K11, K12, K13, K14, K15, \
49 K16, K17, K18, K19, K1A, \
50 K21, K22, K23, K24, K25, \
51 K26, K27, K28, K29, K2A \
52 ) \
53 LVARG_rebound( \
54 ROW1_LEFT_BP(K01, K02, K03, K04, K05), \
55 ROW1_RIGHT_BP(K06, K07, K08, K09, K0A), \
56 \
57 ROW2_LEFT_BP(K11, K12, K13, K14, K15), \
58 KC_CCCV, \
59 ROW2_RIGHT_BP(K16, K17, K18, K19, K1A), \
60 \
61 ROW3_LEFT_BP(K21, K22, K23, K24, K25), \
62 MO(_ADJUST), \
63 ROW3_RIGHT_BP(K26, K27, K28, K29, K2A), \
64 ___13_BOTTOM_BP___ \
65 )
66
67// Just for bepo because it's a 3x6 matrix on each side.
68// So 3 pairs of 6 keys, left and right.
69#define LAYOUT_rebound_base_bepo6( \
70 K01, K02, K03, K04, K05, K06, \
71 K07, K08, K09, K0A, K0B, K0C, \
72 K11, K12, K13, K14, K15, K16, \
73 K17, K18, K19, K1A, K1B, K1C, \
74 K21, K22, K23, K24, K25, K26, \
75 K27, K28, K29, K2A, K2B, K2C \
76 ) \
77 LVARG_rebound( \
78 ROW1_LEFT_BP6(K01, K02, K03, K04, K05, K06), \
79 ROW1_RIGHT_BP6(K07, K08, K09, K0A, K0B, K0C), \
80 \
81 ROW2_LEFT_BP6(K11, K12, K13, K14, K15, K16), \
82 KC_CCCV, \
83 ROW2_RIGHT_BP6(K17, K18, K19, K1A, K1B, K1C), \
84 \
85 ROW3_LEFT_BP6(K21, K22, K23, K24, K25, K26), \
86 MO(_ADJUST), \
87 ROW3_RIGHT_BP6(K27, K28, K29, K2A, K2B, K2C), \
88 ___13_BOTTOM_BP___ \
89 )
90
91#define LAYOUT_rebound_transient( \
92 K01, K02, K03, K04, K05, K06, \
93 K07, K08, K09, K0A, K0B, K0C, \
94 K11, K12, K13, K14, K15, K16, \
95 K17, K18, K19, K1A, K1B, K1C, \
96 K21, K22, K23, K24, K25, K26, \
97 K27, K28, K29, K2A, K2B, K2C \
98 ) \
99 LVARG_rebound( \
100 K01, K02, K03, K04, K05, K06, \
101 K07, K08, K09, K0A, K0B, K0C, \
102 K11, K12, K13, K14, K15, K16, \
103 ___, \
104 K17, K18, K19, K1A, K1B, K1C, \
105 K21, K22, K23, K24, K25, K26, \
106 ___, \
107 K27, K28, K29, K2A, K2B, K2C, \
108 ___, ___12___)
109
110#define Rebound_base(...) LAYOUT_rebound_base(__VA_ARGS__)
111#define Rebound_base_bepo(...) LAYOUT_rebound_base_bepo(__VA_ARGS__)
112#define Rebound_base_bepo6(...) LAYOUT_rebound_base_bepo6(__VA_ARGS__)
113#define Rebound_transient(...) LAYOUT_rebound_transient(__VA_ARGS__)
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/readme.md b/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/readme.md
new file mode 100644
index 000000000..3a4796859
--- /dev/null
+++ b/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/readme.md
@@ -0,0 +1,5 @@
1Overview
2========
3
4These are my keymaps. There isn't much here. Go take a look at my Userspace readme.
5That's where all the code is.
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/rules.mk b/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/rules.mk
new file mode 100644
index 000000000..cf27df39b
--- /dev/null
+++ b/keyboards/montsinger/rebound/rev4/keymaps/ericgebhart/rules.mk
@@ -0,0 +1,16 @@
1# Build Options
2# change yes to no to disable
3#
4BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
5MOUSEKEY_ENABLE = yes # Mouse keys
6EXTRAKEY_ENABLE = yes # Audio control and System control
7CONSOLE_ENABLE = no # Console for debug
8COMMAND_ENABLE = yes # Commands for debug and configuration
9NKRO_ENABLE = yes # Enable N-Key Rollover
10BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
11MIDI_ENABLE = no # MIDI controls
12AUDIO_ENABLE = no # Audio output
13UNICODE_ENABLE = no # Unicode
14RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
15SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
16TAP_DANCE_ENABLE = yes # Enable the tap dance feature.
diff --git a/keyboards/xiudi/xd75/keymaps/ericgebhart/keymap.c b/keyboards/xiudi/xd75/keymaps/ericgebhart/keymap.c
index 9661972bf..a500e4b68 100644
--- a/keyboards/xiudi/xd75/keymaps/ericgebhart/keymap.c
+++ b/keyboards/xiudi/xd75/keymaps/ericgebhart/keymap.c
@@ -20,136 +20,33 @@
20 20
21 21
22const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 22const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
23 // 4x10
24 [_DVORAK] = BASE_5x15(___NUMS___, ___DVORAK___),
25 [_QWERTY] = BASE_5x15(___NUMS___, ___QWERTY___),
26 [_COLEMAK] = BASE_5x15(___NUMS___, ___COLEMAK_DH___),
27 [_BEAKL] = BASE_5x15(___BKLNUMS___, ___BEAKL15___),
23 28
24 [DVORAK] = LAYOUT_ortho_5x15_wrapper( 29 //[_DVORAK_BP] = BASE_5x15_bepo(___DVORAK_FR___),
25 KC_GRV, ___ORTHO_15_N___, KC_EQL, 30 //[_BEAKL_BP] = BASE_5x15_bepo(___BEAKL15_FR___),
26 KC_LOCK, ___13_DVORAK_1___, KC_SLASH, 31
27 TAB_BKTAB, ___13_DVORAK_2___, KC_MINUS, 32 // 4x12
28 KC_LSFT, ___13_DVORAK_3___, KC_RSFT, 33 //[_BEPO] = BASE_5x15_bepo6(___BEPO6_FR___),
29 ___ORTHO_15_BOTTOM___ 34
30 ), 35 // transient macro takes a 4x12 for args
31 36 [_SYMB] = TRANSIENT_5x15(___12___, ___SYMB_BEAKLA_3x12___),
32 [QWERTY] = LAYOUT_ortho_5x15_wrapper( 37 //[_SYMB_BP] = TRANSIENT_5x15(___12___, ___SYMB_BEAKLA_BP_3x12___),
33 KC_GRV, ___ORTHO_15_N___, KC_EQL, 38
34 KC_LOCK, ___13_QWERTY_1___, KC_SLASH, 39 [_TOPROWS] = TRANSIENT_5x15(___12___, ___TOPROWS_3x12___),
35 TAB_BKTAB, ___13_QWERTY_2___, KC_MINUS, 40 //[_TOPROWS_BP] = TRANSIENT_5x15(___12___, ___TOPROWS_BP_3x12___),
36 KC_LSFT, ___13_QWERTY_3___, KC_RSFT, 41
37 ___ORTHO_15_BOTTOM___ 42 [_KEYPAD] = TRANSIENT_5x15(___12___, ___KP_C_3x12___),
38 ), 43 //[_KEYPAD_BP] = TRANSIENT_5x15(___12___, ___KP_C_BP_3x12___),
39 44
40 [COLEMAK] = LAYOUT_ortho_5x15_wrapper( 45 // Navigation and control
41 KC_GRV, ___ORTHO_15_N___, KC_EQL, 46 [_NAV] = TRANSIENT_5x15(___12___, ___NAV_3x12___),
42 KC_LOCK, ___13_COLEMAK_1___, KC_SLASH, 47 [_LAYERS] = TRANSIENT_5x15(___12___, ___LAYERS_3x12___),
43 TAB_BKTAB, ___13_COLEMAK_2___, KC_MINUS, 48 //[_RGB] = TRANSIENT_5x15(___12___, ___RGB_3x12___),
44 KC_LSFT, ___13_COLEMAK_3___, KC_RSFT, 49 [_ADJUST] = TRANSIENT_5x15(___12___, ___ADJUST_3x12___),
45 ___ORTHO_15_BOTTOM___
46 ),
47
48 [WORKMAN] = LAYOUT_ortho_5x15_wrapper(
49 KC_GRV, ___ORTHO_15_N___, KC_EQL,
50 KC_LOCK, ___13_WORKMAN_1___, KC_SLASH,
51 TAB_BKTAB, ___13_WORKMAN_2___, KC_MINUS,
52 KC_LSFT, ___13_WORKMAN_3___, KC_RSFT,
53 ___ORTHO_15_BOTTOM___
54 ),
55
56 [NORMAN] = LAYOUT_ortho_5x15_wrapper(
57 KC_GRV, ___ORTHO_15_N___, KC_EQL,
58 KC_LOCK, ___13_NORMAN_1___, KC_SLASH,
59 TAB_BKTAB, ___13_NORMAN_2___, KC_MINUS,
60 KC_LSFT, ___13_NORMAN_3___, KC_RSFT,
61 ___ORTHO_15_BOTTOM___
62 ),
63
64 [DVORAK_ON_BEPO] = LAYOUT_ortho_5x15_wrapper(
65 DB_GRV, ___ORTHO_15_B_N___, DB_EQL,
66 KC_LOCK, ___13_DVORAK_B_1___, DB_SLASH,
67 TAB_BKTAB, ___13_DVORAK_B_2___, DB_MINUS,
68 KC_LSFT, ___13_DVORAK_B_3___, KC_RSFT,
69 ___ORTHO_15_BOTTOM_FR___
70 ),
71
72 [XMONAD] = LAYOUT_ortho_5x15_wrapper(
73 ___ORTHO_15_FUNC_1_12___,
74 ___, ___13_DVORAK_1___, ___,
75 ___, ___13_DVORAK_2___, ___,
76 ___, ___13_DVORAK_3___, ___,
77 ___15___
78 ),
79
80 [XMONAD_FR] = LAYOUT_ortho_5x15_wrapper(
81 ___ORTHO_15_FUNC_1_12___,
82 ___, ___13_DVORAK_B_1___, ___,
83 ___, ___13_DVORAK_B_2___, ___,
84 ___, ___13_DVORAK_B_3___, ___,
85 ___15___
86 ),
87
88 [BEPO] = LAYOUT_ortho_5x15_wrapper(
89 ___ORTHO_15_B_SYMB___,
90 KC_LOCK, ___13_BEPO_1___, BP_W,
91 TAB_BKTAB, ___13_BEPO_2___, BP_CCED,
92 BP_SFT_T_ECRC, ___13_BEPO_3___, BP_SFT_T_W,
93 ___ORTHO_15_BOTTOM_BP___
94 ),
95
96 // SYMBOLS
97 [SYMB] = LAYOUT_ortho_5x15_wrapper(
98 ___ORTHO_15_FUNC_1_12___,
99 ___15_SYMB_1___,
100 ___15_SYMB_2___,
101 ___15_SYMB_3___,
102 ___15_SYMB_4___
103 ),
104
105 [KEYPAD] = LAYOUT_ortho_5x15_wrapper(
106 ___ORTHO_15_FUNC_1_12___,
107 ___15_KP_1___,
108 ___15_KP_2___,
109 ___15_KP_3___,
110 ___15_KP_4___
111 ),
112
113 [KEYPAD_ON_BEPO] = LAYOUT_ortho_5x15_wrapper(
114 ___ORTHO_15_FUNC_1_12___,
115 ___15_KP_B_1___,
116 ___15_KP_B_2___,
117 ___15_KP_B_3___,
118 ___15_KP_B_4___
119 ),
120
121 [SYMB_ON_BEPO] = LAYOUT_ortho_5x15_wrapper(
122 ___ORTHO_15_FUNC_1_12___,
123 ___15_SYMB_B_1___,
124 ___15_SYMB_B_2___,
125 ___15_SYMB_B_3___,
126 ___15_SYMB_B_4___
127 ),
128
129 // MEDIA AND MOUSE
130 [MDIA] = LAYOUT_ortho_5x15_wrapper(
131 ___ORTHO_15_FUNC_1_12___,
132 ___15_MDIA_1___,
133 ___15_MDIA_2___,
134 ___15_MDIA_3___,
135 ___15_MDIA_4___
136 ),
137
138 [LAYERS] = LAYOUT_ortho_5x15_wrapper(
139 ___ORTHO_15_FUNC_1_12___,
140 ___15_LAYERS_1___,
141 ___15_LAYERS_2___,
142 ___15_LAYERS_3___,
143 ___15___
144 ),
145
146 [_RGB] = LAYOUT_ortho_5x15_wrapper(
147 ___ORTHO_15_FUNC_1_12___,
148 ___15_RGB_1___,
149 ___15_RGB_2___,
150 ___15_RGB_3___,
151 ___15___
152 ),
153}; 50};
154 51
155 52
@@ -199,18 +96,18 @@ void keyboard_post_init_user(void) {
199 96
200layer_state_t layer_state_set_user(layer_state_t state) { 97layer_state_t layer_state_set_user(layer_state_t state) {
201 // rgblight_set_layer_state(0, !on_qwerty()); 98 // rgblight_set_layer_state(0, !on_qwerty());
202 rgblight_set_layer_state(0, layer_state_cmp(state, DVORAK)); 99 rgblight_set_layer_state(0, layer_state_cmp(state, _DVORAK));
203 100
204 rgblight_set_layer_state(1, layer_state_cmp(state, BEPO)); 101 rgblight_set_layer_state(1, layer_state_cmp(state, _BEPO));
205 rgblight_set_layer_state(2, layer_state_cmp(state, DVORAK)); 102 rgblight_set_layer_state(2, layer_state_cmp(state, _DVORAK));
206 //|| layer_state_cmp(state, DVORAK_ON_BEPO))); 103 //|| layer_state_cmp(state, DVORAK_ON_BEPO)));
207 rgblight_set_layer_state(3, layer_state_cmp(state, MDIA)); 104 rgblight_set_layer_state(3, layer_state_cmp(state, _NAV));
208 rgblight_set_layer_state(4, layer_state_cmp(state, SYMB) ); 105 rgblight_set_layer_state(4, layer_state_cmp(state, _SYMB) );
209 106
210 //(layer_state_cmp(state, SYMB) || (layer_state_cmp(state, SYMB_ON_BEPO)))); 107 //(layer_state_cmp(state, SYMB) || (layer_state_cmp(state, SYMB_ON_BEPO))));
211 rgblight_set_layer_state(5, layer_state_cmp(state, KEYPAD) ); 108 rgblight_set_layer_state(5, layer_state_cmp(state, _KEYPAD) );
212 ///(layer_state_cmp(state, KEYPAD) || (layer_state_cmp(state, KEYPAD_ON_BEPO)))); 109 ///(layer_state_cmp(state, KEYPAD) || (layer_state_cmp(state, KEYPAD_ON_BEPO))));
213 rgblight_set_layer_state(6, layer_state_cmp(state, LAYERS)); 110 rgblight_set_layer_state(6, layer_state_cmp(state, _LAYERS));
214 rgblight_set_layer_state(7, layer_state_cmp(state, _RGB)); 111 rgblight_set_layer_state(7, layer_state_cmp(state, _RGB));
215 return state; 112 return state;
216} 113}
diff --git a/users/ericgebhart/altlocal_keys.c b/users/ericgebhart/altlocal_keys.c
new file mode 100755
index 000000000..285041b41
--- /dev/null
+++ b/users/ericgebhart/altlocal_keys.c
@@ -0,0 +1,94 @@
1/*
2 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include "ericgebhart.h"
19#include "altlocal_keys.h"
20
21#include "keymap_bepo.h"
22
23// These are the keys for dvorak on bepo. column one is the keycode and mods for
24// the unshifted key, the second column is the keycode and mods for the shifted key.
25// GR is Good Range. It subtracts SAFE_RANGE from the keycode so we can make a
26// reasnably sized array without difficulties. The macro is for the constant declarations
27// the function is for when we use it.
28const uint16_t key_translations[][2][2] = {
29 [GR(DB_1)] = {{BP_DQUO, MOD_LSFT}, {BP_DCIR, MOD_LSFT}},
30 [GR(DB_2)] = {{BP_LDAQ, MOD_LSFT}, {BP_AT, MOD_NONE}},
31 [GR(DB_3)] = {{BP_RDAQ, MOD_LSFT}, {BP_DLR, MOD_LSFT}},
32 [GR(DB_4)] = {{BP_LPRN, MOD_LSFT}, {BP_DLR, MOD_NONE}},
33 [GR(DB_5)] = {{BP_RPRN, MOD_LSFT}, {BP_PERC, MOD_NONE}},
34 [GR(DB_6)] = {{BP_AT, MOD_LSFT}, {BP_AT, MOD_BIT(KC_RALT)}},
35 [GR(DB_7)] = {{BP_PLUS, MOD_LSFT}, {BP_P, MOD_BIT(KC_RALT)}},
36 [GR(DB_8)] = {{BP_MINS, MOD_LSFT}, {BP_ASTR, MOD_NONE}},
37 [GR(DB_9)] = {{BP_SLSH, MOD_LSFT}, {BP_LPRN, MOD_NONE}},
38 [GR(DB_0)] = {{BP_ASTR, MOD_LSFT}, {BP_RPRN, MOD_NONE}},
39 [GR(DB_GRV)] = {{BP_PERC, MOD_LSFT}, {BP_K, MOD_BIT(KC_RALT)}},
40 [GR(DB_SCOLON)] = {{BP_COMM, MOD_LSFT}, {BP_DOT, MOD_LSFT}},
41 [GR(DB_SLASH)] = {{BP_SLSH, MOD_NONE}, {BP_QUOT, MOD_LSFT}},
42 [GR(DB_BACKSLASH)] = {{BP_AGRV, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}},
43 [GR(DB_EQL)] = {{BP_EQL, MOD_NONE}, {BP_PLUS, MOD_NONE}},
44 [GR(DB_COMM)] = {{BP_COMM, MOD_NONE}, {BP_LDAQ, MOD_BIT(KC_RALT)}},
45 [GR(DB_DOT)] = {{BP_DOT, MOD_NONE}, {BP_RDAQ, MOD_BIT(KC_RALT)}},
46 [GR(DB_QUOT)] = {{BP_QUOT, MOD_NONE}, {BP_DQUO, MOD_NONE}},
47 [GR(DB_MINUS)] = {{BP_MINS, MOD_NONE}, {KC_SPC, MOD_BIT(KC_RALT)}},
48 [GR(DB_LPRN)] = {{BP_LPRN, MOD_NONE}, {BP_LPRN, MOD_BIT(KC_RALT)}},
49 [GR(DB_RPRN)] = {{BP_RPRN, MOD_NONE}, {BP_RPRN, MOD_BIT(KC_RALT)}},
50 [GR(DB_LBRC)] = {{BP_Y, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}},
51 [GR(DB_RBRC)] = {{BP_X, MOD_BIT(KC_RALT)}, {BP_RPRN, MOD_BIT(KC_RALT)}},
52 // For the symbol layer
53 [GR(DB_HASH)] = {{BP_DLR, MOD_LSFT}, {BP_DLR, MOD_LSFT}},
54 [GR(DB_LCBR)] = {{BP_LPRN, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}},
55 [GR(DB_RCBR)] = {{BP_LPRN, MOD_BIT(KC_RALT)}, {BP_RPRN, MOD_BIT(KC_RALT)}},
56 [GR(DB_PIPE)] = {{BP_B, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}},
57 [GR(DB_TILD)] = {{BP_K, MOD_BIT(KC_RALT)}, {BP_K, MOD_BIT(KC_RALT)}},
58 [GR(DB_CIRC)] = {{BP_AT, MOD_BIT(KC_RALT)}, {BP_AT, MOD_BIT(KC_RALT)}},
59 [GR(DB_LESS)] = {{BP_LDAQ, MOD_BIT(KC_RALT)}, {BP_LDAQ, MOD_BIT(KC_RALT)}},
60 [GR(DB_GRTR)] = {{BP_RDAQ, MOD_BIT(KC_RALT)}, {BP_RDAQ, MOD_BIT(KC_RALT)}},
61 // Keys for BEAKL on Qwerty
62 [GR(BQ_COMM)] = {{KC_COMMA, MOD_NONE}, {KC_1, MOD_LSFT}},
63 [GR(BQ_DOT)] = {{KC_DOT, MOD_NONE}, {KC_2, MOD_LSFT}},
64 [GR(BQ_QUOT)] = {{KC_QUOT, MOD_NONE}, {KC_GRV, MOD_NONE}},
65};
66
67
68uint8_t gr(uint16_t kc){
69 return (kc - SAFE_RANGE);
70}
71// send the right keycode for the right mod.
72// remove the mods we are taking care of,
73// send our keycodes then restore them.
74// all so we can make dvorak keys from bepo keycodes.
75void send_keycode(uint16_t kc){
76 uint8_t tmp_mods = get_mods();
77 bool is_shifted = ( tmp_mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) );
78 //uint8_t key[2][2] = key_translations[GR(kc)];
79 // need to turn of the shift if it is on.
80 unregister_mods((MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)));
81 if(is_shifted){
82 register_mods(SHIFTED_MODS(kc));
83 register_code(SHIFTED_KEY(kc));
84 unregister_code(SHIFTED_KEY(kc));
85 unregister_mods(SHIFTED_MODS(kc));
86 } else{
87 register_mods(UNSHIFTED_MODS(kc));
88 register_code(UNSHIFTED_KEY(kc));
89 unregister_code(UNSHIFTED_KEY(kc));
90 unregister_mods(UNSHIFTED_MODS(kc));
91 }
92 clear_mods();
93 register_mods(tmp_mods);
94}
diff --git a/users/ericgebhart/altlocal_keys.h b/users/ericgebhart/altlocal_keys.h
new file mode 100644
index 000000000..b7fa977b9
--- /dev/null
+++ b/users/ericgebhart/altlocal_keys.h
@@ -0,0 +1,36 @@
1#pragma once
2/*
3 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19// for the creation of dvorak keys on an Bepo keyboard at the OS layer.
20// so we can create an array of reasonable size
21// for our translation keys. We have to create a
22// good range of numbers
23#define GR(x) (x-SAFE_RANGE)
24
25// void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); };
26
27uint8_t gr(uint16_t);
28void send_keycode(uint16_t);
29
30#define MOD_NONE 0x00
31
32// indexs for the keycode translation table.
33#define UNSHIFTED_KEY(key) key_translations[gr(key)][0][0]
34#define UNSHIFTED_MODS(key) key_translations[gr(key)][0][1]
35#define SHIFTED_KEY(key) key_translations[gr(key)][1][0]
36#define SHIFTED_MODS(key) key_translations[gr(key)][1][1]
diff --git a/users/ericgebhart/base_layers.h b/users/ericgebhart/base_layers.h
deleted file mode 100644
index fd88a40ae..000000000
--- a/users/ericgebhart/base_layers.h
+++ /dev/null
@@ -1,283 +0,0 @@
1#pragma once
2/*
3 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#include "core_keysets.h"
20
21/******************************************************************/
22/* These are the keys for the middle and bottom edge of any layout*/
23/* That way we only need to set them once and use them everywhere */
24/* The thumb keys, the bottom rows, etc. */
25/******************************************************************/
26/******************************************************************/
27/* Middle Keysets for the XD75 */
28/******************************************************************/
29
30// For the middle keys of an xd75. It's got one more column in the middle than
31// the ergodox, or the viterbi. And the Ergodox is missing a key in column 7
32// counting from either end. Which is the first and 3rd columns of these sets.
33
34// it's all an experient. I'm not sure what make sense here.
35// stealing what I can from the ergodox layout.
36/* The XD75 has 3 keys inbetween the usual left and right hand */
37#define ___ORTHO_15_MIDDLE_T___ OSL(LAYERS), LCTL(KC_A), MDIA_SYMB_KP_LAYERS
38#define ___ORTHO_15_MIDDLE_1___ LCTL(KC_C), LCTL(KC_X), LCTL(KC_V)
39#define ___ORTHO_15_MIDDLE_2___ TO(SYMB), TO(_RGB), TO(KEYPAD)
40#define ___ORTHO_15_MIDDLE_3___ OSL(SYMB), TO(MDIA), OSL(KEYPAD)
41#define ___ORTHO_15_MIDDLE_4___ CTL_BSPC, ALT_DEL, XMONAD_ESC, ALT_ENT, CTL_SPC
42
43// The same, for BEPO
44#define ___ORTHO_15_MIDDLE_T_BP___ OSL(LAYERS), LCTL(BP_A), MDIA_SYMB_KP_LAYERS
45#define ___ORTHO_15_MIDDLE_1_BP___ LCTL(BP_C), LCTL(BP_X), LCTL(BP_V)
46#define ___ORTHO_15_MIDDLE_2_BP___ TO(SYMB_ON_BEPO), TO(_RGB), TO(KEYPAD_ON_BEPO)
47#define ___ORTHO_15_MIDDLE_3_BP___ OSL(SYMB_ON_BEPO), TO(MDIA), OSL(KEYPAD_ON_BEPO)
48
49// The Viterbi only has 2 keys in the middle.
50#define ___ORTHO_14_MIDDLE_T___ OSL(LAYERS), MDIA_SYMB_KP_LAYERS
51#define ___ORTHO_14_MIDDLE_1___ LCTL(KC_C), LCTL(KC_V)
52#define ___ORTHO_14_MIDDLE_2___ TO(SYMB), TO(KEYPAD)
53#define ___ORTHO_14_MIDDLE_3___ OSL(SYMB), OSL(KEYPAD)
54
55// becomes the upper thumbs, the real 4th row if we throw away
56// the number row at the top
57#define ___ORTHO_14_MIDDLE_4___ LSFT(KC_TAB), HOME_END, KC_PGDN, KC_TAB
58// basically the thumb keys like on the ergodox.
59#define ___MIDDLE_THUMBS___ CTL_BSPC, ALT_DEL, XMONAD_ESC, KC_PGDN, ALT_ENT, CTL_SPC
60
61// The same, for BEPO
62#define ___ORTHO_14_MIDDLE_T_BP___ OSL(LAYERS), MDIA_SYMB_KP_LAYERS
63#define ___ORTHO_14_MIDDLE_1_BP___ LCTL(BP_C), LCTL(BP_V)
64#define ___ORTHO_14_MIDDLE_2_BP___ TO(SYMB_ON_BEPO), TO(KEYPAD_ON_BEPO)
65#define ___ORTHO_14_MIDDLE_3_BP___ OSL(SYMB_ON_BEPO), OSL(KEYPAD_ON_BEPO)
66
67#define ___ORTHO_14_MIDDLE_4_BP___ LSFT(KC_TAB), HOME_END, KC_PGUP, KC_TAB
68
69
70/********************************************************************/
71/** The top rows for numbers, symbols and Fkeys. **/
72/********************************************************************/
73#define ___ORTHO_15_N___ ___NUMBER_L___, ___ORTHO_15_MIDDLE_T___, ___NUMBER_R___
74#define ___ORTHO_15_B_N___ ___NUMBER_BEPO_L___, ___ORTHO_15_MIDDLE_T_BP___, ___NUMBER_BEPO_R___
75// the full bepo symbol row.
76#define ___ORTHO_15_B_SYMB___ BP_DLR, ___SYMBOL_BEPO_L___, ___ORTHO_15_MIDDLE_T_BP___, ___SYMBOL_BEPO_R___, BP_EQL
77
78// transparent in the middle because I only put this on transient layers.
79#define ___ORTHO_15_FUNC_1_12___ ___FUNC_1_6___, ___3___, ___FUNC_7_12___
80
81
82/********************************************************************/
83/** The bottom row and thumbs as needed. **/
84/********************************************************************/
85#define ___BOTTOM_LEFT___ LCTL(KC_C), LCTL(KC_V), KC_INS, KC_LEFT, KC_RIGHT
86#define ___BOTTOM_RIGHT___ KC_UP, KC_DOWN, KC_BSLASH, LCTL(KC_V), LCTL(KC_C)
87
88// the bottom rows for keyboards on bepo.
89// bepo on bepo - not enough space to go around....
90#define ___BOTTOM_LEFT_BP___ LCTL(BP_C), BP_ECIR, LCTL(BP_V), KC_LEFT, KC_RIGHT
91#define ___BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED, BP_PERC
92
93// for dvorak on bepo
94#define ___BOTTOM_LEFT_FR___ LCTL(BP_C), LCTL(BP_C), LCTL(BP_V), KC_LEFT, KC_RIGHT
95#define ___BOTTOM_RIGHT_FR___ KC_UP, KC_DOWN, DB_BACKSLASH, LCTL(KC_V), LCTL(KC_C)
96
97#define ___ORTHO_15_BOTTOM___ ___BOTTOM_LEFT___, ___ORTHO_15_MIDDLE_4___, ___BOTTOM_RIGHT___
98#define ___ORTHO_15_BOTTOM_FR___ ___BOTTOM_LEFT_FR___, ___ORTHO_15_MIDDLE_4___, ___BOTTOM_RIGHT_FR___
99#define ___ORTHO_15_BOTTOM_BP___ ___BOTTOM_LEFT_BP___, ___ORTHO_15_MIDDLE_4___, ___BOTTOM_RIGHT_BP___
100
101#define ___ORTHO_14_BOTTOM___ ___BOTTOM_LEFT___, ___ORTHO_14_MIDDLE_4___, ___BOTTOM_RIGHT___
102#define ___ORTHO_14_BOTTOM_FR___ ___BOTTOM_LEFT_FR___, ___ORTHO_14_MIDDLE_4___, ___BOTTOM_RIGHT_FR___
103#define ___ORTHO_14_BOTTOM_BP___ ___BOTTOM_LEFT_BP___, ___ORTHO_14_MIDDLE_4___, ___BOTTOM_RIGHT_BP___
104#define ___ORTHO_14_THUMBS_BOTTOM___ ___4___, ___MIDDLE_THUMBS___, ___4___
105
106
107#define ___ERGODOX_THUMB_LEFT___ \
108 OSL(SYMB), OSM(KC_LGUI), \
109 HOME_END, \
110 CTL_BSPC, ALT_DEL, XMONAD_ESC
111
112#define ___ERGODOX_THUMB_RIGHT___ \
113 XXX, OSL(KEYPAD), \
114 KC_PGUP, \
115 KC_PGDN, ALT_ENT, CTL_SPC
116
117#define ___ERGODOX_THUMB_RIGHT_BP___ \
118 XXX, OSL(KEYPAD_ON_BEPO), \
119 KC_PGUP, \
120 KC_PGDN, ALT_ENT, CTL_SPC
121
122#define ___ERGODOX_THUMB_LEFT_BP___ \
123 OSL(SYMB_ON_BEPO), OSM(KC_LGUI), \
124 HOME_END, \
125 CTL_BSPC, ALT_DEL, XMONAD_ESC
126
127/********************************************************************************/
128/* the interior rows for ortholinear keyboards. the first number is the length */
129/* So you can put what you want on the outside ends, make new middles as needed */
130/* It would be nice to make this a little more dynamic. There is little */
131/* differenc between them. */
132/********************************************************************************/
133
134//// ortho15 core rows. used with my xd75.
135/***********************************************************/
136/* ORTHO15 interior rows. used with my xd75 */
137/***********************************************************/
138#define ___13_DVORAK_1___ ___DVORAK_L1___, ___ORTHO_15_MIDDLE_1___, ___DVORAK_R1___
139#define ___13_DVORAK_2___ ___DVORAK_L2___, ___ORTHO_15_MIDDLE_2___, ___DVORAK_R2___
140#define ___13_DVORAK_3___ ___DVORAK_L3___, ___ORTHO_15_MIDDLE_3___, ___DVORAK_R3___
141
142#define ___13_QWERTY_1___ ___QWERTY_L1___, ___ORTHO_15_MIDDLE_1___, ___QWERTY_R1___
143#define ___13_QWERTY_2___ ___QWERTY_L2___, ___ORTHO_15_MIDDLE_2___, ___QWERTY_R2___
144#define ___13_QWERTY_3___ ___QWERTY_L3___, ___ORTHO_15_MIDDLE_3___, ___QWERTY_R3___
145
146#define ___13_COLEMAK_1___ ___COLEMAK_L1___, ___ORTHO_15_MIDDLE_1___, ___COLEMAK_R1___
147#define ___13_COLEMAK_2___ ___COLEMAK_L2___, ___ORTHO_15_MIDDLE_2___, ___COLEMAK_R2___
148#define ___13_COLEMAK_3___ ___COLEMAK_L3___, ___ORTHO_15_MIDDLE_3___, ___COLEMAK_R3___
149
150#define ___13_WORKMAN_1___ ___WORKMAN_L1___, ___ORTHO_15_MIDDLE_1___, ___WORKMAN_R1___
151#define ___13_WORKMAN_2___ ___WORKMAN_L2___, ___ORTHO_15_MIDDLE_2___, ___WORKMAN_R2___
152#define ___13_WORKMAN_3___ ___WORKMAN_L3___, ___ORTHO_15_MIDDLE_3___, ___WORKMAN_R3___
153
154#define ___13_NORMAN_1___ ___NORMAN_L1___, ___ORTHO_15_MIDDLE_1___, ___NORMAN_R1___
155#define ___13_NORMAN_2___ ___NORMAN_L2___, ___ORTHO_15_MIDDLE_2___, ___NORMAN_R2___
156#define ___13_NORMAN_3___ ___NORMAN_L3___, ___ORTHO_15_MIDDLE_3___, ___NORMAN_R3___
157
158#define ___13_DVORAK_B_1___ ___DVORAK_FR_L1___, ___ORTHO_15_MIDDLE_1_BP___, ___DVORAK_FR_R1___
159#define ___13_DVORAK_B_2___ ___DVORAK_FR_L2___, ___ORTHO_15_MIDDLE_2_BP___, ___DVORAK_FR_R2___
160#define ___13_DVORAK_B_3___ ___DVORAK_FR_L3___, ___ORTHO_15_MIDDLE_3_BP___, ___DVORAK_FR_R3___
161
162#define ___13_BEPO_1___ ___BEPO_FR_L1___, ___ORTHO_15_MIDDLE_1_BP___, ___BEPO_FR_R1___
163#define ___13_BEPO_2___ ___BEPO_FR_L2___, ___ORTHO_15_MIDDLE_2_BP___, ___BEPO_FR_R2___
164#define ___13_BEPO_3___ ___BEPO_FR_L3___, ___ORTHO_15_MIDDLE_3_BP___, ___BEPO_FR_R3___
165
166// transparent xmonad/dvorak layer
167#define ___15_XMONAD_1___ ___, ___DVORAK_L1___, ___3___, ___DVORAK_R1___, ___
168#define ___15_XMONAD_2___ ___, ___DVORAK_L2___, ___3___, ___DVORAK_R2___, ___
169#define ___15_XMONAD_3___ ___, ___DVORAK_L3___, ___3___, ___DVORAK_R3___, ___
170
171// transparent xmonad/dvorak layer in bepo
172#define ___15_XMONAD_B_1___ ___, ___DVORAK_FR_L1___, ___3___, ___DVORAK_FR_R1___, ___
173#define ___15_XMONAD_B_2___ ___, ___DVORAK_FR_L2___, ___3___, ___DVORAK_FR_R2___, ___
174#define ___15_XMONAD_B_3___ ___, ___DVORAK_FR_L3___, ___3___, ___DVORAK_FR_R3___, ___
175
176#define ___15_SYMB_1___ ___SYMBOLS6_1___, ___3___, ___SYMPAD_1___
177#define ___15_SYMB_2___ ___SYMBOLS6_2___, ___3___, ___SYMPAD_2___
178#define ___15_SYMB_3___ ___SYMBOLS6_3___, ___3___, ___SYMPAD_3___
179#define ___15_SYMB_4___ ___SYMBOLS6_4___, ___3___, ___SYMPAD_4___
180
181#define ___15_KP_1___ ___2___, ___FUNCPAD_T___, ___5___, ___KEYPAD_1___, ___
182#define ___15_KP_2___ ___2___, ___FUNCPAD_1___, ___5___, ___KEYPAD_2___, ___
183#define ___15_KP_3___ ___2___, ___FUNCPAD_2___, ___5___, ___KEYPAD_3___, KC_PENT
184#define ___15_KP_4___ ___2___, ___FUNCPAD_3___, ___5___, ___KEYPAD_4___, ___
185
186#define ___15_KP_B_1___ ___2___, ___FUNCPAD_T___, ___5___, ___KEYPAD_1_BP___, ___
187#define ___15_KP_B_2___ ___2___, ___FUNCPAD_1___, ___5___, ___KEYPAD_2_BP___, ___
188#define ___15_KP_B_3___ ___2___, ___FUNCPAD_2___, ___5___, ___KEYPAD_3_BP___, KC_PENT
189#define ___15_KP_B_4___ ___2___, ___FUNCPAD_3___, ___5___, ___KEYPAD_4_BP___, ___
190
191#define ___15_SYMB_B_1___ ___SYMBOLS6_1_BP___, ___3___, ___SYMPAD_1_BP___
192#define ___15_SYMB_B_2___ ___SYMBOLS6_2_BP___, ___3___, ___SYMPAD_2_BP___
193#define ___15_SYMB_B_3___ ___SYMBOLS6_3_BP___, ___3___, ___SYMPAD_3_BP___
194#define ___15_SYMB_B_4___ ___SYMBOLS6_4_BP___, ___3___, ___SYMPAD_4_BP___
195
196#define ___15_MDIA_1___ ___MOUSE_BTNS_L___, ___4___, KC_VOLU, ___MUTE_PRV_PLAY_NXT_STOP___
197#define ___15_MDIA_2___ ___, ___MOUSE_LDUR___, ___4___, KC_VOLD, ___VI_ARROWS___, ___
198#define ___15_MDIA_3___ ___, ___MWHEEL_LDUR___, ___4___, KC_PGUP, ___MOUSE_BTNS_R___
199#define ___15_MDIA_4___ ___2___, ___MACCL___, ___4___, KC_PGDN, ___5___
200
201#define ___15_LAYERS_1___ ___X3___, ___2_LAYERS_B1___, ___5___, ___3_LAYERS_T_BP___, ___X2___
202#define ___15_LAYERS_2___ ___X3___, ___2_LAYERS_B2___, ___5___, ___3_LAYERS_T___, ___X2___
203#define ___15_LAYERS_3___ ___X2___, ___3_LAYERS_B3___, ___5___, ___3_LAYERS_T_CTL___, ___X2___
204
205#define ___15_RGB_1___ ___, ___RGB_HUE_SAT_INT_UP___, ___5___, ___5___
206#define ___15_RGB_2___ ___, ___RGB_HUE_SAT_INT_DN___, RGB_TOG, ___4___, ___RGB_P_B_R_SW_SN___
207#define ___15_RGB_3___ ___5___, ___5___, ___RGB_KXGT___, ___
208
209
210
211/***********************************************************/
212/* ORTHO14 base layer interior rows. used with my viterbi */
213/***********************************************************/
214#define ___12_DVORAK_1___ ___DVORAK_L1___, ___ORTHO_14_MIDDLE_1___, ___DVORAK_R1___
215#define ___12_DVORAK_2___ ___DVORAK_L2___, ___ORTHO_14_MIDDLE_2___, ___DVORAK_R2___
216#define ___12_DVORAK_3___ ___DVORAK_L3___, ___ORTHO_14_MIDDLE_3___, ___DVORAK_R3___
217
218#define ___12_QWERTY_1___ ___QWERTY_L1___, ___ORTHO_14_MIDDLE_1___, ___QWERTY_R1___
219#define ___12_QWERTY_2___ ___QWERTY_L2___, ___ORTHO_14_MIDDLE_2___, ___QWERTY_R2___
220#define ___12_QWERTY_3___ ___QWERTY_L3___, ___ORTHO_14_MIDDLE_3___, ___QWERTY_R3___
221
222#define ___12_COLEMAK_1___ ___COLEMAK_L1___, ___ORTHO_14_MIDDLE_1___, ___COLEMAK_R1___
223#define ___12_COLEMAK_2___ ___COLEMAK_L2___, ___ORTHO_14_MIDDLE_2___, ___COLEMAK_R2___
224#define ___12_COLEMAK_3___ ___COLEMAK_L3___, ___ORTHO_14_MIDDLE_3___, ___COLEMAK_R3___
225
226#define ___12_WORKMAN_1___ ___WORKMAN_L1___, ___ORTHO_14_MIDDLE_1___, ___WORKMAN_R1___
227#define ___12_WORKMAN_2___ ___WORKMAN_L2___, ___ORTHO_14_MIDDLE_2___, ___WORKMAN_R2___
228#define ___12_WORKMAN_3___ ___WORKMAN_L3___, ___ORTHO_14_MIDDLE_3___, ___WORKMAN_R3___
229
230#define ___12_NORMAN_1___ ___NORMAN_L1___, ___ORTHO_14_MIDDLE_1___, ___NORMAN_R1___
231#define ___12_NORMAN_2___ ___NORMAN_L2___, ___ORTHO_14_MIDDLE_2___, ___NORMAN_R2___
232#define ___12_NORMAN_3___ ___NORMAN_L3___, ___ORTHO_14_MIDDLE_3___, ___NORMAN_R3___
233
234#define ___12_DVORAK_B_1___ ___DVORAK_FR_L1___, ___ORTHO_14_MIDDLE_1_BP___, ___DVORAK_FR_R1___
235#define ___12_DVORAK_B_2___ ___DVORAK_FR_L2___, ___ORTHO_14_MIDDLE_2_BP___, ___DVORAK_FR_R2___
236#define ___12_DVORAK_B_3___ ___DVORAK_FR_L3___, ___ORTHO_14_MIDDLE_3_BP___, ___DVORAK_FR_R3___
237
238#define ___12_BEPO_2___ ___BEPO_FR_L1___, ___ORTHO_14_MIDDLE_1_BP___, ___BEPO_FR_R1___
239#define ___12_BEPO_3___ ___BEPO_FR_L2___, ___ORTHO_14_MIDDLE_2_BP___, ___BEPO_FR_R2___
240#define ___12_BEPO_4___ ___BEPO_FR_L3___, ___ORTHO_14_MIDDLE_3_BP___, ___BEPO_FR_R3___
241
242
243// transparent layers.
244#define ___14_XMONAD_1___ ___, ___DVORAK_L1___, ___2___, ___DVORAK_R1___, ___
245#define ___14_XMONAD_2___ ___, ___DVORAK_L2___, ___2___, ___DVORAK_R2___, ___
246#define ___14_XMONAD_3___ ___, ___DVORAK_L3___, ___2___, ___DVORAK_R3___, ___
247
248#define ___14_XMONAD_B_1___ ___, ___DVORAK_FR_L1___, ___2___, ___DVORAK_FR_R1___, ___
249#define ___14_XMONAD_B_2___ ___, ___DVORAK_FR_L2___, ___2___, ___DVORAK_FR_R2___, ___
250#define ___14_XMONAD_B_3___ ___, ___DVORAK_FR_L3___, ___2___, ___DVORAK_FR_R3___, ___
251
252#define ___14_SYMB_1___ ___SYMBOLS6_1___, ___2___, ___SYMPAD_1___
253#define ___14_SYMB_2___ ___SYMBOLS6_2___, ___2___, ___SYMPAD_2___
254#define ___14_SYMB_3___ ___SYMBOLS6_3___, ___2___, ___SYMPAD_3___
255#define ___14_SYMB_4___ ___SYMBOLS6_4___, ___2___, ___SYMPAD_4___
256
257#define ___14_KP_1___ ___2___, ___FUNCPAD_T___, ___4___, ___KEYPAD_1___, ___
258#define ___14_KP_2___ ___2___, ___FUNCPAD_1___, ___4___, ___KEYPAD_2___, ___
259#define ___14_KP_3___ ___2___, ___FUNCPAD_2___, ___4___, ___KEYPAD_3___, KC_PENT
260#define ___14_KP_4___ ___2___, ___FUNCPAD_3___, ___4___, ___KEYPAD_4___, ___
261
262#define ___14_KP_B_1___ ___2___, ___FUNCPAD_T___, ___4___, ___KEYPAD_1_BP___, ___
263#define ___14_KP_B_2___ ___2___, ___FUNCPAD_1___, ___4___, ___KEYPAD_2_BP___, ___
264#define ___14_KP_B_3___ ___2___, ___FUNCPAD_2___, ___4___, ___KEYPAD_3_BP___, KC_PENT
265#define ___14_KP_B_4___ ___2___, ___FUNCPAD_3___, ___4___, ___KEYPAD_4_BP___, ___
266
267#define ___14_SYMB_B_1___ ___SYMBOLS6_1_BP___, ___2___, ___SYMPAD_1_BP___
268#define ___14_SYMB_B_2___ ___SYMBOLS6_2_BP___, ___2___, ___SYMPAD_2_BP___
269#define ___14_SYMB_B_3___ ___SYMBOLS6_3_BP___, ___2___, ___SYMPAD_3_BP___
270#define ___14_SYMB_B_4___ ___SYMBOLS6_4_BP___, ___2___, ___SYMPAD_4_BP___
271
272#define ___14_MDIA_1___ ___MOUSE_BTNS_L___, ___3___, KC_VOLU, ___MUTE_PRV_PLAY_NXT_STOP___
273#define ___14_MDIA_2___ ___, ___MOUSE_LDUR___, ___3___, KC_VOLD, ___VI_ARROWS___, ___
274#define ___14_MDIA_3___ ___, ___MWHEEL_LDUR___, ___3___, KC_PGUP, ___MOUSE_BTNS_R___
275#define ___14_MDIA_4___ ___2___, ___MACCL___, ___3___, KC_PGDN, ___5___
276
277#define ___14_LAYERS_1___ ___X3___, ___2_LAYERS_B1___, ___4___, ___3_LAYERS_T_BP___, ___X2___
278#define ___14_LAYERS_2___ ___X3___, ___2_LAYERS_B2___, ___4___, ___3_LAYERS_T___, ___X2___
279#define ___14_LAYERS_3___ ___X2___, ___3_LAYERS_B3___, ___4___, ___3_LAYERS_T_CTL___, ___X2___
280
281#define ___14_RGB_1___ ___, ___RGB_HUE_SAT_INT_UP___, ___4___, ___5___
282#define ___14_RGB_2___ ___, ___RGB_HUE_SAT_INT_DN___, RGB_TOG, ___3___, ___RGB_P_B_R_SW_SN___
283#define ___14_RGB_3___ ___5___, ___4___, ___RGB_KXGT___, ___
diff --git a/users/ericgebhart/caps_word.c b/users/ericgebhart/caps_word.c
new file mode 100644
index 000000000..ba81c15d6
--- /dev/null
+++ b/users/ericgebhart/caps_word.c
@@ -0,0 +1,81 @@
1// Copyright 2021 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15//
16// For full documentation, see
17// https://getreuer.info/posts/keyboards/caps-word
18
19#include "caps_word.h"
20
21bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
22 static bool caps_word_enabled = false;
23 static bool shifted = false;
24#ifndef NO_ACTION_ONESHOT
25 const uint8_t mods = get_mods() | get_oneshot_mods();
26#else
27 const uint8_t mods = get_mods();
28#endif // NO_ACTION_ONESHOT
29
30 if (!caps_word_enabled) {
31 // Pressing both shift keys at the same time enables caps word.
32 if ((mods & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) {
33 clear_mods();
34#ifndef NO_ACTION_ONESHOT
35 clear_oneshot_mods();
36#endif // NO_ACTION_ONESHOT
37 shifted = false;
38 caps_word_enabled = true;
39 return false;
40 }
41 return true;
42 }
43
44 if (!record->event.pressed) { return true; }
45
46 if (!(mods & ~MOD_MASK_SHIFT)) {
47 switch (keycode) {
48 case QK_MOD_TAP ... QK_MOD_TAP_MAX:
49 case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
50 // Earlier return if this has not been considered tapped yet.
51 if (record->tap.count == 0) { return true; }
52 // Get the base tapping keycode of a mod- or layer-tap key.
53 keycode &= 0xff;
54 }
55
56 switch (keycode) {
57 // Letter keys should be shifted.
58 case KC_A ... KC_Z:
59 if (!shifted) { register_code(KC_LSFT); }
60 shifted = true;
61 return true;
62
63 // Keycodes that continue caps word but shouldn't get shifted.
64 case KC_1 ... KC_0:
65 case KC_BSPC:
66 case KC_MINS:
67 case KC_UNDS:
68 if (shifted) { unregister_code(KC_LSFT); }
69 shifted = false;
70 return true;
71
72 // Any other keycode disables caps word.
73 }
74 }
75
76 // Disable caps word.
77 caps_word_enabled = false;
78 if (shifted) { unregister_code(KC_LSFT); }
79 shifted = false;
80 return true;
81}
diff --git a/users/ericgebhart/caps_word.h b/users/ericgebhart/caps_word.h
new file mode 100644
index 000000000..a59b2e433
--- /dev/null
+++ b/users/ericgebhart/caps_word.h
@@ -0,0 +1,35 @@
1// Copyright 2021 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15//
16// Caps Word, activated by pressing both shift keys at the same time.
17//
18// This library implements "Caps Word", which is like conventional Caps Lock,
19// but automatically disables itself at the end of the word. This is useful for
20// typing all-caps identifiers like `MOD_MASK_ALT`.
21//
22// Caps Word is activated by pressing the left and right shift keys at the same
23// time. This way you don't need a dedicated key for using Caps Word. I've
24// tested that this works as expected with one-shot mods and Space Cadet Shift.
25// If your shift keys are mod-taps, activate Caps Word by holding both shift
26// mod-tap keys until the tapping term, release them, then begin typing.
27//
28// For full documentation, see
29// https://getreuer.info/posts/keyboards/caps-word
30
31#pragma once
32
33#include QMK_KEYBOARD_H
34
35bool process_caps_word(uint16_t keycode, keyrecord_t* record);
diff --git a/users/ericgebhart/combos.def b/users/ericgebhart/combos.def
new file mode 100644
index 000000000..9b5f2c8a9
--- /dev/null
+++ b/users/ericgebhart/combos.def
@@ -0,0 +1,10 @@
1// name result chord keys
2COMB(LNAV, TG(_NAV), SPC_TOPR, ENT_NAV)
3COMB(OSLSYM, OSL(_SYMB), ESC_TOPR, BSPC_SYMB)
4COMB(OSLSYMBP, OSL(_SYMB_BP), ESC_TOPR_BP, BSPC_SYMB_BP)
5COMB(LKEYPAD, TG(_KEYPAD), SPC_TOPR, BSPC_SYMB)
6COMB(LKEYPADBP, TG(_KEYPAD_BP), SPC_TOPR_BP, BSPC_SYMB_BP)
7COMB(LLAYERS, OSL(_LAYERS), KC_TAB, ENT_NAV)
8
9//COMB(JKL_SPC, KC_SPC, KC_J, KC_X)
10//SUBS(TH_THE, "the", KC_T, KC_H) // SUBS uses SEND_STRING to output the given string.
diff --git a/users/ericgebhart/config.h b/users/ericgebhart/config.h
index 934c3debb..116d48f4a 100755
--- a/users/ericgebhart/config.h
+++ b/users/ericgebhart/config.h
@@ -1,8 +1,29 @@
1/*
2 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
1#ifndef USERSPACE_CONFIG_H 18#ifndef USERSPACE_CONFIG_H
2#define USERSPACE_CONFIG_H 19#define USERSPACE_CONFIG_H
3 20
4#include "../../config.h" 21#include "../../config.h"
5 22
23#define NO_ACTION_MACRO
24#define NO_ACTION_FUNCTION
25#define COMBO_MUST_HOLD_MODS
26#define COMBO_HOLD_TERM 150
6// Sets good default for the speed of the mouse. 27// Sets good default for the speed of the mouse.
7#undef MOUSEKEY_INTERVAL 28#undef MOUSEKEY_INTERVAL
8#undef MOUSEKEY_DELAY 29#undef MOUSEKEY_DELAY
@@ -26,7 +47,7 @@
26#undef TAPPING_TERM 47#undef TAPPING_TERM
27#undef IGNORE_MOD_TAP_INTERRUPT 48#undef IGNORE_MOD_TAP_INTERRUPT
28 49
29#define TAPPING_TOGGLE 1 50#define TAPPING_TOGGLE 2
30#define TAPPING_TERM 200 51#define TAPPING_TERM 200
31#define IGNORE_MOD_TAP_INTERRUPT 52#define IGNORE_MOD_TAP_INTERRUPT
32 53
diff --git a/users/ericgebhart/core_keys.h b/users/ericgebhart/core_keys.h
index a71d90574..73beaaf7a 100644..100755
--- a/users/ericgebhart/core_keys.h
+++ b/users/ericgebhart/core_keys.h
@@ -19,42 +19,13 @@
19#include "quantum.h" 19#include "quantum.h"
20#include "process_keycode/process_tap_dance.h" 20#include "process_keycode/process_tap_dance.h"
21#include "eeconfig.h" 21#include "eeconfig.h"
22#include "keymap_bepo.h"
23#include "altlocal_keys.h"
22 24
23//#define ONESHOT_TAP_TOGGLE 2 /* Tapping this number of times holds the key until tapped once again. */ 25//#define ONESHOT_TAP_TOGGLE 2 /* Tapping this number of times holds the key until tapped once again. */
24 26
25void tap(uint16_t keycode);
26bool process_record_secrets(uint16_t keycode, keyrecord_t *record); 27bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
27 28
28
29typedef union {
30 uint8_t raw;
31 struct {
32 bool clicky_enable :1;
33 bool rgb_layer_change :1;
34 bool is_overwatch :1;
35 bool nuke_switch :1;
36 };
37} userspace_config_t;
38
39
40// for the creation of dvorak keys on an Bepo keyboard at the OS layer.
41// so we can create an array of reasonable size
42// for our translation keys. We have to create a
43// good range of numbers
44#define GR(x) (x-SAFE_RANGE)
45
46uint8_t gr(uint8_t);
47void send_keycode(uint8_t);
48
49#define MOD_NONE 0x00
50
51// indexs for the keycode translation table.
52#define UNSHIFTED_KEY(key) key_translations[gr(key)][0][0]
53#define UNSHIFTED_MODS(key) key_translations[gr(key)][0][1]
54#define SHIFTED_KEY(key) key_translations[gr(key)][1][0]
55#define SHIFTED_MODS(key) key_translations[gr(key)][1][1]
56
57
58enum userspace_custom_keycodes { 29enum userspace_custom_keycodes {
59 // keep the keycodes using the send_key function close to SAFE_RANGE 30 // keep the keycodes using the send_key function close to SAFE_RANGE
60 // so the array of keycodes remains a reasonbale size. 31 // so the array of keycodes remains a reasonbale size.
@@ -91,37 +62,106 @@ enum userspace_custom_keycodes {
91 DB_LESS, 62 DB_LESS,
92 DB_GRTR, 63 DB_GRTR,
93 // End of dvorak on bepo translation keys. 64 // End of dvorak on bepo translation keys.
65 // BEAKL on Qwerty..
66 BQ_DOT,
67 BQ_COMM,
68 BQ_QUOT,
69 // End of beakl on qwerty
70 BB_DOT,
71 BB_COMM,
72 BB_QUOT,
73 // End of beakl on Bepo
94 74
95 EPRM, 75 EPRM,
96 VRSN, 76 VRSN,
97 KC_DVORAK_ON_BEPO, 77 // Default keyboard layouts - Same order as enum.
98 KC_BEPO, 78 KC_DVORAK,
99 KC_NORMAN,
100 KC_QWERTY, 79 KC_QWERTY,
101 KC_COLEMAK, 80 KC_COLEMAK,
102 KC_DVORAK, 81 KC_BEAKL,
103 KC_WORKMAN, 82 // KC_WORKMAN,
83 // KC_NORMAN,
84 // KC_MALTRON,
85 // KC_EUCALYN,
86 // KC_CARPLAX,
87 KC_DVORAK_BP,
88 KC_BEAKL_BP,
89 KC_BEPO,
90 KC_LAYERS,
91
92 // Misc.
104 KC_MAKE, 93 KC_MAKE,
105 KC_RESET, 94 KC_RESET,
106 KC_RGB_T, 95 KC_RGB_T,
96 RGB_IDL,
107 KC_SECRET_1, 97 KC_SECRET_1,
108 KC_SECRET_2, 98 KC_SECRET_2,
109 KC_SECRET_3, 99 KC_SECRET_3,
110 KC_SECRET_4, 100 KC_SECRET_4,
111 KC_SECRET_5, 101 KC_SECRET_5,
112 KC_CCCV 102 KC_CCCV, // Ctrl-C V in one key.
103 BP_CCCV,
104 KC_CTCN, // Ctrl-T N in one key.
105 BP_CTCN,
106 KC_CWCQ, // Ctrl-W Q in one key.
107 BP_CWCQ,
108 KC_XM_PORD, // Xmonad gui-e, gui-t for the scratchpads or desktops.
109 BP_XM_PORD,
110 KC_OCPRN, // Open, or open and close, cursor in the middle with hold.
111 BP_OCPRN,
112 KC_OCBRC,
113 BP_OCBRC,
114 KC_OCCBR,
115 BP_OCCBR,
116 KC_OCDQUO,
117 BP_OCDQUO,
118 KC_OCQUOT,
119 BP_OCQUOT,
120 KC_OCGRV,
121 BP_OCGRV,
122 KC_OCLTGT,
123 BP_OCLTGT,
124 UC_FLIP,
125 UC_TABL,
126 UC_SHRG,
127 UC_DISA,
128 KC_SPACETEST,
129 NEW_SAFE_RANGE
113}; 130};
114 131
115#define SFTGUI_T(kc) { MT(MOD_LGUI | MOD_LSFT, kc) } 132#define CTLGUI_T(kc) MT(MOD_LGUI | MOD_LCTL, kc)
116#define SFT_GUI_ESC MT(MOD_LSFT | MOD_LGUI, KC_PGDN) // shift LGUI or Escape. 133#define SFTGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc)
117#define ALT_ENT ALT_T(KC_ENT) // Alt or enter 134#define ALTGUI_T(kc) MT(MOD_LGUI | MOD_LALT, kc)
118#define CTL_SPC CTL_T(KC_SPC) // ctrl or space 135
119#define CTL_BSPC CTL_T(KC_BSPC) // ctrl or backspace 136#define ALT_ENT ALT_T(KC_ENT) // Alt or enter
120#define ALT_DEL ALT_T(KC_DEL) // Alt or delete 137#define CTL_SPC CTL_T(KC_SPC) // ctrl or space
121#define GUI_ESC GUI_T(KC_ESC) // Gui or escape 138#define CTL_BSPC CTL_T(KC_BSPC) // ctrl or backspace
122#define ALGR_SYMB ALGR_T(TG(SYMB)) // Alt gre or toggle symbol layer 139#define ALT_DEL ALT_T(KC_DEL) // Alt or delete
123 140#define GUI_ESC GUI_T(KC_ESC) // Gui or escape
124 141#define ALGR_SYMB ALGR_T(TG(_SYMB)) // Alt gre or toggle symbol layer
142
143#define ENT_NAV LT(_NAV, KC_ENT)
144#define ENT_TOPR LT(_TOPROWS, KC_ENT)
145#define ENT_TOPR_BP LT(_TOPROWS_BP, KC_ENT)
146#define ESC_TOPR LT(_TOPROWS, KC_ESC)
147#define ESC_TOPR_BP LT(_TOPROWS_BP, KC_ESC)
148#define ESC_SYMB LT(_SYMB, KC_ESC)
149#define ESC_SYMB_BP LT(_SYMB_BP, KC_ESC)
150#define SPC_NAV LT(_NAV, KC_SPC)
151#define SPC_TOPR LT(_TOPROWS, KC_SPC)
152#define SPC_TOPR_BP LT(_TOPROWS_BP, KC_SPC)
153#define SPC_LAYR LT(_LAYERS, KC_SPC)
154#define SPC_LAYR_BP LT(_LAYERS, KC_SPC)
155#define SPC_ADJ LT(_ADJUST, KC_SPC)
156#define SPC_ADJ_BP LT(_ADJUST, KC_SPC)
157#define BSPC_SYMB LT(_SYMB, KC_BSPC)
158#define BSPC_SYMB_BP LT(_SYMB_BP, KC_BSPC)
159#define BSPC_TOPR LT(_TOPROWS, KC_BSPC)
160#define BSPC_TOPR_BP LT(_TOPROWS_BP, KC_BSPC)
161#define SPC_NUM LT(_KEYPAD, KC_SPC)
162#define SPC_NUM_BP LT(_KEYPAD_BP, KC_SPC)
163#define BSPC_NUM LT(_KEYPAD, KC_BSPC)
164#define BSPC_NUM_BP LT(_KEYPAD_BP, KC_BSPC)
125 165
126// OSM keycodes, to keep things clean and easy to change 166// OSM keycodes, to keep things clean and easy to change
127#define KC_MLSF OSM(MOD_LSFT) 167#define KC_MLSF OSM(MOD_LSFT)
@@ -138,6 +178,9 @@ enum userspace_custom_keycodes {
138 178
139#define MG_NKRO MAGIC_TOGGLE_NKRO 179#define MG_NKRO MAGIC_TOGGLE_NKRO
140 180
181#define UC_IRNY UC(0x2E2E)
182#define UC_CLUE UC(0x203D)
183
141 184
142//// TAP DANCE 185//// TAP DANCE
143 186
@@ -166,11 +209,16 @@ enum {
166 TD_DEF_LAYER_SW = 5, 209 TD_DEF_LAYER_SW = 5,
167 TD_DEF_OS_LAYER_SW = 6, 210 TD_DEF_OS_LAYER_SW = 6,
168 TD_MOUSE_BTNS = 7, 211 TD_MOUSE_BTNS = 7,
169 TD_DVORAK_BEPO = 8 212 TD_DVORAK_BEPO = 8,
213 TD_UP_HOME = 9,
214 TD_DOWN_END = 10,
215 TD_RIGHT_TAB = 11,
216 TD_LEFT_BACKTAB = 12
170}; 217};
171 218
172 219
173// Tap dance 220// Tap dance
221#define KC_BKTAB LSFT(KC_TAB)
174#define TAB_BKTAB TD(TD_TAB_BKTAB) // Tab or backtab tapdance. 222#define TAB_BKTAB TD(TD_TAB_BKTAB) // Tab or backtab tapdance.
175#define MDIA_SYMB_KP_LAYERS TD(TD_MDIA_SYMB) // MDIA, symb, keypad, layouts layer tapdance toggle. 223#define MDIA_SYMB_KP_LAYERS TD(TD_MDIA_SYMB) // MDIA, symb, keypad, layouts layer tapdance toggle.
176#define DEF_LAYER_SW TD(TD_DEF_LAYER_SW) // dvorak, dvorak_on_bepo, bepo default layer 224#define DEF_LAYER_SW TD(TD_DEF_LAYER_SW) // dvorak, dvorak_on_bepo, bepo default layer
@@ -179,100 +227,34 @@ enum {
179#define XMONAD_ESC TD(TD_XMONAD_ESC) // Escape, dvorak, media or symb. - tap and hold tap dance. 1-4 227#define XMONAD_ESC TD(TD_XMONAD_ESC) // Escape, dvorak, media or symb. - tap and hold tap dance. 1-4
180#define DVORAK_ET_BEPO TD(TD_DVORAK_BEPO) // Escape, dvorak, media or symb. - tap and hold tap dance. 1-4 228#define DVORAK_ET_BEPO TD(TD_DVORAK_BEPO) // Escape, dvorak, media or symb. - tap and hold tap dance. 1-4
181#define TDMOUSE_BTNS TD(TD_MOUSE_BTNS) // hmmm. 1-5 229#define TDMOUSE_BTNS TD(TD_MOUSE_BTNS) // hmmm. 1-5
230#define RIGHT_TAB TD(TD_RIGHT_TAB) // Bad idea these 4. Maybe with good timing...
231#define LEFT_BACKTAB TD(TD_LEFT_BACKTAB)
232#define UP_HOME TD(TD_UP_HOME)
233#define DOWN_END TD(TD_DOWN_END) // No! Down Down Not End....
182 234
183// HOME ROW LAYER TOGGLE (LT) and Shift. 235// HOME ROW LAYER TOGGLE (LT) and Shift.
184// both sides of the home row have "shift, ___, media , symb, ___" and "___, symb, media, ___, shift". 236// both sides of the home row have "shift, ___, media , symb, ___" and "___, symb, media, ___, shift".
185// so pinky fingers are shift when held and the index and second fingers are symbol and 237// so pinky fingers are shift when held and the index and second fingers are symbol and
186// media layers when held. 238// media layers when held.
187 239
188// Dvorak
189// shift and layer switch on hold on the home row.
190#define KC_SFT_T_A SFT_T(KC_A)
191#define KC_SFT_T_S SFT_T(KC_S)
192
193#define KC_LT_SYMB_U LT(SYMB, KC_U)
194#define KC_LT_SYMB_H LT(SYMB, KC_H)
195
196#define KC_LT_MDIA_E LT(MDIA, KC_E)
197#define KC_LT_MDIA_T LT(MDIA, KC_T)
198
199// Need to add this to the others.
200#define KC_LT_KP_N LT(KEYPAD, KC_N)
201#define KC_LT_KP_O LT(KEYPAD, KC_O)
202
203// for dvorak on bepo
204#define BP_SFT_T_A SFT_T(BP_A)
205#define BP_SFT_T_S SFT_T(BP_S)
206
207#define BP_LT_SYMB_U LT(SYMB, BP_U)
208#define BP_LT_SYMB_H LT(MDIA, BP_H)
209
210#define BP_LT_MDIA_E LT(MDIA, BP_E)
211#define BP_LT_MDIA_T LT(MDIA, BP_T)
212
213// Need to add this to the others.
214#define BP_LT_KP_N LT(KEYPAD, BP_N)
215#define BP_LT_KP_O LT(KEYPAD, BP_O)
216
217// for bepo on bepo
218#define BP_SFT_T_T SFT_T(BP_T)
219#define BP_SFT_T_W SFT_T(BP_W)
220
221#define BP_LT_SYMB_I LT(SYMB_ON_BEPO, BP_I)
222#define BP_LT_MDIA_E LT(MDIA, BP_E)
223#define BP_LT_KP_U LT(KEYPAD, BP_U)
224
225#define BP_LT_SYMB_S LT(SYMB_ON_BEPO, BP_S)
226#define BP_LT_MDIA_R LT(MDIA, BP_R)
227#define BP_LT_KP_N LT(KEYPAD, BP_N)
228
229#define BP_SFT_T_A SFT_T(BP_A)
230#define BP_SFT_T_S SFT_T(BP_S)
231#define BP_SFT_T_E SFT_T(BP_E)
232#define BP_SFT_T_M SFT_T(BP_M)
233
234#define BP_SFT_T_ECRC SFT_T(BP_ECIR)
235#define BP_SFT_T_CCED SFT_T(BP_CCED)
236#define BP_LT_SYMB_COMM LT(SYMB,BP_COMM)
237
238//QWERTY
239#define KC_SFT_T_SCLN SFT_T(KC_SCLN)
240
241#define KC_LT_MDIA_D LT(MDIA, KC_D)
242#define KC_LT_MDIA_K LT(MDIA, KC_K)
243#define KC_LT_SYMB_F LT(SYMB, KC_F)
244#define KC_LT_SYMB_J LT(SYMB, KC_J)
245
246//COLEMAK
247#define KC_SFT_T_O SFT_T(KC_O)
248#define KC_LT_MDIA_S LT(MDIA, KC_S)
249#define KC_LT_SYMB_T LT(SYMB, KC_T)
250
251#define KC_LT_MDIA_E LT(MDIA, KC_E)
252#define KC_LT_SYMB_N LT(SYMB, KC_N)
253
254//WORKMAN
255#define KC_SFT_T_I SFT_T(KC_I)
256#define KC_LT_MDIA_H LT(MDIA, KC_H)
257
258//NORMAN
259// For keys on the homerow. Hold for shift, keypad,mouse,and smbol layers
260#define KC_SFT_T_U SFT_T(KC_U)
261#define KC_LT_MDIA_I LT(MDIA, KC_I)
262
263// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators). 240// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators).
241// The KC_CCCV key takes care of the last two...
264#define MK_CUT LSFT(KC_DEL) // shift + delete 242#define MK_CUT LSFT(KC_DEL) // shift + delete
265#define MK_COPY LCTL(KC_INS) // ctrl + insert 243#define MK_COPY LCTL(KC_INS) // ctrl + insert
266#define MK_PASTE LSFT(KC_INS) // shift + insert 244#define MK_PASTE LSFT(KC_INS) // shift + insert
267 245
246#undef ___ //kint defines it as KC_NO
268#define ___ KC_TRNS 247#define ___ KC_TRNS
269#define XXX KC_NO 248#define XXX KC_NO
270 249
271// Blocking keys 250// Blocking keys
251#define _X_ XXX
272#define ___X___ XXX 252#define ___X___ XXX
273#define ___X2___ XXX, XXX 253#define ___X2___ XXX, XXX
274#define ___X3___ ___X2___, XXX 254#define ___X3___ ___X2___, XXX
275#define ___X5___ ___X3___, XXX, XXX 255#define ___X5___ ___X3___, XXX, XXX
256#define ___X6___ ___X5___, XXX
257#define ___X12___ ___X6___, ___X6___
276#define ___X15___ ___X5___, ___X5___, ___X5___ 258#define ___X15___ ___X5___, ___X5___, ___X5___
277 259
278// Transparent keys 260// Transparent keys
@@ -281,13 +263,18 @@ enum {
281#define ___4___ ___3___, ___ 263#define ___4___ ___3___, ___
282#define ___5___ ___4___, ___ 264#define ___5___ ___4___, ___
283#define ___6___ ___5___, ___ 265#define ___6___ ___5___, ___
266#define ___12___ ___6___, ___6___
284#define ___14___ ___5___, ___4___, ___5___ 267#define ___14___ ___5___, ___4___, ___5___
285#define ___15___ ___5___, ___5___, ___5___ 268#define ___15___ ___5___, ___5___, ___5___
269#define ___16___ ___15___, ___
286 270
287int on_qwerty(void); 271int on_qwerty(void);
288int get_xmonad_layer(void); 272int get_xmonad_layer(void);
273
274#ifdef TAP_DANCES_ENABLE
289int cur_dance (qk_tap_dance_state_t *state); 275int cur_dance (qk_tap_dance_state_t *state);
290 276
291//for the x tap dance. Put it here so it can be used in any keymap 277//for the x tap dance. Put it here so it can be used in any keymap
292void x_finished (qk_tap_dance_state_t *state, void *user_data); 278void x_finished (qk_tap_dance_state_t *state, void *user_data);
293void x_reset (qk_tap_dance_state_t *state, void *user_data); 279void x_reset (qk_tap_dance_state_t *state, void *user_data);
280#endif
diff --git a/users/ericgebhart/core_keysets.h b/users/ericgebhart/core_keysets.h
index 5baf02ccf..f51f74392 100644..100755
--- a/users/ericgebhart/core_keysets.h
+++ b/users/ericgebhart/core_keysets.h
@@ -17,277 +17,329 @@
17*/ 17*/
18 18
19#include "core_keys.h" 19#include "core_keys.h"
20
21/********************************************************************/ 20/********************************************************************/
22/** Parts are parts, pieces of keysets so we have some decent **/ 21/** The Core rows of each given layout. **/
23/** building blocks to make keymaps with. **/
24/********************************************************************/ 22/********************************************************************/
23//Dvorak on a qwerty software layer in the OS
24#define ___DVORAK_L1___ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
25#define ___DVORAK_L2___ KC_A, KC_O, KC_E, KC_U, KC_I
26#define ___DVORAK_L3___ KC_SCLN, KC_Q, KC_J, KC_K, KC_X
27
28#define ___DVORAK_R1___ KC_F, KC_G, KC_C, KC_R, KC_L
29#define ___DVORAK_R2___ KC_D, KC_H, KC_T, KC_N, KC_S
30#define ___DVORAK_R3___ KC_B, KC_M, KC_W, KC_V, KC_Z
31
32#define ___DVORAK___ ___DVORAK_L1___, ___DVORAK_R1___, \
33 ___DVORAK_L2___, ___DVORAK_R2___, \
34 ___DVORAK_L3___, ___DVORAK_R3___
35
36/* BEAKL 15 (main layer): */
37/* 40123 76598 */
38/* qhoux gcrfz */
39/* - yiea. dstnb ; */
40/* j/,k' wmlpv */
41
42// Remember the - and ; outside pinky keys.
43// Or use the 6 size.
44// Both are on the symbol layer too. So you
45// wont lose them at least.
46// BQ_COMM, BQ_QUOT, BQ_DOT - Beakl->Qwerty
47// BB_COMM, BB_QUOT, BB_DOT - Beakl->Bepo
48// take care of the different shifted chars.
49/* BEAKL 15 (shift layer): */
50/* QHOUX GCRFZ */
51/* - YIEA@ DSTNB ; */
52/* J?!K` WMLPV */
53#define ___BEAKL15_L1___ KC_Q, KC_H, KC_O, KC_U, KC_X
54#define ___BEAKL15_L2___ KC_Y, KC_I, KC_E, KC_A, BQ_DOT
55#define ___BEAKL15_L3___ KC_J, KC_SLASH, BQ_COMM, KC_K, BQ_QUOT
56
57#define ___BEAKL15_R1___ KC_G, KC_C, KC_R, KC_F, KC_Z
58#define ___BEAKL15_R2___ KC_D, KC_S, KC_T, KC_N, KC_B
59#define ___BEAKL15_R3___ KC_W, KC_M, KC_L, KC_P, KC_V
60
61#define ___BEAKL15___ ___BEAKL15_L1___, ___BEAKL15_R1___, \
62 ___BEAKL15_L2___, ___BEAKL15_R2___, \
63 ___BEAKL15_L3___, ___BEAKL15_R3___
64
65#define ___6BEAKL15_L1___ ___, KC_Q, KC_H, KC_O, KC_U, KC_X
66#define ___6BEAKL15_L2___ KC_MINS, KC_Y, KC_I, KC_E, KC_A, BQ_DOT
67#define ___6BEAKL15_L3___ ___, KC_J, KC_SLASH, BQ_COMM, KC_K, BQ_QUOT
68
69#define ___6BEAKL15_R1___ KC_G, KC_C, KC_R, KC_F, KC_Z, ___
70#define ___6BEAKL15_R2___ KC_D, KC_S, KC_T, KC_N, KC_B, KC_SCLN
71#define ___6BEAKL15_R3___ KC_W, KC_M, KC_L, KC_P, KC_V, ___
72
73#define ___6BEAKL15___ ___6BEAKL15_L1___, ___6BEAKL15_R1___, \
74 ___6BEAKL15_L2___, ___6BEAKL15_R2___, \
75 ___6BEAKL15_L3___, ___6BEAKL15_R3___
25 76
77// Qwerty based layers that I don't really use.
78#define ___QWERTY_L1___ KC_Q, KC_W, KC_E, KC_R, KC_T
79#define ___QWERTY_L2___ KC_A, KC_S, KC_D, KC_F, KC_G
80#define ___QWERTY_L3___ KC_Z, KC_X, KC_C, KC_V, KC_B
26 81
27// Since our quirky block definitions are basically a list of comma separated 82#define ___QWERTY_R1___ KC_Y, KC_U, KC_I, KC_O, KC_P
28// arguments, we need a wrapper in order for these definitions to be 83#define ___QWERTY_R2___ KC_H, KC_J, KC_K, KC_L, KC_SCLN
29// expanded before being used as arguments to the LAYOUT_xxx macro. 84#define ___QWERTY_R3___ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH
30#if (!defined(LAYOUT) && defined(KEYMAP))
31#define LAYOUT KEYMAP
32#endif
33 85
34#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) 86#define ___QWERTY___ ___QWERTY_L1___, ___QWERTY_R1___, \
35#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) 87 ___QWERTY_L2___, ___QWERTY_R2___, \
36#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) 88 ___QWERTY_L3___, ___QWERTY_R3___
37#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
38 89
39#define LAYOUT_ortho_5x15_wrapper(...) LAYOUT_ortho_5x15(__VA_ARGS__) 90// Qwerty based layers that I don't really use.
40#define LAYOUT_ortho_5x14_wrapper(...) LAYOUT_ortho_5x14(__VA_ARGS__)
41 91
92// COLEMAK
93#define ___COLEMAK_L1___ KC_Q, KC_W, KC_F, KC_P, KC_G
94#define ___COLEMAK_L2___ KC_A, KC_R, KC_S, KC_T, KC_D
95#define ___COLEMAK_L3___ KC_Z, KC_X, KC_C, KC_V, KC_B
42 96
43/********************************************************************/ 97#define ___COLEMAK_R1___ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
44/** The Core rows of each given layout. **/ 98#define ___COLEMAK_R2___ KC_H, KC_N, KC_E, KC_I, KC_O
45/********************************************************************/ 99#define ___COLEMAK_R3___ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH
46//Dvorak on a qwerty software layer in the OS
47#define ___DVORAK_L1___ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
48#define ___DVORAK_L2___ KC_SFT_T_A, KC_LT_KP_O, KC_LT_MDIA_E, KC_LT_SYMB_U, KC_I
49#define ___DVORAK_L3___ KC_SCLN, KC_Q, KC_J, KC_K, KC_X
50 100
51#define ___DVORAK_R1___ KC_F, KC_G, KC_C, KC_R, KC_L 101#define ___COLEMAK___ ___COLEMAK_L1___, ___COLEMAK_R1___, \
52#define ___DVORAK_R2___ KC_D, KC_LT_SYMB_H, KC_LT_MDIA_T, KC_LT_KP_N, KC_SFT_T_S 102 ___COLEMAK_L2___, ___COLEMAK_R2___, \
53#define ___DVORAK_R3___ KC_B, KC_M, KC_W, KC_V, KC_Z 103 ___COLEMAK_L3___, ___COLEMAK_R3___
54 104
55// Qwerty based layers that I don't really use. 105// COLEMAK-DH
56#define ___QWERTY_L1___ KC_Q, KC_W, KC_E, KC_R, KC_T 106#define ___COLEMAK_DH_L1___ KC_Q, KC_W, KC_F, KC_P, KC_B
57#define ___QWERTY_L2___ KC_SFT_T_A, KC_S, KC_LT_MDIA_D, KC_LT_SYMB_F, KC_G 107#define ___COLEMAK_DH_L2___ KC_A, KC_R, KC_S, KC_T, KC_G
58#define ___QWERTY_L3___ KC_Z, KC_X, KC_C, KC_V, KC_B 108#define ___COLEMAK_DH_L3___ KC_Z, KC_X, KC_C, KC_D, KC_V
59 109
60#define ___QWERTY_R1___ KC_Y, KC_U, KC_I, KC_O, KC_P 110#define ___COLEMAK_DH_R1___ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
61#define ___QWERTY_R2___ KC_H, KC_LT_SYMB_J, KC_LT_MDIA_K, KC_L, KC_SFT_T_SCLN 111#define ___COLEMAK_DH_R2___ KC_M, KC_N, KC_E, KC_I, KC_O
62#define ___QWERTY_R3___ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH 112#define ___COLEMAK_DH_R3___ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH
63 113
64// COLEMAK 114#define ___COLEMAK_DH___ ___COLEMAK_DH_L1___, ___COLEMAK_DH_R1___, \
65#define ___COLEMAK_L1___ KC_Q, KC_W, KC_F, KC_P, KC_G 115 ___COLEMAK_DH_L2___, ___COLEMAK_DH_R2___, \
66#define ___COLEMAK_L2___ KC_SFT_T_A, KC_R, KC_LT_MDIA_S, KC_LT_SYMB_T, KC_D 116 ___COLEMAK_DH_L3___, ___COLEMAK_DH_R3___
67#define ___COLEMAK_L3___ KC_Z, KC_X, KC_C, KC_V, KC_B
68 117
69#define ___COLEMAK_R1___ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
70#define ___COLEMAK_R2___ KC_H, KC_LT_SYMB_N, KC_LT_MDIA_E, KC_I, KC_SFT_T_O
71#define ___COLEMAK_R3___ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH
72 118
73// COLEMAK-DH 119// WORKMAN
74#define ___COLEMAK_DH_L1___ KC_Q, KC_W, KC_F, KC_P, KC_B 120#define ___WORKMAN_L1___ KC_Q, KC_D, KC_R, KC_W, KC_B
75#define ___COLEMAK_DH_L2___ KC_SFT_T_A, KC_R, KC_LT_MDIA_S, KC_LT_SYMB_T, KC_G 121#define ___WORKMAN_L2___ KC_A, KC_S, KC_H, KC_T, KC_G
76#define ___COLEMAK_DH_L3___ KC_Z, KC_X, KC_C, KC_D, KC_V 122#define ___WORKMAN_L3___ KC_Z, KC_X, KC_M, KC_C, KC_V
77 123
78#define ___COLEMAK_DH_R1___ KC_J, KC_L, KC_U, KC_Y, KC_SCLN 124#define ___WORKMAN_R1___ KC_J, KC_F, KC_U, KC_P, KC_SCLN
79#define ___COLEMAK_DH_R2___ KC_M, KC_LT_SYMB_N, KC_LT_MDIA_E, KC_I, KC_SFT_T_O 125#define ___WORKMAN_R2___ KC_Y, KC_N, KC_E, KC_O, KC_I
80#define ___COLEMAK_DH_R3___ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH 126#define ___WORKMAN_R3___ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH
81 127
82// WORKMAN 128#define ___WORKMAN___ ___WORKMAN_L1___, ___WORKMAN_R1___, \
83#define ___WORKMAN_L1___ KC_Q, KC_D, KC_R, KC_W, KC_B 129 ___WORKMAN_L2___, ___WORKMAN_R2___, \
84#define ___WORKMAN_L2___ KC_SFT_T_A, KC_S, KC_LT_MDIA_H, KC_LT_SYMB_T, KC_G 130 ___WORKMAN_L3___, ___WORKMAN_R3___
85#define ___WORKMAN_L3___ KC_Z, KC_X, KC_M, KC_C, KC_V
86 131
87#define ___WORKMAN_R1___ KC_J, KC_F, KC_U, KC_P, KC_SCLN
88#define ___WORKMAN_R2___ KC_Y, KC_LT_SYMB_N, KC_LT_MDIA_E, KC_O, KC_SFT_T_I
89#define ___WORKMAN_R3___ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH
90 132
91// NORMAN 133// NORMAN
92#define ___NORMAN_L1___ KC_Q, KC_W, KC_D, KC_F, KC_K 134#define ___NORMAN_L1___ KC_Q, KC_W, KC_D, KC_F, KC_K
93#define ___NORMAN_L2___ KC_SFT_T_A, KC_S, KC_LT_MDIA_E, KC_LT_SYMB_T, KC_G 135#define ___NORMAN_L2___ KC_A, KC_S, KC_E, KC_T, KC_G
94#define ___NORMAN_L3___ KC_Z, KC_X, KC_C, KC_V, KC_B 136#define ___NORMAN_L3___ KC_Z, KC_X, KC_C, KC_V, KC_B
95 137
96#define ___NORMAN_R1___ KC_J, KC_U, KC_R, KC_L, KC_SCLN 138#define ___NORMAN_R1___ KC_J, KC_U, KC_R, KC_L, KC_SCLN
97#define ___NORMAN_R2___ KC_Y, KC_LT_SYMB_N, KC_LT_MDIA_I, KC_O, KC_SFT_T_U 139#define ___NORMAN_R2___ KC_Y, KC_N, KC_I, KC_O, KC_U
98#define ___NORMAN_R3___ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLASH 140#define ___NORMAN_R3___ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLASH
99 141
100// BEPO MAPS 142#define ___NORMAN___ ___NORMAN_L1___, ___NORMAN_R1___, \
101// Dvorak on fr-bepo software layer in the OS. 143 ___NORMAN_L2___, ___NORMAN_R2___, \
102// for dvorak and all the other qwerty like keyboards on bepo 144 ___NORMAN_L3___, ___NORMAN_R3___
103#define ___DVORAK_FR_L1___ DB_QUOT, DB_COMM, DB_DOT, BP_P, BP_Y
104#define ___DVORAK_FR_L2___ BP_SFT_T_A, BP_LT_KP_O, BP_LT_MDIA_E, BP_LT_SYMB_U, BP_I
105#define ___DVORAK_FR_L3___ DB_SCOLON, BP_Q, BP_J, BP_K, BP_X
106 145
107#define ___DVORAK_FR_R1___ BP_F, BP_G, BP_C, BP_R, BP_L
108#define ___DVORAK_FR_R2___ BP_D, BP_LT_SYMB_H, BP_LT_MDIA_T, BP_LT_KP_N, BP_SFT_T_S
109#define ___DVORAK_FR_R3___ BP_B, BP_M, BP_W, BP_V, BP_Z
110 146
147#define ___MALTRON_L1___ KC_Q, KC_P, KC_Y, KC_C, KC_B
148#define ___MALTRON_L2___ KC_A, KC_N, KC_I, KC_S, KC_F
149#define ___MALTRON_L3___ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM
111 150
112// Bepo on fr-bepo software layer 151#define ___MALTRON_R1___ KC_V, KC_M, KC_U, KC_Z, KC_L
113// for bepo on bepo 152#define ___MALTRON_R2___ KC_D, KC_T, KC_D, KC_O, KC_R
114/* BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, */ 153#define ___MALTRON_R3___ KC_DOT, KC_W, KC_K, KC_MINS, KC_X
115#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN
116/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */
117#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */
118 154
119#define ___BEPO_FR_L1___ BP_B, BP_EACU, BP_P, BP_O, BP_EGRV 155#define ___MALTRON___ ___MALTRON_L1___, ___MALTRON_R1___, \
120#define ___BEPO_FR_L2___ BP_SFT_T_A, BP_LT_KP_U, BP_LT_SYMB_I, BP_LT_MDIA_E, BP_COMM 156 ___MALTRON_L2___, ___MALTRON_R2___, \
121#define ___BEPO_FR_L3___ /*BP_ECIR*/ BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K 157 ___MALTRON_L3___, ___MALTRON_R3___
122 158
123#define ___BEPO_FR_R1___ /* BP_DCIR,*/ BP_V, BP_D, BP_L, BP_J, BP_Z
124#define ___BEPO_FR_R2___ /* BP_C, */ BP_T, BP_LT_SYMB_S, BP_LT_MDIA_R, BP_LT_KP_N, BP_SFT_T_M //BP_CCED
125#define ___BEPO_FR_R3___ BP_QUOT, BP_Q, BP_G, BP_H, BP_F //BP_SFT_T_W
126 159
127/* BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, */ 160#define ___EUCALYN_L1___ KC_SLSH, KC_COMM, KC_DOT, KC_F, KC_Q
128/* KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC, */ 161#define ___EUCALYN_L2___ KC_A, KC_O, KC_E, KC_I, KC_U
129/* KC_LSFT, BP_A, BP_U, BP_I, BP_E, BP_COMM, */ 162#define ___EUCALYN_L3___ KC_Z, KC_X, KC_C, KC_V, KC_W
130/* KC_LCTRL, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, */
131/* ESC_FN, BP_ECIR, KC_LGUI, KC_LALT, SPC_RALT, */
132/* TT(SWAP), KC_MNXT, */
133/* KC_MPLY, */
134/* TT(FN), TT(NUMS), KC_MPRV, */
135 163
136/* /\* right hand *\/ */ 164#define ___EUCALYN_R1___ KC_M, KC_R, KC_D, KC_Y, KC_P
137/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ 165#define ___EUCALYN_R2___ KC_G, KC_T, KC_K, KC_S, KC_N
138/* KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, */ 166#define ___EUCALYN_R3___ KC_B, KC_H, KC_J, KC_L, KC_SCLN
139/* BP_C, BP_T, BP_S, BP_R, BP_N, M_RSFT, */
140/* KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, W_RCTL, */
141 167
168#define ___EUCALYN___ ___EUCALYN_L1___, ___EUCALYN_R1___, \
169 ___EUCALYN_L2___, ___EUCALYN_R2___, \
170 ___EUCALYN_L3___, ___EUCALYN_R3___
142 171
143/*******************************************************************/
144/** For the top rows. Numbers for most things, symbols for Bepo. **/
145/*******************************************************************/
146 172
147// for everything on qwerty. 173#define ___CARPLAX_QFMLWY_L1___ KC_Q, KC_F, KC_M, KC_L, KC_W
148#define ___NUMBER_L___ KC_1, KC_2, KC_3, KC_4, KC_5 174#define ___CARPLAX_QFMLWY_L2___ KC_D, KC_S, KC_T, KC_N, KC_R
149#define ___NUMBER_R___ KC_6, KC_7, KC_8, KC_9, KC_0 175#define ___CARPLAX_QFMLWY_L3___ KC_Z, KC_V, KC_G, KC_C, KC_X
150 176
151// function key rows, works for everyone. 177#define ___CARPLAX_QFMLWY_R1___ KC_Y, KC_U, KC_O, KC_B, KC_J
152#define ___FUNC_L___ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 178#define ___CARPLAX_QFMLWY_R2___ KC_I, KC_A, KC_E, KC_H, KC_SCLN
153#define ___FUNC_R___ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 179#define ___CARPLAX_QFMLWY_R3___ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH
154 180
155#define ___FUNC_1_6___ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6 181#define ___CARPLAX_QFMLWY___ ___CARPLAX_QFMLWY_L1___, ___CARPLAX_QFMLWY_R1___, \
156#define ___FUNC_7_12___ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 182 ___CARPLAX_QFMLWY_L2___, ___CARPLAX_QFMLWY_R2___, \
183 ___CARPLAX_QFMLWY_L3___, ___CARPLAX_QFMLWY_R3___
157 184
158// a top symbol row if someone wants it.
159#define ___SYMB_L___ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
160#define ___SYMB_R___ KC_CIRC, KC_AMPR, KC_AST, KC_LPRN, KC_RPRN
161 185
162// For numbers on bepo. Bepo has numbers on shifted keys, the 186#define ___CARPLAX_QGMLWB_L1___ KC_Q, KC_G, KC_M, KC_L, KC_W
163// reverse of most keyboard layouts. 187#define ___CARPLAX_QGMLWB_L2___ KC_D, KC_S, KC_T, KC_N, KC_R
164#define ___NUMBER_BEPO_L___ DB_1, DB_2, DB_3, DB_4, DB_5 188#define ___CARPLAX_QGMLWB_L3___ KC_Z, KC_X, KC_C, KC_F, KC_J
165#define ___NUMBER_BEPO_R___ DB_6, DB_7, DB_8, DB_9, DB_0
166 189
190#define ___CARPLAX_QGMLWB_R1___ KC_B, KC_Y, KC_U, KC_V, KC_SCLN
191#define ___CARPLAX_QGMLWB_R2___ KC_I, KC_A, KC_E, KC_O, KC_H
192#define ___CARPLAX_QGMLWB_R3___ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH
167 193
168/*******************************************************************/ 194#define ___CARPLAX_QGMLWB___ ___CARPLAX_QGMLWB_L1___, ___CARPLAX_QGMLWB_R1___, \
169/* keysets for the auxillary layers. */ 195 ___CARPLAX_QGMLWB_L2___, ___CARPLAX_QGMLWB_R2___, \
170/* the KC_P? codes don't work for me. I don't use those shifted */ 196 ___CARPLAX_QGMLWB_L3___, ___CARPLAX_QGMLWB_R3___
171/* values anyway. */
172/*******************************************************************/
173// Keypads
174#define ___KEYPAD_1___ KC_7, KC_8, KC_9, KC_PSLS
175#define ___KEYPAD_2___ KC_4, KC_5, KC_6, KC_PAST
176#define ___KEYPAD_3___ KC_1, KC_2, KC_3, KC_PMNS
177#define ___KEYPAD_4___ KC_0, KC_DOT, KC_PEQL, KC_PPLS
178 197
179// Keypad from the default keymap.c of the xd75
180#define ___KEYPAD_1_ALT___ KC_P7, KC_P8, KC_P9, KC_MINS
181#define ___KEYPAD_2_ALT___ KC_P4, KC_P5, KC_P6, KC_PLUS
182#define ___KEYPAD_3_ALT___ KC_P1, KC_P2, KC_P3, KC_PENT
183#define ___KEYPAD_4_ALT___ KC_P0, KC_DOT, KC_PENT, KC_PENT
184 198
185// For Bepo 199#define ___CARPLAX_QGMLWY_L1___ KC_Q, KC_G, KC_M, KC_L, KC_W
186#define ___KEYPAD_1_BP___ DB_7, DB_8, DB_9, BP_SLSH 200#define ___CARPLAX_QGMLWY_L2___ KC_D, KC_S, KC_T, KC_N, KC_R
187#define ___KEYPAD_2_BP___ DB_4, DB_5, DB_6, BP_ASTR 201#define ___CARPLAX_QGMLWY_L3___ KC_Z, KC_X, KC_C, KC_V, KC_J
188#define ___KEYPAD_3_BP___ DB_1, DB_2, DB_3, DB_MINUS
189#define ___KEYPAD_4_BP___ DB_0, DB_DOT, DB_EQL, BP_PLUS
190 202
203#define ___CARPLAX_QGMLWY_R1___ KC_Y, KC_F, KC_U, KC_B, KC_SCLN
204#define ___CARPLAX_QGMLWY_R2___ KC_I, KC_A, KC_E, KC_O, KC_H
205#define ___CARPLAX_QGMLWY_R3___ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH
191 206
192// SYMBOLS 207#define ___CARPLAX_QGMLWY___ ___CARPLAX_QGMLWY_L1___, ___CARPLAX_QGMLWY_R1___, \
193// An arrangement for the left hand with a focus on the ()[]{}s. 208 ___CARPLAX_QGMLWY_L2___, ___CARPLAX_QGMLWY_R2___, \
194#define ___SYMBOLS_1___ KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE 209 ___CARPLAX_QGMLWY_L3___, ___CARPLAX_QGMLWY_R3___
195#define ___SYMBOLS_2___ KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV
196#define ___SYMBOLS_3___ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD
197 210
198// A larger 6 column arrangement for the left hand, A merge of dvorak and the above.
199#define ___SYMBOLS6_1___ KC_GRV, KC_LT, KC_GT, KC_LCBR, KC_RCBR, KC_HASH
200#define ___SYMBOLS6_2___ KC_AMPR, KC_AT, KC_ASTR, KC_LPRN, KC_RPRN, KC_PERC
201#define ___SYMBOLS6_3___ KC_DLR, KC_DQT, KC_QUOT, KC_LBRC, KC_RBRC, KC_COLON
202#define ___SYMBOLS6_4___ ___2___, KC_TILD, KC_DOT, KC_EXLM, KC_SCLN
203 211
204#define ___SYMBOLS5_4___ ___, KC_TILD, KC_DOT, KC_EXLM, KC_SCLN 212// BEPO Based Layouts.
213// Bepo, Dvorak and Beakl on fr-bepo software layer in the OS.
214// for dvorak and all the other qwerty like keyboards on bepo
215#define ___DVORAK_FR_L1___ DB_QUOT, DB_COMM, DB_DOT, BP_P, BP_Y
216#define ___DVORAK_FR_L2___ BP_A, BP_O, BP_E, BP_U, BP_I
217#define ___DVORAK_FR_L3___ DB_SCOLON, BP_Q, BP_J, BP_K, BP_X
205 218
219#define ___DVORAK_FR_R1___ BP_F, BP_G, BP_C, BP_R, BP_L
220#define ___DVORAK_FR_R2___ BP_D, BP_H, BP_T, BP_N, BP_S
221#define ___DVORAK_FR_R3___ BP_B, BP_M, BP_W, BP_V, BP_Z
206 222
207// A symbol pad. Basically the same layout as a number pad with the symbols 223#define ___DVORAK_FR___ ___DVORAK_FR_L1___, ___DVORAK_FR_R1___, \
208// instead of the numbers with some extras around it, in familiar places for the 224 ___DVORAK_FR_L2___, ___DVORAK_FR_R2___, \
209// right hand. 225 ___DVORAK_FR_L3___, ___DVORAK_FR_R3___
210#define ___SYMPAD_1___ KC_GRV, KC_AMPR, KC_ASTR, KC_LCBR, KC_PLUS, KC_PIPE
211#define ___SYMPAD_2___ KC_TILD, KC_DLR, KC_PERC, KC_CIRC, KC_ASTR, KC_GRV
212#define ___SYMPAD_3___ ___, KC_EXLM, KC_AT, KC_HASH, KC_MINUS, KC_SLASH
213#define ___SYMPAD_4___ ___, KC_RCBR, KC_DOT, KC_EQUAL, KC_UNDS, KC_BSLASH
214 226
215#define ___5_SYMPAD_4___ KC_RCBR, KC_DOT, KC_EQUAL, KC_UNDS, KC_BSLASH 227/* BEAKL 15 (main layer): */
216 228
217// Function pad. Same idea as above, but for function keys. 229#define ___DVORAK6_FR_L1___ DB_GRV, ___DVORAK_FR_L1___
218#define ___FUNCPAD_T___ KC_F10, KC_F11, KC_F12 230#define ___DVORAK6_FR_L2___ TAB_BKTAB, ___DVORAK_FR_L2___
219#define ___FUNCPAD_1___ KC_F7, KC_F8, KC_F9 231#define ___DVORAK6_FR_L3___ ___, ___DVORAK_FR_L3___
220#define ___FUNCPAD_2___ KC_F4, KC_F5, KC_F6
221#define ___FUNCPAD_3___ KC_F1, KC_F2, KC_F3
222 232
233#define ___DVORAK6_FR_R1___ ___DVORAK_FR_R1___, BP_MIN
234#define ___DVORAK6_FR_R2___ ___DVORAK_FR_R2___, BP_SLSH
235#define ___DVORAK6_FR_R3___ ___DVORAK_FR_R3___, DB_BACKSLASH
223 236
224//--- all over again for BEPO 237#define ___6DVORAK_FR___ ___6DVORAK_FR_L1___, ___6DVORAK_FR_R1___, \
238 ___6DVORAK_FR_L2___, ___6DVORAK_FR_R2___, \
239 ___6DVORAK_FR_L3___, ___6DVORAK_FR_R3___
240
241// dont forget ; and -. the 'a' home row is official placement.
242#define ___BEAKL15_FR_L1___ BP_Q, BP_H, BP_O, BP_U, BP_X
243#define ___BEAKL15_FR_L2___ BP_Y, BP_I, BP_E, BP_A, BB_DOT
244#define ___BEAKL15_FR_L2a___ BP_MIN, BP_Y, BP_I, BP_E, BP_A, BB_DOT
245#define ___BEAKL15_FR_L3___ BP_J, BP_SLSH, BB_COMM, BP_K, BB_QUOT
246
247#define ___BEAKL15_FR_R1___ BP_G, BP_C, BP_R, BP_F, BP_Z
248#define ___BEAKL15_FR_R2___ BP_D, BP_S, BP_T, BP_N, BP_B
249#define ___BEAKL15_FR_R2a___ BP_D, BP_S, BP_T, BP_N, BP_B, DB_SCLN
250#define ___BEAKL15_FR_R3___ BP_W, BP_M, BP_L, BP_P, BP_V
251
252#define ___6BEAKL15_FR___ ___, ___BEAKL15_FR_L1___, ___BEAKL15_FR_R1___, ___, \
253 ___BEAKL15_FR_L2a___, ___BEAKL15_FR_R2a___, \
254 ___, ___BEAKL15_FR_L3___, ___BEAKL15_FR_R3___, ___
255
256#define ___BEAKL15_FR___ ___BEAKL15_FR_L1___, ___BEAKL15_FR_R1___, \
257 ___BEAKL15_FR_L2___, ___BEAKL15_FR_R2___, \
258 ___BEAKL15_FR_L3___, ___BEAKL15_FR_R3___
259
260#define ___BEPO_L1___ BP_B, BP_EACU, BP_P, BP_O, BP_EGRV
261#define ___BEPO_L2___ BP_A, BP_U, BP_I, BP_E, BP_COMM
262#define ___BEPO_L3___ /*BP_ECRC*/ BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K
263
264#define ___BEPO_R1___ /* BP_DCRC,*/ BP_V, BP_D, BP_L, BP_J, BP_Z
265#define ___BEPO_R2___ /* BP_C, */ BP_T, BP_S, BP_R, BP_N, BP_M //BP_CCED
266#define ___BEPO_R3___ BP_QUOT, BP_Q, BP_G, BP_H, BP_F //BP_SFT_T_W
267
268// Bepo for a 3x6 split. CCED switched hands. :-( 'Altgr-c c' does the same.
269// W has to drop down to the bottom. Silly unbalanced layout.
270#define ___BEPO6_L1___ BP_CCED, ___BEPO_L1___
271#define ___BEPO6_L2___ TAB_BKTAB, ___BEPO_L2___
272#define ___BEPO6_L3___ BP_ECIR, ___BEPO_L3___
273
274#define ___BEPO6_R1___ ___BEPO_R1___, BP_PERC
275#define ___BEPO6_R2___ ___BEPO_R2___, BP_C
276#define ___BEPO6_R3___ ___BEPO_R3___, BP_W
277
278#define ___BEPO6___ ___BEPO6_L1___, ___BEPO6_R1___, \
279 ___BEPO6_L2___, ___BEPO6_R2___, \
280 ___BEPO6_L3___, ___BEPO6_R3___
281
282#define ___BEPO___ ___BEPO_L1___, ___BEPO_R1___, \
283 ___BEPO_L2___, ___BEPO_R2___, \
284 ___BEPO_L3___, ___BEPO_R3___
285
286
287/*******************************************************************/
288/** TOP ROWS Func,Symbols, Numbers you find there. **/
289/*******************************************************************/
290// for everything on qwerty.
291#define ___NUMBER_L___ KC_1, KC_2, KC_3, KC_4, KC_5
292#define ___NUMBER_R___ KC_6, KC_7, KC_8, KC_9, KC_0
293
294#define ___NUMBER_BEAKL15_L___ KC_4, KC_0, KC_1, KC_2, KC_3
295#define ___NUMBER_BEAKL15_R___ KC_7, KC_6, KC_5, KC_9, KC_8
296
297// a top symbol row if someone wants it.
298#define ___SYMB_L___ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
299#define ___SYMB_R___ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN
300
301/// BEPO ////
302// For numbers on bepo. Bepo has numbers on shifted keys, the
303// reverse of many layouts.
304#define ___NUMBER_BEPO_L___ DB_1, DB_2, DB_3, DB_4, DB_5
305#define ___NUMBER_BEPO_R___ DB_6, DB_7, DB_8, DB_9, DB_0
306
307// In case you want to try BEAKL 15 Numbers
308#define ___NUMBER_BEAKL15_BP_L___ DB_4, DB_0, DB_1, DB_2, DB_3
309#define ___NUMBER_BEAKL15_BP_R___ DB_7, DB_6, DB_5, DB_9, DB_8
225 310
226// SYMBOLS FOR BEPO
227// The top row. Bepo has symbols not numbers. Numbers are the shifted values. 311// The top row. Bepo has symbols not numbers. Numbers are the shifted values.
312// There are actually 13 keys specified for bepo.
228#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN 313#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN
229/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */
230#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */ 314#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */
231 315
232// An arrangement for the left hand with a focus on the ()[]{}s. 316#define ___6SYMBOL_BEPO_L___ BP_DLR, ___SYMBOL_BEPO_L___
233#define ___SYMBOLS_1_BP___ KC_EXLM, BP_AT, DB_LCBR, DB_RCBR, DB_PIPE 317#define ___6SYMBOL_BEPO_R___ ___SYMBOL_BEPO_R___, BP_EQL /* BP_PERC */
234#define ___SYMBOLS_2_BP___ DB_HASH, BP_DLR, DB_LPRN, DB_RPRN, DB_GRV 318
235#define ___SYMBOLS_3_BP___ BP_PERC, DB_CIRC, DB_LBRC, DB_RBRC, DB_TILD 319// a top qwerty style symbol row if someone wants it.
236 320#define ___SYMB_L_FR___ DB_EXLM, BP_AT, BP_HASH, BP_DLR, BP_PERC
237// A larger 6 column arrangement for the left hand, A merge of dvorak and the above. 321#define ___SYMB_R_FR___ DB_CIRC, BP_AMPR, BP_ASTR, BP_LPRN, BP_RPRN
238#define ___SYMBOLS6_1_BP___ DB_GRV, DB_LESS, DB_GRTR, DB_LCBR, DB_RCBR, DB_HASH 322
239#define ___SYMBOLS6_2_BP___ KC_AMPR, BP_AT, BP_ASTR, DB_LPRN, DB_RPRN, BP_PERC 323
240#define ___SYMBOLS6_3_BP___ BP_DLR, BP_DQUO, DB_QUOT, DB_LBRC, DB_RBRC, KC_COLON 324// function key rows, works for everyone.
241#define ___SYMBOLS6_4_BP___ ___2___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON 325#define ___FUNC_L___ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
242 326#define ___FUNC_R___ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
243#define ___SYMBOLS5_4_BP___ ___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON 327
244 328#define ___FUNC_1_6___ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6
245// A symbol pad. Basically the same layout as a number pad with the symbols 329#define ___FUNC_7_12___ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12
246// instead of the numbers with some extras around it, in familiar places for the 330
247// right hand. 331#define ___FUNC_BEAKL_L___ KC_F4, KC_F10, KC_F1, KC_F2, KC_F3
248#define ___SYMPAD_1_BP___ DB_GRV, BP_AMPR, BP_ASTR, DB_LCBR, BP_PLUS, DB_PIPE 332#define ___FUNC_BEAKL_R___ KC_F7, KC_F6, KC_F5, KC_F9, KC_F8
249#define ___SYMPAD_2_BP___ DB_TILD, BP_DLR, BP_PERC, DB_CIRC, BP_ASTR, DB_GRV 333
250#define ___SYMPAD_3_BP___ ___, BP_EXLM, BP_AT, DB_HASH, BP_MINS, BP_SLSH 334#define ___12_FUNC_BEAKL___ KC_F11, ___FUNC_BEAKL_L___, ___FUNC_BEAKL_R___, KC_F12
251#define ___SYMPAD_4_BP___ ___, DB_RCBR, DB_DOT, BP_EQL, BP_MINS, DB_BACKSLASH 335
252 336// Altogether. Defines all the various top rows that
253#define ___5_SYMPAD_4_BP___ DB_RCBR, DB_DOT, BP_EQL, BP_MINS, DB_BACKSLASH 337// are present with all these layouts.
254 338// All together as blocks of 10
255// Parts are parts. 339#define ___NUMS___ ___NUMBER_L___, ___NUMBER_R___
256// MOUSE, ARROW and MEDIA KEY SETS 340#define ___SYMS___ ___SYMB_L___, ___SYMB_R___
257#define ___MOUSE_LDUR___ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R 341#define ___BKLNUMS___ ___NUMBER_BEAKL15_L___, ___NUMBER_BEAKL15_R___
258#define ___MWHEEL_LDUR___ KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R 342#define ___NUMS_BP___ ___NUMBER_BEPO_L___, ___NUMBER_BEPO_R___
259#define ___MOUSE_BTNS_R___ KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5 343#define ___SYMS_BEPO___ ___SYMBOL_BEPO_L___, ___SYMBOL_BEPO_L___
260#define ___MOUSE_BTNS_L___ KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_BTN1 344#define ___BKLNUMS_BP___ ___NUMBER_BEAKL15_BP_L___, ___NUMBER_BEAKL15_BP_R___
261#define ___MOUSE_ACCL_012___ KC_ACL0, KC_ACL1, KC_ACL2 345#define ___FUNCS_1_10___ ___FUNC_L___, ___FUNC_R___
262#define ___MACCL___ ___MOUSE_ACCL_012___
263
264#define ___PRV_PLAY_NXT_STOP KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP
265#define ___VDN_MUTE_VUP___ KC_VOLD, KC_MUTE, KC_VOLU
266
267#define ___MUTE_PRV_PLAY_NXT_STOP___ KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP
268#define ___MUTE_PLAY_STOP___ KC_MUTE, KC_MPLY, KC_MSTP
269#define ___VI_ARROWS___ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
270
271// RGB FUNCTION Keysets
272// RGB row for the _FN layer from the redo of the default keymap.c
273#define ___RGB_HUE_SAT_INT_UP___ RGB_HUI, RGB_SAI, RGB_VAI, RGB_RMOD
274#define ___RGB_HUE_SAT_INT_DN___ RGB_HUD, RGB_SAD, RGB_VAD, RGB_MOD
275#define ___RGB_MODE_PRV_NXT___ RGB_RMOD, RGB_MOD
276#define ___RGB_TOGGLE___ RGB_TOG
277#define ___RGB_P_B_R_SW_SN___ RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN
278#define ___RGB_KXGT___ RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T
279
280// Print screen, screen lock, pause
281#define ___PSCR_SLCK_PAUS___ KC_PSCR, KC_SLCK, KC_PAUS
282
283// LAYER Keyset rows. Changing the Default base layer or the transient layers.
284// Some are full length. The baselayers leave the ends open. hence a 13.
285// for an ORtho 15.
286#define ___2_LAYERS_B1___ DF(BEPO), DF(DVORAK_ON_BEPO)
287#define ___2_LAYERS_B2___ DF(COLEMAK), DF(DVORAK)
288#define ___3_LAYERS_B3___ DF(QWERTY), DF(NORMAN), DF(WORKMAN)
289#define ___3_LAYERS_B4___ ___X3___
290// transient layers.
291#define ___3_LAYERS_T_BP___ TO(MDIA), TO(SYMB_ON_BEPO), TO(KEYPAD_ON_BEPO)
292#define ___3_LAYERS_T___ TO(MDIA), TO(SYMB), TO(KEYPAD)
293#define ___3_LAYERS_T_CTL___ TO(_RGB), ___X2___
diff --git a/users/ericgebhart/edge_keys.h b/users/ericgebhart/edge_keys.h
new file mode 100644
index 000000000..f37425322
--- /dev/null
+++ b/users/ericgebhart/edge_keys.h
@@ -0,0 +1,238 @@
1#pragma once
2/*
3 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#include "core_keysets.h"
20
21/******************************************************************/
22/* This is where I put my Keyboard layouts, Everything on the */
23/* edges, the functions on keys like LT() and SFT_T() */
24/* can be applied here. The physical shape of the keyboard is */
25/* also accounted for here. This makes it very simple to add a */
26/* new keyboard and reuse all of my layouts and layers */
27/* */
28/* The particular pieces we define here (as needed) are: */
29/* * Edge pinky keys, */
30/* * Middle section keys */
31/* * Bottom/5th row */
32/* * Thumbkeys */
33/* * Any functional additions to wrap the keys. ie. LT() */
34/* */
35/* With all of that in hand, we then create a LAYOUT wrapper */
36/* macro that takes a list of keys, to create a keyboard matrix */
37/* that fits the keyboard. Simple. */
38/* */
39/* The thumb keys, the bottom rows, etc. */
40/* */
41/* An attempt has been made to adapt the kinesis and ergodox */
42/* Thumb keys to the rectangular shapes of the xd75 and viterbi. */
43/* which are 15x and 14x matrices respectively. */
44/* The Corne was a perfect fit */
45/******************************************************************/
46
47/******************************************************************/
48/* * The XD75 is a 5x15 Ortholinear matrix which means it has 3 */
49/* keys inbetween the usual left and right hand keys */
50/* * The Viterbi is a split 5x14 Ortholinear with 2 middle keys. */
51/* * The Ergodox is a split 5x14 Ortholinear with 2 middle keys, */
52/* thumbkeys. It is missing middle keys on (home) row 3. */
53/* * The Corne is a split 3x12 with 6 thumb keys. It has no */
54/* extra middle keys */
55/* */
56/******************************************************************/
57
58
59/******************************************************************/
60/* In all cases these keyboards are defined in a matrix which is */
61/* a set of rows. Maybe like so, or not. */
62/* */
63/* -------------------------|------------------------ */
64/* | Left0 | Numbers L | mid|dle0 | numbers R | Right0 | */
65/* | Left1 | keys0-5 | mid|dle1 | Keys6-10 | Right1 | */
66/* | Left2 | keys11-15 | mid|dle2 | Keys16-20 | Right2 | */
67/* | Left3 | keys20-25 | mid|dle3 | Keys25-30 | Right3 | */
68/* | Row5L | Row5R | */
69/* | ThumbsL | ThumbsR | */
70/* -------------------------|------------------------ */
71
72/* Generally speaking, the keys on the right and left don't change. */
73/* Neither does the bottom row or the thumbs. Frequently the numbers */
74/* row is identical across layers. Mostly, we want our Base layers to */
75/* be predctable. */
76
77// EDGES
78// outside pinky keys row 0-3.
79// Qwerty and Bepo, - Applies
80// to foreign layouts on bepo. dvorak_bp, beakl_bp.
81#define LEFT0 KC_GRV
82#define LEFT1 KC_GRV
83#define LEFT2 KC_TAB
84#define LEFT3 KC_BSLASH
85//#define LEFT3 KC_COLN
86
87#define LEFT0_BP DB_GRV
88#define LEFT1_BP DB_GRV
89#define LEFT2_BP KC_TAB
90#define LEFT3_BP DB_BACKSLASH
91//#define LEFT3_BP BP_COLN
92
93#define RIGHT0 KC_EQL
94#define RIGHT1 KC_SLASH
95#define RIGHT2 KC_MINS
96#define RIGHT3 KC_SCLN
97
98#define RIGHT0_BP BP_EQL
99#define RIGHT1_BP BP_SLSH
100#define RIGHT2_BP BP_MINS
101#define RIGHT3_BP BP_SCLN
102
103/******************************************************************/
104/* Middle Keysets for various keyboards */
105// MIDDLES
106/// Middle left and right keys.
107/******************************************************************/
108#define ___MIDDLE_LT___ OSL(_LAYERS)
109#define ___MIDDLE_L1___ KC_CCCV
110#define ___MIDDLE_L2___ TO(_SYMB)
111#define ___MIDDLE_L3___ TO(_NAV)
112
113#define ___MIDDLE_RT___ _X_
114#define ___MIDDLE_R1___ KC_CCCV
115#define ___MIDDLE_R2___ TO(_TOPROWS)
116#define ___MIDDLE_R3___ OSL(_KEYPAD)
117
118#define ___MIDDLE_L1_BP___ BP_CCCV
119#define ___MIDDLE_L2_BP___ TO(_SYMB_BP)
120
121#define ___MIDDLE_R1_BP___ BP_CCCV
122#define ___MIDDLE_R2_BP___ TO(_KEYPAD_BP)
123#define ___MIDDLE_R3_BP___ OSL(_KEYPAD_BP)
124
125// 3 keys in the middle of a 15x matrix
126#define ___3_MIDDLE_T___ ___MIDDLE_LT___, LCTL(KC_A), ___MIDDLE_RT___
127#define ___3_MIDDLE_1___ ___MIDDLE_L1___, LCTL(KC_X), ___MIDDLE_R1___
128#define ___3_MIDDLE_2___ ___MIDDLE_L2___, TO(_RGB), ___MIDDLE_R2___
129#define ___3_MIDDLE_3___ ___MIDDLE_L3___, TO(_SYMB), ___MIDDLE_R3___
130
131// The same, for BEPO
132#define ___3_MIDDLE_T_BP___ ___MIDDLE_LT___, LCTL(BP_A), ___MIDDLE_RT___
133#define ___3_MIDDLE_1_BP___ ___MIDDLE_L1_BP___, LCTL(BP_X), ___MIDDLE_R1_BP___
134#define ___3_MIDDLE_2_BP___ ___MIDDLE_L2_BP___, TO(_RGB), ___MIDDLE_R2_BP___
135#define ___3_MIDDLE_3_BP___ ___MIDDLE_L3___, TO(_SYMB_BP), ___MIDDLE_R3_BP___
136
137// 2 keys in the middle of a 14x matrix - For viterbi and ergodox.
138#define ___2_MIDDLE_T___ ___MIDDLE_LT___, ___MIDDLE_RT___
139#define ___2_MIDDLE_1___ ___MIDDLE_L1___, ___MIDDLE_R1___
140#define ___2_MIDDLE_2___ ___MIDDLE_L2___, ___MIDDLE_R2___
141#define ___2_MIDDLE_3___ ___MIDDLE_L3___, ___MIDDLE_R3___
142
143// The same, for BEPO
144#define ___2_MIDDLE_T_BP___ ___MIDDLE_LT___, ___MIDDLE_RT___
145#define ___2_MIDDLE_1_BP___ ___MIDDLE_L1_BP___, ___MIDDLE_R1_BP___
146#define ___2_MIDDLE_2_BP___ ___MIDDLE_L2_BP___, ___MIDDLE_R2_BP___
147#define ___2_MIDDLE_3_BP___ ___MIDDLE_L3___, ___MIDDLE_R3_BP___
148
149/********************************************************************/
150/* THUMBS */
151/* Define the thumb clusters for all the keyboards. */
152/********************************************************************/
153
154// for xd75 or other layouts with a center column.
155// #define ___5_MIDDLE_THUMBS___ CTL_BSPC, ALT_DEL, XMONAD_ESC, ALT_ENT, CTL_SPC
156#define ___5_MIDDLE_THUMBS___ ALT_DEL, BSPC_TOPR, ESC_SYMB, ENT_NAV, SPC_TOPR
157#define ___5_MIDDLE_THUMBS_BP___ ALT_DEL, BSPC_TOPR_BP, ESC_SYMB_BP, ENT_NAV, SPC_TOPR_BP
158
159// for a last, 4th thumb row. for rebound.
160// backtab, home end, ----, pgup, pgdn, tab ?
161#define ___13_BOTTOM___ \
162 KC_BKTAB, HOME_END, KC_TAB, TT(_NAV), BSPC_SYMB, ESC_TOPR, \
163 OSL(_LAYERS), \
164 ENT_NAV, SPC_TOPR, KC_LEFT, KC_PGUP, KC_PGDN, KC_RIGHT
165
166#define ___13_BOTTOM_BP___ \
167 KC_BKTAB, HOME_END, KC_TAB, TT(_NAV), BSPC_SYMB_BP, ESC_TOPR_BP, \
168 OSL(_LAYERS), \
169 ENT_NAV, SPC_TOPR_BP, KC_LEFT, KC_PGUP, KC_PGDN, KC_RIGHT
170
171// becomes the upper thumbs, the real 4th row if we throw away
172// the number row at the top.
173// this is the 4th row on the viterbi above the thumbrow if the number
174// row is not used for numbers.
175#define ___4_MIDDLE_4___ LSFT(KC_TAB), HOME_END, KC_PGDN, KC_TAB
176#define ___4_MIDDLE_4b___ TAB_BKTAB, HOME_END, KC_PGDN, KC_PGUP
177
178/********************************************************************/
179/** The bottom row and thumbs as needed. **/
180/********************************************************************/
181// I do not use those pinky keys. I had useful things there but there
182// are better more useful ways than those pinkys.
183#define ___5_BOTTOM_LEFT___ ___X2___, KC_INS, KC_LEFT, KC_RIGHT
184#define ___5_BOTTOM_RIGHT___ KC_UP, KC_DOWN, KC_BSLASH, ___X2___
185
186#define ___4_BOTTOM_LEFT___ LCTL(KC_V), KC_INS, KC_LEFT, KC_RIGHT
187#define ___4_BOTTOM_RIGHT___ KC_UP, KC_DOWN, KC_BSLASH, LCTL(KC_C)
188
189// the bottom rows for keyboards on bepo.
190// bepo on bepo - not enough space to go around....
191#define ___5_BOTTOM_LEFT_BP___ _X_, BP_EACU, _X_, KC_LEFT, KC_RIGHT
192#define ___5_BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED, BP_PERC
193
194#define ___4_BOTTOM_LEFT_BP___ LCTL(BP_C), BP_EACU, KC_LEFT, KC_RIGHT
195#define ___4_BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED
196
197// for dvorak and beakl on bepo
198#define ___5_BOTTOM_LEFT_FR___ ___X3___, KC_LEFT, KC_RIGHT
199#define ___5_BOTTOM_RIGHT_FR___ KC_UP, KC_DOWN, DB_BACKSLASH, ___X2___
200
201// basically a 5th row in a 5x matrix. but maybe a 4th if there isnt a number row.
202#define ___15_BOTTOM___ ___5_BOTTOM_LEFT___, ___5_MIDDLE_THUMBS___, ___5_BOTTOM_RIGHT___
203#define ___15_BOTTOM_FR___ ___5_BOTTOM_LEFT_FR___, ___5_MIDDLE_THUMBS___, ___5_BOTTOM_RIGHT_FR___
204#define ___15_BOTTOM_BP___ ___5_BOTTOM_LEFT_BP___, ___5_MIDDLE_THUMBS___, ___5_BOTTOM_RIGHT_BP___
205
206#define ___14_BOTTOM___ ___5_BOTTOM_LEFT___, ___4_MIDDLE_4b___, ___5_BOTTOM_RIGHT___
207#define ___14_BOTTOM_FR___ ___5_BOTTOM_LEFT_FR___, ___4_MIDDLE_4b___, ___5_BOTTOM_RIGHT_FR___
208#define ___14_BOTTOM_BP___ ___5_BOTTOM_LEFT_BP___, ___4_MIDDLE_4b___, ___5_BOTTOM_RIGHT_BP___
209#define ___14_THUMBS_BOTTOM___ ___X4___, ___6_MIDDLE_THUMBS___, ___X4___
210
211// bottom row of ergodox thumbs, bottom middle of all layouts.
212// start with the minimilist thumb row of 6, like the Corne, 2x3.
213
214#define ___THUMBS_1___ TT(_KEYPAD), MO(_ADJUST), MO(_LAYERS), OSL(_TOPROWS)
215#define ___THUMBS_1_BP___ TT(_KEYPAD_BP), MO(_ADJUST), MO(_LAYERS), OSL(_TOPROWS_BP)
216#define ___THUMBS_2___ HOME_END, KC_PGUP
217#define ___THUMBS_3___ ___6_ERGO_THUMBS___
218
219#define ___4_THUMBS_1_BP___ TT(_KEYPAD_BP), KC_HOME, KC_PGUP, OSL(_TOPROWS_BP)
220#define ___4_THUMBS_1___ TT(_KEYPAD), KC_HOME, KC_PGUP, OSL(_TOPROWS)
221#define ___6_THUMBS_2___ KC_LSFT, KC_BKTAB, KC_END, KC_PGDN, KC_TAB, KC_RSFT
222
223#define ___6_THUMBS_2b___ BSPC_SYMB, ESC_TOPR, KC_END, KC_PGUP, ENT_NAV, SPC_TOPR
224#define ___6_ERGO_THUMBSb___ TT(_LAYERS), BSPC_SYMB, KC_XM_PORD, KC_PGDN, TT(_NAV), KC_XM_PORD
225#define ___6_THUMBS_2b_BP___ BSPC_SYMB_BP, ESC_TOPR_BP, KC_END, KC_PGDN, ENT_TOPR_BP, SPC_NAV
226
227#define ___6_ERGO_THUMBS___ TT(_NAV), BSPC_SYMB, ESC_TOPR, ENT_NAV, SPC_TOPR, KC_XM_PORD
228#define ___6_ERGO_THUMBS_BP___ TT(_NAV), BSPC_SYMB_BP, ESC_TOPR, ENT_NAV, SPC_TOPR_BP, BP_XM_PORD
229
230#define ___6_MIDDLE_THUMBS___ ___6_ERGO_THUMBS___
231
232#define ___12_DOX_ALL_THUMBS___ ___THUMBS_1___, ___THUMBS_2___, ___THUMBS_3___
233#define ___12_DOX_ALL_THUMBS_BP___ ___THUMBS_1_BP___, ___THUMBS_2___, ___THUMBS_3___
234
235#define ___16_ALL_THUMBSb___ ___4_THUMBS_1___, ___6_THUMBS_2b___, ___6_ERGO_THUMBSb___
236#define ___16_ALL_THUMBS___ ___4_THUMBS_1___, ___6_THUMBS_2___, ___6_ERGO_THUMBS___
237#define ___16_ALL_THUMBSb_BP___ ___4_THUMBS_1_BP___, ___6_THUMBS_2b_BP___, ___6_ERGO_THUMBS___
238#define ___16_ALL_THUMBS_BP___ ___4_THUMBS_1_BP___, ___6_THUMBS_2_BP___, ___6_ERGO_THUMBS_BP___
diff --git a/users/ericgebhart/ericgebhart.c b/users/ericgebhart/ericgebhart.c
index d34563865..2a34110ae 100644..100755
--- a/users/ericgebhart/ericgebhart.c
+++ b/users/ericgebhart/ericgebhart.c
@@ -27,12 +27,8 @@
27float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND); 27float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND);
28float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND); 28float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
29 29
30static uint16_t copy_paste_timer;
31userspace_config_t userspace_config; 30userspace_config_t userspace_config;
32 31
33void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); };
34
35
36// Add reconfigurable functions here, for keymap customization 32// Add reconfigurable functions here, for keymap customization
37// This allows for a global, userspace functions, and continued 33// This allows for a global, userspace functions, and continued
38// customization of the keymap. Use _keymap instead of _user 34// customization of the keymap. Use _keymap instead of _user
@@ -44,595 +40,9 @@ __attribute__ ((weak))
44void matrix_scan_keymap(void) {} 40void matrix_scan_keymap(void) {}
45 41
46__attribute__ ((weak)) 42__attribute__ ((weak))
47bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
48 return true;
49}
50
51__attribute__ ((weak))
52bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
53 return true;
54}
55
56__attribute__ ((weak))
57uint32_t layer_state_set_keymap (uint32_t state) { 43uint32_t layer_state_set_keymap (uint32_t state) {
58 return state; 44 return state;
59} 45}
60 46
61__attribute__ ((weak)) 47__attribute__ ((weak))
62void led_set_keymap(uint8_t usb_led) {} 48void led_set_keymap(uint8_t usb_led) {}
63
64// check default layerstate to see which layer we are on.
65// if (biton32(layer_state) == _DIABLO) { --- current layer
66// if (biton32(default_layer_state) == _DIABLO) { --- current default layer
67// check for left shift on.
68// if (mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT);
69
70static void switch_default_layer(uint8_t layer) {
71 default_layer_set(1UL<<layer);
72 clear_keyboard();
73}
74
75// so the keyboard remembers which layer it's in after power disconnect.
76/*
77 uint32_t default_layer_state_set_kb(uint32_t state) {
78 eeconfig_update_default_layer(state);
79 return state;
80 }
81*/
82
83// These are the keys for dvorak on bepo. column one is the keycode and mods for
84// the unshifted key, the second column is the keycode and mods for the shifted key.
85// GR is Good Range. It subtracts SAFE_RANGE from the keycode so we can make a
86// reasnably sized array without difficulties. The macro is for the constant declarations
87// the function is for when we use it.
88const uint8_t key_translations[][2][2] = {
89 [GR(DB_1)] = {{BP_DQUO, MOD_LSFT}, {BP_DCIR, MOD_LSFT}},
90 [GR(DB_2)] = {{BP_LDAQ, MOD_LSFT}, {BP_AT, MOD_NONE}},
91 [GR(DB_3)] = {{BP_RDAQ, MOD_LSFT}, {BP_DLR, MOD_LSFT}},
92 [GR(DB_4)] = {{BP_LPRN, MOD_LSFT}, {BP_DLR, MOD_NONE}},
93 [GR(DB_5)] = {{BP_RPRN, MOD_LSFT}, {BP_PERC, MOD_NONE}},
94 [GR(DB_6)] = {{BP_AT, MOD_LSFT}, {BP_AT, MOD_BIT(KC_RALT)}},
95 [GR(DB_7)] = {{BP_PLUS, MOD_LSFT}, {BP_P, MOD_BIT(KC_RALT)}},
96 [GR(DB_8)] = {{BP_MINS, MOD_LSFT}, {BP_ASTR, MOD_NONE}},
97 [GR(DB_9)] = {{BP_SLSH, MOD_LSFT}, {BP_LPRN, MOD_NONE}},
98 [GR(DB_0)] = {{BP_ASTR, MOD_LSFT}, {BP_RPRN, MOD_NONE}},
99 [GR(DB_GRV)] = {{BP_PERC, MOD_LSFT}, {BP_K, MOD_BIT(KC_RALT)}},
100 [GR(DB_SCOLON)] = {{BP_COMM, MOD_LSFT}, {BP_DOT, MOD_LSFT}},
101 [GR(DB_SLASH)] = {{BP_SLSH, MOD_NONE}, {BP_QUOT, MOD_LSFT}},
102 [GR(DB_BACKSLASH)] = {{BP_AGRV, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}},
103 [GR(DB_EQL)] = {{BP_EQL, MOD_NONE}, {BP_PLUS, MOD_NONE}},
104 [GR(DB_COMM)] = {{BP_COMM, MOD_NONE}, {BP_LDAQ, MOD_BIT(KC_RALT)}},
105 [GR(DB_DOT)] = {{BP_DOT, MOD_NONE}, {BP_RDAQ, MOD_BIT(KC_RALT)}},
106 [GR(DB_QUOT)] = {{BP_QUOT, MOD_NONE}, {BP_DQUO, MOD_NONE}},
107 [GR(DB_MINUS)] = {{BP_MINS, MOD_NONE}, {KC_SPC, MOD_BIT(KC_RALT)}},
108 [GR(DB_LPRN)] = {{BP_LPRN, MOD_NONE}, {BP_LPRN, MOD_BIT(KC_RALT)}},
109 [GR(DB_RPRN)] = {{BP_RPRN, MOD_NONE}, {BP_RPRN, MOD_BIT(KC_RALT)}},
110 [GR(DB_LBRC)] = {{BP_Y, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}},
111 [GR(DB_RBRC)] = {{BP_X, MOD_BIT(KC_RALT)}, {BP_RPRN, MOD_BIT(KC_RALT)}},
112 // For the symbol layer
113 [GR(DB_HASH)] = {{BP_DLR, MOD_LSFT}, {BP_DLR, MOD_LSFT}},
114 [GR(DB_LCBR)] = {{BP_LPRN, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}},
115 [GR(DB_RCBR)] = {{BP_LPRN, MOD_BIT(KC_RALT)}, {BP_RPRN, MOD_BIT(KC_RALT)}},
116 [GR(DB_PIPE)] = {{BP_B, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}},
117 [GR(DB_TILD)] = {{BP_K, MOD_BIT(KC_RALT)}, {BP_K, MOD_BIT(KC_RALT)}},
118 [GR(DB_CIRC)] = {{BP_AT, MOD_BIT(KC_RALT)}, {BP_AT, MOD_BIT(KC_RALT)}},
119 [GR(DB_LESS)] = {{BP_LDAQ, MOD_BIT(KC_RALT)}, {BP_LDAQ, MOD_BIT(KC_RALT)}},
120 [GR(DB_GRTR)] = {{BP_RDAQ, MOD_BIT(KC_RALT)}, {BP_RDAQ, MOD_BIT(KC_RALT)}},
121};
122
123
124uint8_t gr(uint8_t kc){
125 return (kc - SAFE_RANGE);
126}
127// send the right keycode for the right mod.
128// remove the mods we are taking care of,
129// send our keycodes then restore them.
130// all so we can make dvorak keys from bepo keycodes.
131void send_keycode(uint8_t kc){
132 uint8_t tmp_mods = get_mods();
133 bool is_shifted = ( tmp_mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) );
134 //uint8_t key[2][2] = key_translations[GR(kc)];
135 // need to turn of the shift if it is on.
136 unregister_mods((MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)));
137 if(is_shifted){
138 register_mods(SHIFTED_MODS(kc));
139 register_code(SHIFTED_KEY(kc));
140 unregister_code(SHIFTED_KEY(kc));
141 unregister_mods(SHIFTED_MODS(kc));
142 } else{
143 register_mods(UNSHIFTED_MODS(kc));
144 register_code(UNSHIFTED_KEY(kc));
145 unregister_code(UNSHIFTED_KEY(kc));
146 unregister_mods(UNSHIFTED_MODS(kc));
147 }
148 clear_mods();
149 register_mods(tmp_mods);
150}
151
152
153bool process_record_user(uint16_t keycode, keyrecord_t *record) {
154
155// If console is enabled, it will print the matrix position and status of each key pressed
156#ifdef KEYLOGGER_ENABLE
157xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed);
158#endif //KEYLOGGER_ENABLE
159
160// still dont know how to make #&_ And RALT is not ALTGR, That isn't working in the bepo keyboard
161// either. No {} either probably for the same reasons. ALtGR is the key to some of these.
162 switch (keycode) {
163 // Handle the key translations for Dvorak on bepo. It's best if these are the first
164 // enums after SAFE_RANGE.
165 case DB_1:
166 case DB_2:
167 case DB_3:
168 case DB_4:
169 case DB_5:
170 case DB_6:
171 case DB_7:
172 case DB_8:
173 case DB_9:
174 case DB_0:
175 case DB_GRV:
176 case DB_SCOLON:
177 case DB_SLASH:
178 case DB_BACKSLASH:
179 case DB_EQL:
180 case DB_DOT:
181 case DB_COMM:
182 case DB_QUOT:
183 case DB_MINUS:
184 case DB_LPRN:
185 case DB_RPRN:
186 case DB_LBRC:
187 case DB_RBRC:
188 if(record->event.pressed)
189 send_keycode(keycode);
190 unregister_code(keycode);
191 break;
192
193 case KC_QWERTY:
194 if (record->event.pressed) {
195 set_single_persistent_default_layer(QWERTY);
196 }
197 return false;
198 break;
199 case KC_COLEMAK:
200 if (record->event.pressed) {
201 set_single_persistent_default_layer(COLEMAK);
202 }
203 return false;
204 break;
205 case KC_DVORAK:
206 if (record->event.pressed) {
207 set_single_persistent_default_layer(DVORAK);
208 }
209 return false;
210 break;
211 case KC_WORKMAN:
212 if (record->event.pressed) {
213 set_single_persistent_default_layer(WORKMAN);
214 }
215 return false;
216 break;
217
218 case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
219 if (!record->event.pressed) {
220 SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
221#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
222 ":dfu"
223#elif defined(BOOTLOADER_HALFKAY)
224 ":teensy"
225#elif defined(BOOTLOADER_CATERINA)
226 ":avrdude"
227#endif // bootloader options
228 SS_TAP(X_ENTER));
229 }
230 return false;
231 break;
232
233
234 case KC_RESET: // Custom RESET code
235 if (!record->event.pressed) {
236 reset_keyboard();
237 }
238 return false;
239 break;
240
241
242 case EPRM: // Resets EEPROM
243 if (record->event.pressed) {
244 eeconfig_init();
245 default_layer_set(1UL<<eeconfig_read_default_layer());
246 layer_state_set(layer_state);
247 }
248 return false;
249 break;
250 case VRSN: // Prints firmware version
251 if (record->event.pressed) {
252 SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE);
253 }
254 return false;
255 break;
256
257 /* Code has been depreciated
258 case KC_SECRET_1 ... KC_SECRET_5: // Secrets! Externally defined strings, not stored in repo
259 if (!record->event.pressed) {
260 clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
261 send_string(decoy_secret[keycode - KC_SECRET_1]);
262 }
263 return false;
264 break;
265 */
266
267 // These are a serious of gaming macros.
268 // Only enables for the viterbi, basically,
269 // to save on firmware space, since it's limited.
270#ifdef MACROS_ENABLED
271 case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros
272 if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeprom_update_byte(EECONFIG_USER, userspace_config.raw); }
273 return false; break;
274#endif // MACROS_ENABLED
275
276 case KC_CCCV: // One key copy/paste
277 if(record->event.pressed){
278 copy_paste_timer = timer_read();
279 } else {
280 if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
281 register_code(KC_LCTL);
282 tap(KC_C);
283 unregister_code(KC_LCTL);
284#ifdef AUDIO_ENABLE
285 PLAY_SONG(tone_copy);
286#endif
287 } else { // Tap, paste
288 register_code(KC_LCTL);
289 tap(KC_V);
290 unregister_code(KC_LCTL);
291#ifdef AUDIO_ENABLE
292 PLAY_SONG(tone_paste);
293#endif
294 }
295 }
296 return false;
297 break;
298 case CLICKY_TOGGLE:
299#ifdef AUDIO_CLICKY
300 userspace_config.clicky_enable = clicky_enable;
301 eeprom_update_byte(EECONFIG_USER, userspace_config.raw);
302#endif
303 break;
304#ifdef UNICODE_ENABLE
305 case UC_FLIP: // (╯°□°)╯ ︵ ┻━┻
306 if (record->event.pressed) {
307 register_code(KC_RSFT);
308 tap(KC_9);
309 unregister_code(KC_RSFT);
310 process_unicode((0x256F | QK_UNICODE), record); // Arm
311 process_unicode((0x00B0 | QK_UNICODE), record); // Eye
312 process_unicode((0x25A1 | QK_UNICODE), record); // Mouth
313 process_unicode((0x00B0 | QK_UNICODE), record); // Eye
314 register_code(KC_RSFT);
315 tap(KC_0);
316 unregister_code(KC_RSFT);
317 process_unicode((0x256F | QK_UNICODE), record); // Arm
318 tap(KC_SPC);
319 process_unicode((0x0361 | QK_UNICODE), record); // Flippy
320 tap(KC_SPC);
321 process_unicode((0x253B | QK_UNICODE), record); // Table
322 process_unicode((0x2501 | QK_UNICODE), record); // Table
323 process_unicode((0x253B | QK_UNICODE), record); // Table
324 }
325 return false;
326 break;
327#endif // UNICODE_ENABLE
328
329}
330
331return true;
332 // return process_record_keymap(keycode, record) && process_record_secrets(keycode, record);
333}
334
335void tap_dance_mouse_btns (qk_tap_dance_state_t *state, void *user_data) {
336 switch(state->count){
337 case 1:
338 register_code(KC_BTN1);
339 break;
340 case 2:
341 register_code(KC_BTN2);
342 break;
343 case 3:
344 register_code(KC_BTN3);
345 break;
346 case 4:
347 register_code(KC_BTN4);
348 break;
349 case 5:
350 register_code(KC_BTN5);
351 break;
352 default:
353 break;
354 }
355 reset_tap_dance(state);
356}
357
358// counting on all the qwerty layers to be less than dvorak_on_bepo
359int on_qwerty(){
360 uint8_t deflayer = (biton32(default_layer_state));
361 return (deflayer < DVORAK_ON_BEPO);
362}
363
364void tap_dance_df_bepo_layers_switch (qk_tap_dance_state_t *state, void *user_data) {
365 switch(state->count){
366 case 1:
367 switch_default_layer(DVORAK_ON_BEPO);
368 break;
369 case 2:
370 switch_default_layer(BEPO);
371 break;
372 case 3:
373 layer_invert(LAYERS);
374 break;
375 default:
376 break;
377 }
378 reset_tap_dance(state);
379}
380
381void tap_dance_layer_switch (qk_tap_dance_state_t *state, void *user_data) {
382 switch(state->count){
383 case 1:
384 if(on_qwerty())
385 layer_invert(SYMB);
386 else
387 layer_invert(SYMB_ON_BEPO);
388 break;
389 case 2:
390 layer_invert(MDIA);
391 break;
392 case 3:
393 layer_invert(LAYERS);
394 break;
395 case 4:
396 if(on_qwerty())
397 layer_invert(KEYPAD);
398 else
399 layer_invert(KEYPAD_ON_BEPO);
400 break;
401 default:
402 break;
403 }
404 reset_tap_dance(state);
405}
406
407void tap_dance_default_layer_switch (qk_tap_dance_state_t *state, void *user_data) {
408 switch(state->count){
409 case 1:
410 switch_default_layer(DVORAK);
411 break;
412 case 2:
413 switch_default_layer(DVORAK_ON_BEPO);
414 break;
415 case 3:
416 switch_default_layer(BEPO);
417 break;
418 default:
419 break;
420 }
421 reset_tap_dance(state);
422}
423
424// switch the default layer to another qwerty based layer.
425void switch_default_layer_on_qwerty(int count) {
426 switch(count){
427 case 1:
428 switch_default_layer(DVORAK);
429 break;
430 case 2:
431 switch_default_layer(QWERTY);
432 break;
433 case 3:
434 switch_default_layer(COLEMAK);
435 break;
436 case 4:
437 switch_default_layer(WORKMAN);
438 break;
439 case 5:
440 switch_default_layer(NORMAN);
441 break;
442 default:
443 switch_default_layer(DVORAK);
444 break;
445 }
446}
447
448// switch the default layer to another bepo based layer.
449void switch_default_layer_on_bepo(int count) {
450 switch(count){
451 case 1:
452 switch_default_layer(DVORAK_ON_BEPO);
453 break;
454 case 2:
455 switch_default_layer(BEPO);
456 break;
457 default:
458 switch_default_layer(DVORAK_ON_BEPO);
459 break;
460 }
461}
462
463
464// tap to change the default layer. Distinguishes between layers that are based on
465// a qwerty software keyboard and a bepo software keyboard.
466// if shifted, choose layers based on the other software keyboard, otherwise choose only
467// layers that work on the current software keyboard.
468void tap_dance_default_os_layer_switch (qk_tap_dance_state_t *state, void *user_data) {
469 //uint8_t shifted = (get_mods() & MOD_BIT(KC_LSFT|KC_RSFT));
470 bool shifted = ( keyboard_report->mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) );
471 int qwerty = on_qwerty();
472
473
474 // shifted, choose between layers on the other software keyboard
475 if(shifted){
476 if (qwerty)
477 switch_default_layer_on_bepo(state->count);
478 else
479 switch_default_layer_on_qwerty(state->count);
480
481 // not shifted, choose between layers on the same software keyboard
482 } else {
483 if (qwerty)
484 switch_default_layer_on_qwerty(state->count);
485 else
486 switch_default_layer_on_bepo(state->count);
487 }
488
489 reset_tap_dance(state);
490}
491
492
493/* Return an integer that corresponds to what kind of tap dance should be executed.
494 *
495 * How to figure out tap dance state: interrupted and pressed.
496 *
497 * Interrupted: If the state of a dance dance is "interrupted", that means that another key has been hit
498 * under the tapping term. This is typically indicitive that you are trying to "tap" the key.
499 *
500 * Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term
501 * has ended, but the key is still being pressed down. This generally means the key is being "held".
502 *
503 * One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold"
504 * feature. In general, advanced tap dances do not work well if they are used with commonly typed letters.
505 * For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters.
506 *
507 * Good places to put an advanced tap dance:
508 * z,q,x,j,k,v,b, any function key, home/end, comma, semi-colon
509 *
510 * Criteria for "good placement" of a tap dance key:
511 * Not a key that is hit frequently in a sentence
512 * Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or
513 * in a web form. So 'tab' would be a poor choice for a tap dance.
514 * Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the
515 * letter 'p', the word 'pepper' would be quite frustating to type.
516 *
517 * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested
518 *
519 */
520int cur_dance (qk_tap_dance_state_t *state) {
521 if (state->count == 1) {
522 if (state->interrupted || !state->pressed) return SINGLE_TAP;
523 //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'.
524 else return SINGLE_HOLD;
525 }
526 else if (state->count == 2) {
527 /*
528 * DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
529 * action when hitting 'pp'. Suggested use case for this return value is when you want to send two
530 * keystrokes of the key, and not the 'double tap' action/macro.
531 */
532 if (state->interrupted) return DOUBLE_SINGLE_TAP;
533 else if (state->pressed) return DOUBLE_HOLD;
534 else return DOUBLE_TAP;
535 }
536 //Assumes no one is trying to type the same letter three times (at least not quickly).
537 //If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
538 //an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP'
539 if (state->count == 3) {
540 if (state->interrupted || !state->pressed) return TRIPLE_TAP;
541 else return TRIPLE_HOLD;
542 }
543 else return 8; //magic number. At some point this method will expand to work for more presses
544}
545//instanalize an instance of 'tap' for the 'x' tap dance.
546static tdtap xtap_state = {
547 .is_press_action = true,
548 .state = 0
549};
550/*
551 This so I can have a single key that acts like LGUI in DVORAK no
552 matter which keymap is my current default.
553 It also allows for the
554 shift gui and ctl gui, on the same key, So the same key is Escape,
555 and the mostcommon modifiers in my xmonad control keymap, while also
556 insuring that dvorak is active for the xmonad command key
557 Single tap = ESC
558 tap and hold = dvorak with L_GUI
559 double tap = One shot dvorak layer with LSFT LGUI mods
560 double hold = dvorak with LCTL LGUI
561 double single tap = esc.
562*/
563int get_xmonad_layer(){
564 int qwerty = on_qwerty();
565
566 if (qwerty)
567 return(XMONAD);
568 else
569 return(XMONAD_FR);
570}
571
572
573void x_finished (qk_tap_dance_state_t *state, void *user_data) {
574 int xmonad_layer = get_xmonad_layer();
575 xtap_state.state = cur_dance(state);
576 switch (xtap_state.state) {
577 case SINGLE_TAP:
578 register_code(KC_ESC);
579 break;
580 case SINGLE_HOLD:
581 layer_on(xmonad_layer);
582 set_oneshot_mods (MOD_LGUI);
583 //set_oneshot_layer (DVORAK, ONESHOT_START);
584 break;
585 case DOUBLE_TAP:
586 set_oneshot_mods ((MOD_LCTL | MOD_LGUI));
587 layer_on (xmonad_layer);
588 set_oneshot_layer (xmonad_layer, ONESHOT_START);
589 break;
590 case DOUBLE_HOLD:
591 set_oneshot_mods (MOD_LSFT | MOD_LGUI);
592 if (xmonad_layer != -1)
593 layer_on(xmonad_layer);
594 break;
595 case DOUBLE_SINGLE_TAP:
596 register_code(KC_ESC);
597 unregister_code(KC_ESC);
598 register_code(KC_ESC);
599 //Last case is for fast typing. Assuming your key is `f`:
600 //For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
601 //In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
602 }
603}
604
605void x_reset (qk_tap_dance_state_t *state, void *user_data) {
606 int xmonad_layer = get_xmonad_layer();
607 switch (xtap_state.state) {
608 case SINGLE_TAP:
609 unregister_code(KC_ESC);
610 break;
611 case SINGLE_HOLD:
612 layer_off(xmonad_layer);
613 break;
614 case DOUBLE_TAP:
615 set_oneshot_layer (xmonad_layer, ONESHOT_PRESSED);
616 break;
617 case DOUBLE_HOLD:
618 layer_off(xmonad_layer);
619 break;
620 case DOUBLE_SINGLE_TAP:
621 unregister_code(KC_ESC);
622 }
623 xtap_state.state = 0;
624}
625
626//Tap Dance Definitions
627qk_tap_dance_action_t tap_dance_actions[] = {
628 //Tap once for Esc, twice for Caps Lock
629 [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
630 [TD_TAB_BKTAB] = ACTION_TAP_DANCE_DOUBLE(KC_TAB, LSFT(KC_TAB)),
631 [TD_MDIA_SYMB] = ACTION_TAP_DANCE_FN(tap_dance_layer_switch),
632 [TD_DVORAK_BEPO] = ACTION_TAP_DANCE_FN(tap_dance_df_bepo_layers_switch),
633 [TD_DEF_LAYER_SW] = ACTION_TAP_DANCE_FN(tap_dance_default_layer_switch),
634 [TD_DEF_OS_LAYER_SW] = ACTION_TAP_DANCE_FN(tap_dance_default_os_layer_switch),
635 [TD_HOME_END] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END),
636 [TD_XMONAD_ESC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset),
637 [TD_MOUSE_BTNS] = ACTION_TAP_DANCE_FN(tap_dance_mouse_btns)
638};
diff --git a/users/ericgebhart/ericgebhart.h b/users/ericgebhart/ericgebhart.h
index ad66a636e..92f8f22d2 100644..100755
--- a/users/ericgebhart/ericgebhart.h
+++ b/users/ericgebhart/ericgebhart.h
@@ -1,32 +1,72 @@
1#pragma once 1#pragma once
2/*
3 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
2 18
3#ifndef ericgebhart 19#ifndef ericgebhart
4#define ericgebhart 20#define ericgebhart
5 21
6#include QMK_KEYBOARD_H 22#include QMK_KEYBOARD_H
7#include "base_layers.h" 23#include "core_keysets.h"
24#include "layouts.h"
25#include "layers.h"
26#if defined(OLED_ENABLE)
27# include "oled_stuff.h"
28#endif
8 29
9 30
10//#define ONESHOT_TAP_TOGGLE 2 /* Tapping this number of times holds the key until tapped once again. */ 31//#define ONESHOT_TAP_TOGGLE 2 /* Tapping this number of times holds the key until tapped once again. */
32/* Define layer names */
33enum userspace_layers {
34 _DVORAK = 0,
35 _QWERTY,
36 _COLEMAK,
37 _BEAKL,
38 //_WORKMAN,
39 //_NORMAN,
40 //_MALTRON,
41 //_EUCALYN,
42 //_CARPLAX,
43 _DVORAK_BP, // beginning of Bepo
44 _BEAKL_BP,
45 _BEPO,
46 _LAYERS,
47 _NAV, // transient layers
48 _SYMB,
49 _SYMB_BP,
50 _KEYPAD,
51 _KEYPAD_BP,
52 _TOPROWS,
53 _TOPROWS_BP,
54 _RGB,
55 _ADJUST,
56};
11 57
12#define DVORAK 0 // dvorak layout (default) 58// clang-format off
13#define QWERTY 1 59typedef union {
14#define COLEMAK 2 60 uint32_t raw;
15#define WORKMAN 3 61 struct {
16#define NORMAN 4 62 bool rgb_layer_change :1;
17// bepo layers 63 bool is_overwatch :1;
18#define DVORAK_ON_BEPO 6 // dvorak layout (default) 64 bool nuke_switch :1;
19#define BEPO 7 // Bepo 65 bool swapped_numbers :1;
20// non-default layers 66 bool rgb_matrix_idle_anim :1;
21#define SYMB 8 // symbols and numbers 67 };
22#define SYMB_ON_BEPO 9 // symbols and numbers 68} userspace_config_t;
23#define MDIA 10 // mouse knd media eys 69// clang-format on
24#define LAYERS 11 // layers and right mousekeys. 70extern userspace_config_t userspace_config;
25#define XMONAD 12 // xmonad ie. dvorak.
26#define XMONAD_FR 13 // xmonad ie. dvorak.
27#define KEYPAD 14 // number and Fkey pads
28#define KEYPAD_ON_BEPO 15 // number and Fkey pads.
29#define _RGB 16 // RGB stuff.
30
31 71
32#endif 72#endif
diff --git a/users/ericgebhart/layers.h b/users/ericgebhart/layers.h
new file mode 100755
index 000000000..5faaf0173
--- /dev/null
+++ b/users/ericgebhart/layers.h
@@ -0,0 +1,677 @@
1#pragma once
2/*
3 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#include "core_keys.h"
20/*********************************************************************/
21/* Non-Base Layer Definitions. */
22/* */
23/* Keypads, sympads, funcpads, symbols, RGB, Layers, Controls, etc. */
24/* Qwerty and Bepo versions exist as needed. */
25/* */
26/* This file defines every auxillary layer I use on every keyboard */
27/* Ergodox, keebio/viterbi, xd75, rebound, crkbd, morpho, dactyl,.. */
28/*********************************************************************/
29/********************************************************************************/
30/* The following Transient/Non-Base Layers are provided within. */
31/* Each layer is named with the size of Keymatrix it has entries for. */
32/* 3x12 or 4x12 are usual for these. Splitting is managed in the macros as */
33/* needed. BP indicates the Bepo equivalent to the Qwerty layer when needed. */
34/********************************************************************************/
35/* */
36/* Explore below to see what they all are. */
37/* Naming gives the sizes of things, a prefix number is the length. */
38/* BP is the bepo version of things. */
39/* BKL is the beakl 15 version of a layout or chunk. */
40/* C on the end of a name means its a compact version of something. */
41/* Compact meaning for use on a 3 row layout. */
42/* */
43/* TOPROWS - numbers, symbols, functions, all on one layer. */
44/* ___TOPROWS_3x12___ */
45/* ___TOPROWS_BP_3x12___ */
46/* // just numbers on the home row */
47/* ___NUM_HOME_BEAKL_3x12___ */
48/* ___NUM_HOME_BEAKL_BP_3x12___ */
49/* ___NUM_HOME_3x12___ */
50/* ___NUM_HOME_BP_3x12___ */
51/* */
52/* KEYPADS/FUNCPADS. */
53/* ___KEY_BKL_FUNC_4x12___ -- The BEAKL15 Keypad with a Funcpad on the right */
54/* ___KEY_BKL_FUNC_BP_4x12___ */
55/* ___FUNC_KEYPAD_4x12___ -- A Funcpad and a keypad */
56/* ___FUNC_KEYPAD_BP_4x12___ -- For Bepo */
57/* */
58/* // Compact Funcpad and keypad, 3x12 */
59/* ___KP_C_3x12___ */
60/* ___KP_C_BP_3x12___ */
61/* ___KP_C_BKL_FUNC_3x12___ -- BEAKL key/func pads. */
62/* ___KP_C_BKL_FUNC_BP_3x12___ */
63/* */
64/* SYMBOLS -Beakl or Beakl extended */
65/* ___SYMB_BEAKL_3x12___ */
66/* ___SYMB_BEAKL_BP_3x12___ */
67/* */
68/* Beakl extended symbol layer with additional corner symbols. */
69/* For use with non-beakl base layers. */
70/* ___SYMB_BEAKLA_3x12___ */
71/* ___SYMB_BEAKLA_BP_3x12___ */
72/* For use with vi bindings optimized */
73/* ___SYMB_BEAKLB_3x12___ */
74/* ___SYMB_BEAKLB_BP_3x12___ */
75/* */
76/* NAVIGATION */
77/* ___NAV_3x12___ */
78/* ___NAV_4x12___ */
79/* */
80/* CONTROLS */
81/* ___RGB_3x12___ */
82/* ___ADJUST_3x12___ */
83/* ___LAYERS_3x12___ */
84/********************************************************************************/
85/*********************************************************************/
86/* XXXXXX Layer chunk -- These are the final layers. */
87/* */
88/* Each section defines the necessary pieces to create a layer. */
89/* It builds them up into consistently shaped lists for the layout */
90/* wrapper. */
91/* */
92/* Each Section ends with a _Layer Chunk_. This is so the */
93/* layer can be easily given to the Layout Wrapper macros which */
94/* takes a list of keys in lengths of 2x3x5, 2x3x6, 2x4x5, or 2x4x6. */
95/* */
96/* All of my keyboard definitions use these same chunks with similar */
97/* macros. The differences between keyboards are all managed in the */
98/* macro. Here we just have nice rectangular sets of keys to */
99/* complete a layout. */
100/*********************************************************************/
101
102
103/*******************************************************************/
104/* A Top Rows layer. Pick your parts. Bepo and Qwerty */
105/* */
106/* This is, to me, a stop gap layer. If I need symbols, numbers or */
107/* function keys these rows are nicely predictable to most people. */
108/* I currently use the beakl number row with regular symbols. */
109/* I never use function keys for anything. */
110/*******************************************************************/
111#define ___12_SYMB___ ___, ___SYMS___, ___
112#define ___12_SYMB_BP___ ___12_SYMS_BEPO___,
113
114#define ___12_NUM___ ___, ___NUMS___, ___
115#define ___12_NUM_BP___ ___, ___NUMS_BP___, ___
116#define ___12_NUM_BEAKL___ ___, ___BKLNUMS___, ___
117#define ___12_NUM_BEAKL_BP___ ___, ___BKLNUMS_BP___, ___
118
119#define ___12_FUNC___ ___FUNC_1_6___, ___FUNC_7_12___
120#define ___12_SYMS_BEPO___ ___6SYMBOL_BEPO_L___, ___6SYMBOL_BEPO_R___
121#define ___12_SYMS_FR___ ___SYMB_L_FR___, ___SYMB_R_FR___
122
123// Kinesis function key row. I don't use them. but might as well define them.
124#define ___KINTFUNC_L___ KC_ESC, ___FUNC_1_6___, KC_F7, KC_F8
125// #define ___KINTFUNC_RIGHT___ KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_FN0, RESET
126#define ___KINTFUNC_R___ KC_F9, KC_F10, KC_F11, KC_F12, XXX, XXX, XXX, XXX, RESET
127
128// A TOPROWS Layer.
129// set it how you like it, if you like it.
130#define ___TOPROW_1___ ___12_SYMB___
131#define ___TOPROW_2___ ___12_NUM_BEAKL___
132#define ___TOPROW_3___ ___12_FUNC___
133
134#define ___TOPROW_1_BP___ ___12_SYMS_BEPO___
135#define ___TOPROW_2_BP___ ___12_NUM_BEAKL_BP___
136#define ___TOPROW_3_BP___ ___12_FUNC___
137
138/********************************************************************************/
139/* TOPROWS Layer chunk */
140/********************************************************************************/
141// altogether in a chunk.
142#define ___TOPROWS_3x12___ ___TOPROW_1___, ___TOPROW_2___, ___TOPROW_3___
143#define ___TOPROWS_BP_3x12___ ___TOPROW_1_BP___, ___TOPROW_2_BP___, ___TOPROW_3_BP___
144
145// Some layers with just a home row of numbers.
146// The beakl ones, r the usual ones.
147#define ___NUM_HOME_BEAKL_3x12___ ___12___, ___12_NUM_BEAKL___, ___12___
148#define ___NUM_HOME_BEAKL_BP_3x12___ ___12___, ___12_NUM_BEAKL_BP___, ___12___
149#define ___NUM_HOME_3x12___ ___12___, ___12_NUM___, ___12___
150#define ___NUM_HOME_BP_3x12___ ___12___, ___12_NUM_BP___, ___12___
151
152
153/********************************************************************************/
154/* KEYPADS. Mostly all in Bepo and Qwerty versions */
155/* 4 row Pads: */
156/* * The BEAKL 15 Number pad, for the left hand. */
157/* * Regular Number pad, for the right hand. */
158/* * 12 Function pad. */
159/* 3 row pads: */
160/* keypad */
161/* function pad */
162/* */
163/* LAYERS: */
164/* 4 Row: */
165/* * BEAKL with a compact FuncPad on the right. */
166/* * Funcpad on the left, keypad on the right. */
167/* 3 Row: */
168/* * Funcpad on the left, keypad on the right. */
169/* * BEAKL with a compact FuncPad on the right. */
170/* */
171/********************************************************************************/
172
173// BEAKL 15 (numpad layer):
174/* +=* ^%~ */
175/* ↹523: */
176/* - 7.104 */
177/* /698, */
178
179// Keypads
180#define ___6KEYPAD_BEAKL_L1___ ___, _X_, KC_PLUS, KC_PEQL, KC_ASTR, _X_
181#define ___6KEYPAD_BEAKL_L2___ ___, TAB_BKTAB, KC_5, KC_2, KC_3, KC_COLON
182#define ___6KEYPAD_BEAKL_L3___ KC_MINS, KC_7, KC_DOT, KC_1, KC_0, KC_4
183#define ___6KEYPAD_BEAKL_L4___ ___, KC_SLASH, KC_6, KC_9, KC_8, KC_COMM
184
185#define ___5KEYPAD_BEAKL_R1___ ___, KC_CIRC, KC_PERC, KC_TILD, ___
186
187#define ___6KEYPAD_BEAKL_L1_BP___ ___, _X_, BP_PLUS, BP_EQL, BP_ASTR, _X_
188#define ___6KEYPAD_BEAKL_L2_BP___ ___, TAB_BKTAB, BP_5, BP_2, BP_3, BP_COLN
189#define ___6KEYPAD_BEAKL_L3_BP___ BP_MINS, BP_7, BP_DOT, BP_1, BP_0, BP_4
190#define ___6KEYPAD_BEAKL_L4_BP___ ___, BP_SLSH, BP_6, BP_9, BP_8, BP_COMM
191
192#define ___5KEYPAD_BEAKL_R1_BP___ ___, BP_CIRC, BP_PERC, BP_TILD, ___
193
194#define ___5KEYPAD_1___ _X_, KC_7, KC_8, KC_9, KC_PSLS
195#define ___5KEYPAD_2___ _X_, KC_4, KC_5, KC_6, KC_PAST
196#define ___5KEYPAD_3___ _X_, KC_1, KC_2, KC_3, KC_PMNS
197#define ___5KEYPAD_4___ _X_, KC_0, KC_DOT, KC_PEQL, KC_PPLS
198// For Bepo
199#define ___5KEYPAD_1_BP___ _X_, DB_7, DB_8, DB_9, BP_SLSH
200#define ___5KEYPAD_2_BP___ _X_, DB_4, DB_5, DB_6, BP_ASTR
201#define ___5KEYPAD_3_BP___ _X_, DB_1, DB_2, DB_3, DB_MINUS
202#define ___5KEYPAD_4_BP___ _X_, DB_0, DB_DOT, DB_EQL, BP_PLUS
203
204// Keypad from the default keymap.c of the xd75
205#define ___4KEYPAD_1_ALT___ _X_, KC_P7, KC_P8, KC_P9, KC_MINS
206#define ___4KEYPAD_2_ALT___ _X_, KC_P4, KC_P5, KC_P6, KC_PLUS
207#define ___4KEYPAD_3_ALT___ _X_, KC_P1, KC_P2, KC_P3, KC_PENT
208#define ___4KEYPAD_4_ALT___ _X_, KC_P0, KC_DOT, KC_PENT, KC_PENT
209
210// Function pad. Same idea as above, but for function keys.
211// For the left side.
212#define ___5FUNCPAD_T___ _X_, KC_F10, KC_F11, KC_F12, _X_
213#define ___5FUNCPAD_1___ _X_, KC_F7, KC_F8, KC_F9, _X_
214#define ___5FUNCPAD_2___ _X_, KC_F4, KC_F5, KC_F6, _X_
215#define ___5FUNCPAD_3___ _X_, KC_F1, KC_F2, KC_F3, _X_
216
217
218// Put them together for complete left and right layers.
219// Beakl keypad with a funcpad
220#define ___12_KEYPAD_BKL_FUNCPAD_1___ ___6KEYPAD_BEAKL_L1___, _X_, ___5KEYPAD_BEAKL_R1___
221#define ___12_KEYPAD_BKL_FUNCPAD_2___ ___6KEYPAD_BEAKL_L2___, _X_, ___5_FUNCPADC_1___
222#define ___12_KEYPAD_BKL_FUNCPAD_3___ ___6KEYPAD_BEAKL_L3___, _X_, ___5_FUNCPADC_2___
223#define ___12_KEYPAD_BKL_FUNCPAD_4___ ___6KEYPAD_BEAKL_L4___, _X_, ___5_FUNCPADC_3___
224
225#define ___12_KEYPAD_BKL_FUNCPAD_1_BP___ ___6KEYPAD_BEAKL_L1_BP___, _X_, ___5KEYPAD_BEAKL_R1_BP___
226#define ___12_KEYPAD_BKL_FUNCPAD_2_BP___ ___6KEYPAD_BEAKL_L2_BP___, _X_, ___5_FUNCPADC_1___
227#define ___12_KEYPAD_BKL_FUNCPAD_3_BP___ ___6KEYPAD_BEAKL_L3_BP___, _X_, ___5_FUNCPADC_2___
228#define ___12_KEYPAD_BKL_FUNCPAD_4_BP___ ___6KEYPAD_BEAKL_L4_BP___, _X_, ___5_FUNCPADC_3___
229
230// Funcpad and keypad layer for Qwerty based layers.
231#define ___12_FUNCPAD_KEYPAD_1___ ___, ___5FUNCPAD_T___, ___5KEYPAD_1___, ___
232#define ___12_FUNCPAD_KEYPAD_2___ ___, ___5FUNCPAD_1___, ___5KEYPAD_2___, ___
233#define ___12_FUNCPAD_KEYPAD_3___ ___, ___5FUNCPAD_2___, ___5KEYPAD_3___, KC_PENT
234#define ___12_FUNCPAD_KEYPAD_4___ ___, ___5FUNCPAD_3___, ___5KEYPAD_4___, ___
235
236// Funcpad and keypad layer for BEPO
237#define ___12_FUNCPAD_KEYPAD_BP_1___ ___, ___5FUNCPAD_T_BP___, ___5KEYPAD_1_BP___, ___
238#define ___12_FUNCPAD_KEYPAD_BP_2___ ___, ___5FUNCPAD_1_BP___, ___5KEYPAD_2_BP___, ___
239#define ___12_FUNCPAD_KEYPAD_BP_3___ ___, ___5FUNCPAD_2_BP___, ___5KEYPAD_3_BP___, KC_PENT
240#define ___12_FUNCPAD_KEYPAD_BP_4___ ___, ___5FUNCPAD_3_BP___, ___5KEYPAD_4_BP___, ___
241
242/********************************************************************************/
243/* COMPACT - KEYPAD and FUNCPAD. 3 Rows. */
244/********************************************************************************/
245// Compact versions of each. 3 rows.
246//Compact keypad, 3 rows.
247#define ___6KEYPADC_1___ ___, KC_7, KC_8, KC_9, KC_PSLS, ___
248#define ___6KEYPADC_2___ KC_DOT, KC_4, KC_5, KC_6, KC_PAST, KC_PEQL
249#define ___6KEYPADC_3___ KC_0, KC_1, KC_2, KC_3, KC_PMNS, KC_PPLS
250// For Bepo
251#define ___6KEYPADC_1_BP___ ___, DB_7, DB_8, DB_9, BP_SLSH
252#define ___6KEYPADC_2_BP___ DB_DOT, DB_4, DB_5, DB_6, BP_ASTR, DB_EQL
253#define ___6KEYPADC_3_BP___ DB_0, DB_1, DB_2, DB_3, DB_MINUS, DB_PLUS
254
255// compact 1-12 funcpad for 3 row keyboards.
256#define ___5_FUNCPADC_1___ KC_F9, KC_F10, KC_F11, KC_F12, ___
257#define ___5_FUNCPADC_2___ KC_F5, KC_F6, KC_F7, KC_F8, ___
258#define ___5_FUNCPADC_3___ KC_F1, KC_F2, KC_F3, KC_F4, ___
259
260// Compact funcpads/keypad Layer
261#define ___12_KP_1C___ ___, ___5_FUNCPADC_1___, ___5KEYPAD_1___, ___
262#define ___12_KP_2C___ ___, ___5_FUNCPADC_2___, ___5KEYPAD_2___, ___
263#define ___12_KP_3C___ ___, ___5_FUNCPADC_3___, ___5KEYPAD_3___, ___
264// Reversed
265#define ___12_KP_FP_1C___ ___, ___5KEYPAD_1___, ___5_FUNCPADC_1___, ___
266#define ___12_KP_FP_2C___ ___, ___5KEYPAD_2___, ___5_FUNCPADC_2___, ___
267#define ___12_KP_FP_3C___ ___, ___5KEYPAD_3___, ___5_FUNCPADC_3___, ___
268
269//Bepo funcpad and keypad Layer
270#define ___12_KP_1_BP___ ___, ___5_FUNCPADC_1___, ___5KEYPAD_1_BP___, ___
271#define ___12_KP_2_BP___ ___, ___5_FUNCPADC_2___, ___5KEYPAD_2_BP___, ___
272#define ___12_KP_3_BP___ ___, ___5_FUNCPADC_3___, ___5KEYPAD_3_BP___, ___
273
274/********************************************************************************/
275/* FUNCPAD and Keypad Layer chunks */
276/********************************************************************************/
277// Full size, 4x12
278#define ___KEYPAD_BKL_FUNC_4x12___ \
279 ___12_KEYPAD_BKL_FUNCPAD_1___, \
280 ___12_KEYPAD_BKL_FUNCPAD_2___, \
281 ___12_KEYPAD_BKL_FUNCPAD_3___, \
282 ___12_KEYPAD_BKL_FUNCPAD_4___
283#define ___KEYPAD_BKL_FUNC_BP_4x12___ \
284 ___12_KEYPAD_BKL_FUNCPAD_1_BP___, \
285 ___12_KEYPAD_BKL_FUNCPAD_2_BP___, \
286 ___12_KEYPAD_BKL_FUNCPAD_3_BP___, \
287 ___12_KEYPAD_BKL_FUNCPAD_4_BP___
288#define ___FUNC_KEYPAD_4x12___ \
289 ___12_FUNCPAD_KEYPAD_1___, \
290 ___12_FUNCPAD_KEYPAD_2___, \
291 ___12_FUNCPAD_KEYPAD_3___, \
292 ___12_FUNCPAD_KEYPAD_4___
293#define ___FUNC_KEYPAD_BP_4x12___ \
294 ___12_FUNCPAD_KEYPAD_BP_1___, \
295 ___12_FUNCPAD_KEYPAD_BP_2___, \
296 ___12_FUNCPAD_KEYPAD_BP_3___, \
297 ___12_FUNCPAD_KEYPAD_BP_4___
298
299// Compact, 3x12
300#define ___KP_C_BKL_FUNC_3x12___ \
301 ___12_KEYPAD_BKL_FUNCPAD_2___, \
302 ___12_KEYPAD_BKL_FUNCPAD_3___, \
303 ___12_KEYPAD_BKL_FUNCPAD_4___
304#define ___KP_C_BKL_FUNC_BP_3x12___ \
305 ___12_KEYPAD_BKL_FUNCPAD_2_BP___, \
306 ___12_KEYPAD_BKL_FUNCPAD_3_BP___, \
307 ___12_KEYPAD_BKL_FUNCPAD_4_BP___
308
309#define ___KP_C_3x12___ ___12_KP_1C___, ___12_KP_2C___, ___12_KP_3C___
310#define ___KP_FP_C_3x12___ ___12_KP_FP_1C___, ___12_KP_FP_2C___, ___12_KP_FP_3C___
311#define ___KP_C_BP_3x12___ ___12_KP_1_BP___, ___12_KP_2_BP___, ___12_KP_3_BP___
312
313
314
315/********************************************************************************/
316/* SYMBOLS. The BEAKL15 Symbol layer with or without additions. */
317/* */
318/* Symbol layers: */
319/* */
320/* BEAKL symbol layer */
321/* <$> [_] */
322/* - \(")# %{=}| ; */
323/* :*+ &^~ */
324/* */
325/* BEAKL Extended symbol layer */
326/* `<$>' ?[_] */
327/* - \(")# %{=}| ; */
328/* @:*+; !&^~/ */
329/* */
330/* This layer has replaced my former Symbol pad and Symbols */
331/* layer. The Sympad was nice, But this incorporates the matching */
332/* (){}[] that I had and at the same time provides an easily */
333/* Learnable layer that makes sense. It was also easy to */
334/* Supplement with new keys that other layouts might need. */
335/* */
336/* The first Layer defined is the "Official" version. */
337/* The second Layer defined only adds to the original by */
338/* Placing 8 keys in the pinky and index corners */
339/* at the edges of the, 3x3, BEAKL home Region. */
340/* */
341/* Namely these: !?@`'/-; */
342/* */
343/* Beakl has these keys in it's base layer which isn't the case */
344/* for other layouts like dvorak, colemak, etc. */
345/* */
346/******************************************************************/
347
348/******************************************************************/
349/* Official BEAKL15 Symbol layer. */
350/* BEAKL 15 (punctuation layer): */
351/* */
352/* <$> [_] */
353/* - \(")# %{=}| ; */
354/* :*+ &^~ */
355/******************************************************************/
356/********************************************************************************/
357/* The expanded Beakl Symbol Layer */
358/* */
359/* Expanded with: !?@`'/-; */
360/* */
361/* This insures access to all common symbols, regardless of availabilily on */
362/* other layers. All the extra characters are added to the pinky and index */
363/* corners which are empty in the BEAKL symbol layer. */
364/* */
365/* Both ; and ' could find their dvorak positions. */
366/* Analysis showed that only caused pinky overuse. Rotating the symbols around */
367/* Put better keys on the index finger which showed a huge improvement */
368/* in efficiency. The same is true of the exclamation point. */
369/* */
370/* A: */
371/* `<$>' ?[_] */
372/* - \(")# %{=}| ; */
373/* @:*+; !&^~/ */
374/* */
375/* B: */
376/* With vi bindings /:? and a leader key for vi/emacs.*/
377/* ; is popular, I use , it's easy in dvorak.: */
378/* */
379/* `<$>' ?[_]- */
380/* - \(")# !{:}/ ; */
381/* @=*+; %&^~| */
382/********************************************************************************/
383// Left
384#define ___SB_L1___ KC_OCLTGT, KC_DLR, KC_GT
385#define ___SB_L2___ KC_BACKSLASH, KC_OCPRN, KC_OCDQUO, KC_RPRN, KC_HASH
386#define ___SB_L3___ KC_COLON, KC_ASTR, KC_PLUS
387#define ___SB_L3b___ KC_EQL, KC_ASTR, KC_PLUS
388
389// Bepo
390#define ___SB_L1_BP___ BP_OCLTGT, BP_DLR, DB_GRTR
391#define ___SB_L2_BP___ DB_BACKSLASH, DB_LPRN, BP_OCDQUO, DB_RPRN, DB_HASH
392#define ___SB_L3_BP___ KC_COLON, BP_ASTR, BP_PLUS
393#define ___SB_L3b_BP___ BP_EQL, BP_ASTR, BP_PLUS
394
395// Right
396#define ___SB_R1___ KC_OCBRC, KC_UNDS, KC_RBRC
397#define ___SB_R2___ KC_PERC, KC_OCCBR, KC_EQL, KC_RCBR, KC_PIPE
398#define ___SB_R3___ KC_AMPR, KC_CIRC, KC_TILD
399
400#define ___SB_R2a___ KC_PERC, KC_OCCBR, KC_EXLM, KC_RCBR, KC_PIPE
401#define ___SB_R2b___ KC_EXLM, KC_OCCBR, KC_COLN, KC_RCBR, KC_SLASH
402
403// Bepo
404#define ___SB_R1_BP___ BP_OCBRC, BP_UNDS, DB_RBRC
405#define ___SB_R2_BP___ BP_PERC, BP_OCCBR, BP_EQL, DB_RCBR, DB_PIPE
406#define ___SB_R3_BP___ BP_AMPR, DB_CIRC, DB_TILD
407
408#define ___SB_R2a_BP___ BP_PERC, BP_OCCBR, BP_EXLM, DB_RCBR, DB_PIPE
409#define ___SB_R2b_BP___ BP_EXLM, BP_OCCBR, KC_COLON, DB_RCBR, DB_SLASH
410
411// ---------------------------
412// ---------------------------
413
414// Square it to 6, Add in the - and ;.
415#define ___6SYMBOLS_BEAKL_L1___ ___, ___, ___SB_L1___, ___
416#define ___6SYMBOLS_BEAKL_L2___ KC_MINS, ___SB_L2___
417#define ___6SYMBOLS_BEAKL_L3___ ___, ___, ___SB_L3___, ___
418
419#define ___6SYMBOLS_BEAKL_R1___ ___, ___SB_R1___, ___, ___
420#define ___6SYMBOLS_BEAKL_R2___ ___SB_R2___, KC_SCLN
421#define ___6SYMBOLS_BEAKL_R3___ ___, ___SB_R3___, ___, ___
422// ---------------------------
423#define ___6SYMBOLS_BEAKL_L1a___ ___, KC_OCGRV, ___SB_L1___, KC_OCQUOT
424#define ___6SYMBOLS_BEAKL_L2a___ ___6SYMBOLS_BEAKL_L2___
425#define ___6SYMBOLS_BEAKL_L3a___ ___, KC_AT, ___SB_L3___, KC_SCLN
426
427#define ___6SYMBOLS_BEAKL_R1a___ LSFT(KC_SLASH), ___SB_R1___, KC_MINS, ___
428#define ___6SYMBOLS_BEAKL_R2a___ ___SB_R2a___, KC_SCLN
429#define ___6SYMBOLS_BEAKL_R3a___ KC_EXLM, ___SB_R3___, KC_SLASH, ___
430// ---------------------------
431#define ___6SYMBOLS_BEAKL_L1b___ ___, KC_OCGRV, ___SB_L1___, KC_OCQUOT
432#define ___6SYMBOLS_BEAKL_L2b___ ___6SYMBOLS_BEAKL_L2___
433#define ___6SYMBOLS_BEAKL_L3b___ ___, KC_AT, ___SB_L3b___, KC_SCLN
434
435#define ___6SYMBOLS_BEAKL_R1b___ ___6SYMBOLS_BEAKL_R1a___
436#define ___6SYMBOLS_BEAKL_R2b___ ___SB_R2b___, KC_SCLN
437#define ___6SYMBOLS_BEAKL_R3b___ KC_PERC, ___SB_R3___, KC_PIPE, ___
438
439// ---------------------------
440// ---------------------------
441// Bepo
442#define ___6SYMBOLS_BEAKL_L1_BP___ ___, ___, ___SB_L1_BP___, ___
443#define ___6SYMBOLS_BEAKL_L2_BP___ BP_MINS, ___SB_L2_BP___
444#define ___6SYMBOLS_BEAKL_L3_BP___ ___, ___, ___SB_L3_BP___, ___
445
446#define ___6SYMBOLS_BEAKL_R1_BP___ ___, ___SB_R1_BP___, ___, ___
447#define ___6SYMBOLS_BEAKL_R2_BP___ ___SB_R2_BP___, BP_SCLN
448#define ___6SYMBOLS_BEAKL_R3_BP___ ___, ___SB_R3_BP___, ___, ___
449// ---------------------------
450#define ___6SYMBOLS_BEAKL_L1a_BP___ ___, BP_GRV, ___SB_L1_BP___, BP_AT
451#define ___6SYMBOLS_BEAKL_L2a_BP___ ___6SYMBOLS_BEAKL_L2_BP___
452#define ___6SYMBOLS_BEAKL_L3a_BP___ ___, BP_AT, ___SB_L3_BP___, BP_SCLN
453
454#define ___6SYMBOLS_BEAKL_R1a_BP___ BP_QUES, ___SB_R1_BP___, BP_MINS, ___
455#define ___6SYMBOLS_BEAKL_R2a_BP___ ___SB_R2a_BP___, BP_SCLN
456#define ___6SYMBOLS_BEAKL_R3a_BP___ BP_EXLM, ___SB_R3_BP___, BP_SLSH, ___
457// ---------------------------
458#define ___6SYMBOLS_BEAKL_L1b_BP___ ___, BP_GRV, ___SB_L1___, BP_OCQUOT
459#define ___6SYMBOLS_BEAKL_L2b_BP___ ___6SYMBOLS_BEAKL_L2_BP___
460#define ___6SYMBOLS_BEAKL_L3b_BP___ ___, BP_AT, ___SB_L3b_BP___, BP_SCLN
461
462#define ___6SYMBOLS_BEAKL_R1b_BP___ ___, ___SB_R1_BP___, BP_MINS, ___
463#define ___6SYMBOLS_BEAKL_R2b_BP___ ___SB_R2b_BP___, BP_SCLN
464#define ___6SYMBOLS_BEAKL_R3b_BP___ BP_PERC, ___SB_R3_BP___, BP_PIPE, ___
465// ---------------------------
466
467// Some 12 column rows.
468#define ___12_SYM_BKL_1_BP___ ___6SYMBOLS_BEAKL_L1_BP___, ___6SYMBOLS_BEAKL_R1_BP___
469#define ___12_SYM_BKL_2_BP___ ___6SYMBOLS_BEAKL_L2_BP___, ___6SYMBOLS_BEAKL_R2_BP___
470#define ___12_SYM_BKL_3_BP___ ___6SYMBOLS_BEAKL_L3_BP___, ___6SYMBOLS_BEAKL_R3_BP___
471
472#define ___12_SYM_BKL_1___ ___6SYMBOLS_BEAKL_L1___, ___6SYMBOLS_BEAKL_R1___
473#define ___12_SYM_BKL_2___ ___6SYMBOLS_BEAKL_L2___, ___6SYMBOLS_BEAKL_R2___
474#define ___12_SYM_BKL_3___ ___6SYMBOLS_BEAKL_L3___, ___6SYMBOLS_BEAKL_R3___
475
476// Some 12 column rows.
477#define ___12_SYM_BKL_A1_BP___ ___6SYMBOLS_BEAKL_L1a_BP___, ___6SYMBOLS_BEAKL_R1a_BP___
478#define ___12_SYM_BKL_A2_BP___ ___6SYMBOLS_BEAKL_L2a_BP___, ___6SYMBOLS_BEAKL_R2a_BP___
479#define ___12_SYM_BKL_A3_BP___ ___6SYMBOLS_BEAKL_L3a_BP___, ___6SYMBOLS_BEAKL_R3a_BP___
480
481#define ___12_SYM_BKL_A1___ ___6SYMBOLS_BEAKL_L1a___, ___6SYMBOLS_BEAKL_R1a___
482#define ___12_SYM_BKL_A2___ ___6SYMBOLS_BEAKL_L2a___, ___6SYMBOLS_BEAKL_R2a___
483#define ___12_SYM_BKL_A3___ ___6SYMBOLS_BEAKL_L3a___, ___6SYMBOLS_BEAKL_R3a___
484
485#define ___12_SYM_BKL_B1_BP___ ___6SYMBOLS_BEAKL_L1b_BP___, ___6SYMBOLS_BEAKL_R1b_BP___
486#define ___12_SYM_BKL_B2_BP___ ___6SYMBOLS_BEAKL_L2b_BP___, ___6SYMBOLS_BEAKL_R2b_BP___
487#define ___12_SYM_BKL_B3_BP___ ___6SYMBOLS_BEAKL_L3b_BP___, ___6SYMBOLS_BEAKL_R3b_BP___
488
489#define ___12_SYM_BKL_B1___ ___6SYMBOLS_BEAKL_L1b___, ___6SYMBOLS_BEAKL_R1b___
490#define ___12_SYM_BKL_B2___ ___6SYMBOLS_BEAKL_L2b___, ___6SYMBOLS_BEAKL_R2b___
491#define ___12_SYM_BKL_B3___ ___6SYMBOLS_BEAKL_L3b___, ___6SYMBOLS_BEAKL_R3b___
492
493/********************************************************************************/
494/* The BEAKL and BEAKL-A SYMBOL LAYER Chunks */
495/********************************************************************************/
496// The Official beakl symbol layer as a chunk, Bepo and Qwerty
497#define ___SYMB_BEAKL_BP_3x12___ ___12_SYM_BKL_1_BP___, \
498 ___12_SYM_BKL_2_BP___, \
499 ___12_SYM_BKL_3_BP___
500
501#define ___SYMB_BEAKL_3x12___ ___12_SYM_BKL_1___, \
502 ___12_SYM_BKL_2___, \
503 ___12_SYM_BKL_3___
504
505// Alternate Beakle symbol layer with additional corner symbols.
506#define ___SYMB_BEAKLA_BP_3x12___ ___12_SYM_BKL_A1_BP___, \
507 ___12_SYM_BKL_A2_BP___, \
508 ___12_SYM_BKL_A3_BP___
509
510#define ___SYMB_BEAKLA_3x12___ ___12_SYM_BKL_A1___, \
511 ___12_SYM_BKL_A2___, \
512 ___12_SYM_BKL_A3___
513
514#define ___SYMB_BEAKLB_BP_3x12___ ___12_SYM_BKL_B1_BP___, \
515 ___12_SYM_BKL_B2_BP___, \
516 ___12_SYM_BKL_B3_BP___
517
518#define ___SYMB_BEAKLB_3x12___ ___12_SYM_BKL_B1___, \
519 ___12_SYM_BKL_B2___, \
520 ___12_SYM_BKL_B3___
521
522/********************************************************************************/
523/* NAVIGATION - MOUSE, Scroll, Buttons, Arrows, Tab, Home, page up/down, End */
524/* Navigation layers: */
525/* 3 row Layer */
526/* 4 Row Layer with repeated and swapped VI arrows, and Scroll wheel. */
527/********************************************************************************/
528/* */
529/* Navigation layer with optional 4th Row.... */
530/* */
531/* M = Mouse */
532/* B = Button */
533/* W = Wheel */
534/* AC = Acceleration */
535/* CCCV = Tap -> Ctrl-C, hold for double tap duration -> Ctrl-V */
536/* CTCN = Tap -> Ctrl-T, hold for double tap duration -> Ctrl-N */
537/* CWCQ = Tap -> Ctrl-W, hold for double tap duration -> Ctrl-Q */
538/* TAB = Tap -> Tab, Double-tap -> Back Tab */
539/* HOME = Tap -> Home, Double-tap -> End */
540/* */
541/* MB5 MB4 MB3 MB2 MB1 MAC0 | CTCN MB1 MB2 MB3 MB4 MB5 */
542/* TAB MLeft MDown MUp MRight MAC1 | CCCV Left Down UP Right TAB */
543/* WLeft WDown WUp WRight MAC2 | CWCQ HOME PGDN PGUP END */
544/* */
545/* Left Down Up Right CCCV | CCCV MLeft MDown MUp MRight */
546/* */
547/********************************************************************************/
548
549#define ___MOUSE_LDUR___ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R
550#define ___MWHEEL_LDUR___ KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R
551// really BTN 1, 2, 3, 8, 9 - according to xev.
552#define ___MOUSE_BTNS_R___ KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN5
553// really BTN 9, 8, 3, 2, 1 - according to xev
554#define ___MOUSE_BTNS_L___ KC_BTN5, KC_BTN4, KC_BTN2, KC_BTN3, KC_BTN1
555#define ___MOUSE_ACCL_012___ KC_ACL0, KC_ACL1, KC_ACL2
556#define ___MACCL___ ___MOUSE_ACCL_012___
557
558
559#define ___VI_ARROWS___ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
560#define ___HOME_PGDN_PGUP_END___ KC_HOME, KC_PGDN, KC_PGUP, KC_END
561
562#define ___6NAV_L_1___ ___MOUSE_BTNS_L___, KC_ACL0
563#define ___6NAV_L_2___ TAB_BKTAB, ___MOUSE_LDUR___, KC_ACL1
564#define ___6NAV_L_3___ ___, ___MWHEEL_LDUR___, KC_ACL2
565#define ___6NAV_L_4___ ___, ___VI_ARROWS___, KC_CCCV
566
567#define ___6NAV_R_1___ KC_CTCN, ___MOUSE_BTNS_R___
568#define ___6NAV_R_2___ KC_CCCV, ___VI_ARROWS___, TAB_BKTAB
569#define ___6NAV_R_3___ KC_CWCQ, ___HOME_PGDN_PGUP_END___, ___
570#define ___6NAV_R_4___ KC_CCCV, ___MOUSE_LDUR___, ___
571
572 // compact. Initially for corne. So 3x12 per layer.
573#define ___12_NAV_1___ ___6NAV_L_1___, ___6NAV_R_1___
574#define ___12_NAV_2___ ___6NAV_L_2___, ___6NAV_R_2___
575#define ___12_NAV_3___ ___6NAV_L_3___, ___6NAV_R_3___
576
577#define ___12_NAV_4___ ___6NAV_L_4___, ___6NAV_R_4___
578
579/********************************************************************************/
580/* The Navigation LAYER Chunks */
581/********************************************************************************/
582// A Navigation Layer
583#define ___NAV_3x12___ ___12_NAV_1___, ___12_NAV_2___, ___12_NAV_3___
584#define ___NAV_4x12___ ___NAV_3x12___, ___12_NAV_4___
585
586
587/********************************************************************************/
588/* MEDIA - Mute, Vol, play, pause, stop, next, prev, etc. */
589/********************************************************************************/
590#define ___PRV_PLAY_NXT_STOP___ KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP
591#define ___VDN_MUTE_VUP___ KC_VOLD, KC_MUTE, KC_VOLU
592
593#define ___MUTE_PRV_PLAY_NXT_STOP___ KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP
594#define ___MUTE_PLAY_STOP___ KC_MUTE, KC_MPLY, KC_MSTP
595
596
597/********************************************************************************/
598/* RGB - Control those lights. */
599
600/* ___, HUE SAT_INT MOD (UP), | */
601/* ___, HUE SAT INT MOD (DOWN), RGB_TOG | P_B_R_SW_SN___, ___ */
602/* ___6___, | ___, ___RGB_KXGT___, ___ */
603/********************************************************************************/
604// RGB FUNCTION Keysets
605// RGB row for the _FN layer from the redo of the default keymap.c
606#define ___RGB_HUE_SAT_INT_UP___ RGB_HUI, RGB_SAI, RGB_VAI, RGB_RMOD
607#define ___RGB_HUE_SAT_INT_DN___ RGB_HUD, RGB_SAD, RGB_VAD, RGB_MOD
608#define ___RGB_MODE_PRV_NXT___ RGB_RMOD, RGB_MOD
609#define ___RGB_TOGGLE___ RGB_TOG
610#define ___RGB_P_B_R_SW_SN___ RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN
611#define ___RGB_KXGT___ RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T
612
613/// An RGB Layer
614#define ___12_RGB_1___ ___, ___RGB_HUE_SAT_INT_UP___, ___, ___6___
615#define ___12_RGB_2___ ___, ___RGB_HUE_SAT_INT_DN___, RGB_TOG, ___RGB_P_B_R_SW_SN___, ___
616#define ___12_RGB_3___ ___6___, ___, ___RGB_KXGT___, ___
617
618/********************************************************************************/
619/* The RGB LAYER Chunk */
620/********************************************************************************/
621#define ___RGB_3x12___ ___12_RGB_1___, ___12_RGB_2___, ___12_RGB_3___
622
623
624/********************************************************************************/
625/* ADJUST - Miscellaneous Melange. */
626/********************************************************************************/
627// For an Adjust layer. Like RBB with audio, flash, etc.
628#define ___6_ADJUST_L1___ KC_MAKE, ___RGB_HUE_SAT_INT_UP___, RGB_TOG
629#define ___6_ADJUST_L2___ VRSN, MU_TOG, CK_TOGG, AU_ON, AU_OFF, CG_NORM
630#define ___6_ADJUST_L3___ MG_NKRO, ___RGB_HUE_SAT_INT_DN___, KC_RGB_T
631
632#define ___6_ADJUST_R1___ ___5___, KC_RESET
633#define ___6_ADJUST_R2___ ___, ___PRV_PLAY_NXT_STOP___, EEP_RST
634#define ___6_ADJUST_R3___ MG_NKRO, ___VDN_MUTE_VUP___, ___, RGB_IDL
635
636/********************************************************************************/
637/* The Adjust LAYER Chunks */
638/********************************************************************************/
639#define ___ADJUST_3x12___ ___6_ADJUST_L1___, ___6_ADJUST_R1___, \
640 ___6_ADJUST_L2___, ___6_ADJUST_R2___, \
641 ___6_ADJUST_L3___, ___6_ADJUST_R3___
642
643
644/********************************************************************************/
645/* LAYERS - Define a base layer, switch to any layer. Get around. Experiment. */
646/* */
647/* Base Layers on the left hand, */
648/* transient layers on the right. Centered on the home region. */
649/* A good place to attach an experimental layer. */
650/* */
651/********************************************************************************/
652// Base Layers
653#define ___5_LAYERS_B1___ ___, KC_BEPO, KC_DVORAK_BP, KC_BEAKL_BP, ___
654#define ___5_LAYERS_B2___ KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_BEAKL, ___
655
656#define ___5_LAYERS_B3___ ___, KC_QWERTY, KC_NORMAN, KC_WORKMAN, ___
657#define ___5_LAYERS_B4___ ___, DF(_MALTRON), DF(_EUCALYN), DF(_CARPLAX), ___
658
659#define ___5_LAYERS_B1b___ DF(_NORMAN), DF(_MALTRON), DF(_CARPLAX), DF(_COLEMAK), ___
660#define ___5_LAYERS_B2b___ DF(_EUCALYN), DF(_WORKMAN), DF(_QWERTY), DF(_DVORAK), ___
661#define ___5_LAYERS_B3b___ ___, DF(_BEAKL), DF(_BEPO), DF(_DVORAK_BP), ___
662
663// transient layers.
664#define ___5_LAYERS_T___ ___, MO(_NAV), MO(_SYMB), MO(_KEYPAD), MO(_TOPROWS)
665#define ___5_LAYERS_T_BP___ ___, MO(_NAV), MO(_SYMB_BP), MO(_KEYPAD_BP), MO(_TOPROWS_BP)
666#define ___5_LAYERS_T_CTL___ ___, MO(_RGB), ___, ___, MO(_ADJUST)
667
668
669/// A Layers Layer
670#define ___12_LAYERS_1___ ___, ___5_LAYERS_B1___, ___5_LAYERS_T_BP___, ___
671#define ___12_LAYERS_2___ ___, ___5_LAYERS_B2___, ___5_LAYERS_T___, ___
672#define ___12_LAYERS_3___ KC_SPACETEST, ___5___, ___5_LAYERS_T_CTL___, ___
673
674/********************************************************************************/
675/* The LAYERS LAYER Chunk */
676/********************************************************************************/
677#define ___LAYERS_3x12___ ___12_LAYERS_1___, ___12_LAYERS_2___, ___12_LAYERS_3___
diff --git a/users/ericgebhart/layouts.h b/users/ericgebhart/layouts.h
new file mode 100644
index 000000000..5ca9b00e6
--- /dev/null
+++ b/users/ericgebhart/layouts.h
@@ -0,0 +1,720 @@
1#pragma once
2/*
3 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#include "core_keysets.h"
20#include "mod_layer.h"
21#include "edge_keys.h"
22
23/******************************************************************/
24/* This is where I put my Keyboard layouts. */
25/* The mod layer can be modified in mod_layer.h */
26/* can be applied here. The physical shape of the keyboard is */
27/* also accounted for here. This makes it very simple to add a */
28/* new keyboard and reuse all of my layouts and layers */
29/* */
30/* With all of that in hand, we then create a LAYOUT wrapper */
31/* macro that takes a list of keys, to create a keyboard matrix */
32/* that fits the keyboard. Simple. */
33/* */
34/* The thumb keys, the bottom rows, etc. */
35/* */
36/* An attempt has been made to adapt the kinesis and ergodox */
37/* Thumb keys to the rectangular shapes of the xd75, viterbi, */
38/* and rebound. */
39/******************************************************************/
40
41/******************************************************************/
42/* * The XD75 is a 5x15 Ortholinear matrix which means it has 3 */
43/* keys inbetween the usual left and right hand keys */
44/* * The Viterbi is a split 5x14 Ortholinear with 2 middle keys. */
45/* * The Ergodox is a split 5x14 Ortholinear with 2 middle keys, */
46/* thumbkeys. It is missing middle keys on (home) row 3. */
47/* * The Corne is a split 3x12 with 6 thumb keys. It has no */
48/* extra middle keys */
49/* */
50/******************************************************************/
51
52
53/******************************************************************/
54/* In all cases these keyboards are defined in a matrix which is */
55/* a set of rows. Maybe like so, or not. */
56/* */
57/* -------------------------|------------------------ */
58/* | Left0 | Numbers L | mid|dle0 | numbers R | Right0 | */
59/* | Left1 | keys0-5 | mid|dle1 | Keys6-10 | Right1 | */
60/* | Left2 | keys11-15 | mid|dle2 | Keys16-20 | Right2 | */
61/* | Left3 | keys20-25 | mid|dle3 | Keys25-30 | Right3 | */
62/* | Row5L | Row5R | */
63/* | ThumbsL | ThumbsR | */
64/* -------------------------|------------------------ */
65
66/* Generally speaking, the keys on the right and left don't change. */
67/* Neither does the bottom row or the thumbs. Frequently the numbers */
68/* row is identical across layers. Mostly, we want our Base layers to */
69/* be predctable. */
70
71
72// Since our quirky block definitions are basically a list of comma separated
73// arguments, we need a wrapper in order for these definitions to be
74// expanded before being used as arguments to the LAYOUT_xxx macro.
75#if (!defined(LAYOUT) && defined(KEYMAP))
76#define LAYOUT KEYMAP
77#endif
78
79// every keyboard has it's Layout. We start there and make a var args
80// out of it.
81
82#define LVARG_ergodox(...) LAYOUT_ergodox(__VA_ARGS__)
83#define LVARG_edox(...) LAYOUT_ergodox_pretty(__VA_ARGS__)
84#define LAYOUT_VARG(...) LAYOUT(__VA_ARGS__)
85#define LAYOUT_PVARG(...) LAYOUT_pretty(__VA_ARGS__)
86
87#define LVARG_4x12(...) LAYOUT_ortho_4x12(__VA_ARGS__)
88#define LVARG_5x12(...) LAYOUT_ortho_5x12(__VA_ARGS__)
89#define LVARG_5x14(...) LAYOUT_ortho_5x14(__VA_ARGS__)
90#define LVARG_5x15(...) LAYOUT_ortho_5x15(__VA_ARGS__)
91
92/*
93 | Left | Numbers L | middle | numbers R | Right |
94 | Left | keys0-5 | middle | Keys6-10 | Right |
95 | Left | keys11-15 | middle | Keys16-20 | Right |
96 | Left | keys20-25 | middle | Keys25-30 | Right |
97 |Row5L Row5R |
98 |ThumbsL ThumbsR |
99*/
100
101/* Assuming that left, midddle, right, row5, and thumbs stay the same, */
102/* numbers, no numbers, numbers never change, whatever. */
103/* we can have a layout macro that takes a nice rectangle of keys. */
104
105/* Actually, because of Bepo, each keyboard currently requires four of */
106/* these macros. One for Qwerty, One for foreign layouts on bepo like */
107/* dvorak and beakl on bepo instead of on Qwerty. Then another for the Bepo */
108/* layout because unlike the rest of the layouts Bepo doesn't fit in */
109/* 3x10. It wants 3x12. So there are potentially 4 macros per keyboard here. */
110/* XXXX_base, XXXX_base_bepo, XXXX_base_bepo6, The 4th macro */
111/* is XXXXX_transient and generally works for all other */
112/* non base layers. */
113/* The base and transient versions are all that is necessary, if bepo is */
114/* not needed. */
115
116
117/* All layouts are relatively simple to make. */
118/* The ROW macros add a universal mod layer so that mods can be defined once */
119/* and used everywhere. No matter the keymap or layer. this allows actual maps */
120/* like dvorak, qwerty, colemak, beakl, etc., to be defined simply. */
121
122
123/* Additional, more complicated layouts can be found here.*/
124/* examples can be found in crkbd/keymaps/ericgebhart */
125/* examples can be found in kinesis/keymaps/ericgebhart */
126/* examples can be found in ergodox/keymaps/ericgebhart */
127/* examples can be found in montsinger/rebound/rev4/keymaps/ericgebhart */
128
129
130
131/********************************************************************/
132/* xiudi/xd75 - Ortholinear 5x15 */
133/********************************************************************/
134/// These first two base layout templates take sets of 5 keys, left and right.
135// Using 4 sets allows for changing the number row if you have one.
136// if you never change the number row, then use 3 sets of left and right.
137// and define the number row here.
138#define LAYOUT_5x15_base( \
139 K01, K02, K03, K04, K05, \
140 K06, K07, K08, K09, K0A, \
141 K11, K12, K13, K14, K15, \
142 K16, K17, K18, K19, K1A, \
143 K21, K22, K23, K24, K25, \
144 K26, K27, K28, K29, K2A, \
145 K31, K32, K33, K34, K35, \
146 K36, K37, K38, K39, K3A) \
147 LVARG_5x15( \
148 ROW0_LEFT(K01, K02, K03, K04, K05), \
149 ___3_MIDDLE_T___, \
150 ROW0_RIGHT(K06, K07, K08, K09, K0A), \
151 \
152 ROW1_LEFT(K11, K12, K13, K14, K15), \
153 ___3_MIDDLE_1___, \
154 ROW1_RIGHT(K16, K17, K18, K19, K1A), \
155 \
156 ROW2_LEFT(K21, K22, K23, K24, K25), \
157 ___3_MIDDLE_2___, \
158 ROW2_RIGHT(K26, K27, K28, K29, K2A), \
159 \
160 ROW3_LEFT(K31, K32, K33, K34, K35), \
161 ___3_MIDDLE_3___, \
162 ROW3_RIGHT(K36, K37, K38, K39, K3A), \
163 ___15_BOTTOM___ \
164 )
165
166#define LAYOUT_5x15_base_bepo( \
167 K01, K02, K03, K04, K05, \
168 K06, K07, K08, K09, K0A, \
169 K11, K12, K13, K14, K15, \
170 K16, K17, K18, K19, K1A, \
171 K21, K22, K23, K24, K25, \
172 K26, K27, K28, K29, K2A, \
173 K31, K32, K33, K34, K35, \
174 K36, K37, K38, K39, K3A) \
175 LVARG_5x15( \
176 ROW0_LEFT_BP(K01, K02, K03, K04, K05), \
177 ___3_MIDDLE_T___, \
178 ROW0_RIGHT_BP(K06, K07, K08, K09, K0A), \
179 \
180 ROW1_LEFT_BP(K11, K12, K13, K14, K15), \
181 ___3_MIDDLE_1_BP___, \
182 ROW1_RIGHT_BP(K16, K17, K18, K19, K1A), \
183 \
184 ROW2_LEFT_BP(K21, K22, K23, K24, K25), \
185 ___3_MIDDLE_2_BP___, \
186 ROW2_RIGHT_BP(K26, K27, K28, K29, K2A), \
187 \
188 ROW3_LEFT_BP(K31, K32, K33, K34, K35), \
189 ___3_MIDDLE_3_BP___, \
190 ROW3_RIGHT_BP(K36, K37, K38, K39, K3A), \
191 ___15_BOTTOM_BP___ \
192 )
193
194// Just for bepo because it's a 3x6 matrix on each side.
195// So 3 pairs of 6 keys, left and right.
196#define Layout_5x15_base_bepo6( \
197 K01, K02, K03, K04, K05, K06, \
198 K07, K08, K09, K0A, K0B, K0C, \
199 K11, K12, K13, K14, K15, K16, \
200 K17, K18, K19, K1A, K1B, K1C, \
201 K21, K22, K23, K24, K25, K26, \
202 K27, K28, K29, K2A, K2B, K2C \
203 ) \
204 LVARG_5x15( \
205 ___15_B_SYMB___, \
206 ROW1_LEFT_BP6(K01, K02, K03, K04, K05, K06), \
207 ___3_MIDDLE_1_BP___, \
208 ROW1_RIGHT_BP6(K07, K08, K09, K0A, K0B, K0C), \
209 \
210 ROW2_LEFT_BP6(K11, K12, K13, K14, K15, K16), \
211 ___3_MIDDLE_2___, \
212 ROW2_RIGHT_BP6(K17, K18, K19, K1A, K1B, K1C), \
213 \
214 ROW3_LEFT_BP6(K21, K22, K23, K24, K25, K26), \
215 ___3_MIDDLE_3___, \
216 ROW3_RIGHT_BP6(K27, K28, K29, K2A, K2B, K2C), \
217 ___15_BOTTOM_BP___ \
218 )
219
220 // 4 rows of 12. 3 columns transparent in the middle.
221#define LAYOUT_5x15_transient( \
222 K01, K02, K03, K04, K05, K06, \
223 K07, K08, K09, K0A, K0B, K0C, \
224 K11, K12, K13, K14, K15, K16, \
225 K17, K18, K19, K1A, K1B, K1C, \
226 K21, K22, K23, K24, K25, K26, \
227 K27, K28, K29, K2A, K2B, K2C, \
228 K31, K32, K33, K34, K35, K36, \
229 K37, K38, K39, K3A, K3B, K3C \
230 ) \
231 LVARG_5x15( \
232 K01, K02, K03, K04, K05, K06, \
233 ___3___, \
234 K07, K08, K09, K0A, K0B, K0C, \
235 K11, K12, K13, K14, K15, K16, \
236 ___3___, \
237 K17, K18, K19, K1A, K1B, K1C, \
238 K21, K22, K23, K24, K25, K26, \
239 ___3___, \
240 K27, K28, K29, K2A, K2B, K2C, \
241 K31, K32, K33, K34, K35, K36, \
242 ___3___, \
243 K37, K38, K39, K3A, K3B, K3C, \
244 ___15___) \
245
246#define BASE_5x15(...) LAYOUT_5x15_base(__VA_ARGS__)
247#define BASE_5x15_bepo(...) LAYOUT_5x15_base_bepo(__VA_ARGS__)
248#define BASE_5x15_bepo6(...) LAYOUT_5x15_base_bepo6(__VA_ARGS__)
249#define TRANSIENT_5x15(...) LAYOUT_5x15_transient(__VA_ARGS__)
250
251/********************************************************************/
252
253
254/********************************************************************/
255/* viterbi - Ortholinear 5x14 */
256/********************************************************************/
257#define LAYOUT_5x14_base( \
258 K01, K02, K03, K04, K05, \
259 K06, K07, K08, K09, K0A, \
260 K11, K12, K13, K14, K15, \
261 K16, K17, K18, K19, K1A, \
262 K21, K22, K23, K24, K25, \
263 K26, K27, K28, K29, K2A, \
264 K31, K32, K33, K34, K35, \
265 K36, K37, K38, K39, K3A) \
266 LVARG_5x14( \
267 ROW0_LEFT(K01, K02, K03, K04, K05), \
268 ___2_MIDDLE_T___, \
269 ROW0_RIGHT(K06, K07, K08, K09, K0A), \
270 \
271 ROW1_LEFT(K11, K12, K13, K14, K15), \
272 ___2_MIDDLE_1___, \
273 ROW1_RIGHT(K16, K17, K18, K19, K1A), \
274 \
275 ROW2_LEFT(K21, K22, K23, K24, K25), \
276 ___2_MIDDLE_2___, \
277 ROW2_RIGHT(K26, K27, K28, K29, K2A), \
278 \
279 ROW3_LEFT(K31, K32, K33, K34, K35), \
280 ___2_MIDDLE_3___, \
281 ROW3_RIGHT(K36, K37, K38, K39, K3A), \
282 ___14_BOTTOM___ \
283 )
284
285#define LAYOUT_5x14_base_bepo( \
286 K01, K02, K03, K04, K05, \
287 K06, K07, K08, K09, K0A, \
288 K11, K12, K13, K14, K15, \
289 K16, K17, K18, K19, K1A, \
290 K21, K22, K23, K24, K25, \
291 K26, K27, K28, K29, K2A, \
292 K31, K32, K33, K34, K35, \
293 K36, K37, K38, K39, K3A) \
294 LVARG_5x14( \
295 ROW0_LEFT_BP(K01, K02, K03, K04, K05), \
296 ___2_MIDDLE_T___, \
297 ROW0_RIGHT_BP(K06, K07, K08, K09, K0A), \
298 \
299 ROW1_LEFT_BP(K11, K12, K13, K14, K15), \
300 ___2_MIDDLE_1_BP___, \
301 ROW1_RIGHT_BP(K16, K17, K18, K19, K1A), \
302 \
303 ROW2_LEFT_BP(K21, K22, K23, K24, K25), \
304 ___2_MIDDLE_2_BP___, \
305 ROW2_RIGHT_BP(K26, K27, K28, K29, K2A), \
306 \
307 ROW3_LEFT_BP(K31, K32, K33, K34, K35), \
308 ___2_MIDDLE_3_BP___, \
309 ROW3_RIGHT_BP(K36, K37, K38, K39, K3A), \
310 ___14_BOTTOM_BP___ \
311 )
312
313 // Just for bepo because it's a 3x6 matrix on each side.
314// So 3 pairs of 6 keys, left and right.
315#define LAYOUT_5x14_base_bepo6( \
316 K01, K02, K03, K04, K05, K06, \
317 K07, K08, K09, K0A, K0B, K0C, \
318 K11, K12, K13, K14, K15, K16, \
319 K17, K18, K19, K1A, K1B, K1C, \
320 K21, K22, K23, K24, K25, K26, \
321 K27, K28, K29, K2A, K2B, K2C \
322 ) \
323 LVARG_5x14( \
324 ___14_B_SYMB___, \
325 ROW1_LEFT_BP6(K01, K02, K03, K04, K05, K06), \
326 ___2_MIDDLE_1_BP___, \
327 ROW1_RIGHT_BP6(K07, K08, K09, K0A, K0B, K0C), \
328 \
329 ROW2_LEFT_BP6(K11, K12, K13, K14, K15, K16), \
330 ___2_MIDDLE_2___, \
331 ROW2_RIGHT_BP6(K17, K18, K19, K1A, K1B, K1C), \
332 \
333 ROW3_LEFT_BP6(K21, K22, K23, K24, K25, K26), \
334 ___2_MIDDLE_3___, \
335 ROW3_RIGHT_BP6(K27, K28, K29, K2A, K2B, K2C), \
336 ___14_BOTTOM_BP___ \
337 )
338
339// 4 rows of 12. 2 columns transparent in the middle.
340#define LAYOUT_5x14_transient( \
341 K01, K02, K03, K04, K05, K06, \
342 K07, K08, K09, K0A, K0B, K0C, \
343 K11, K12, K13, K14, K15, K16, \
344 K17, K18, K19, K1A, K1B, K1C, \
345 K21, K22, K23, K24, K25, K26, \
346 K27, K28, K29, K2A, K2B, K2C, \
347 K31, K32, K33, K34, K35, K36, \
348 K37, K38, K39, K3A, K3B, K3C \
349 ) \
350 LVARG_5x14( \
351 K01, K02, K03, K04, K05, K06, \
352 ___2___, \
353 K07, K08, K09, K0A, K0B, K0C, \
354 K11, K12, K13, K14, K15, K16, \
355 ___2___, \
356 K17, K18, K19, K1A, K1B, K1C, \
357 K21, K22, K23, K24, K25, K26, \
358 ___2___, \
359 K27, K28, K29, K2A, K2B, K2C, \
360 K31, K32, K33, K34, K35, K36, \
361 ___2___, \
362 K37, K38, K39, K3A, K3B, K3C, \
363 ___14___ \
364 ) \
365
366#define BASE_5x14(...) LAYOUT_5x14_base(__VA_ARGS__)
367#define BASE_5x14_bepo(...) LAYOUT_5x14_base_bepo(__VA_ARGS__)
368#define BASE_5x14_bepo6(...) LAYOUT_5x14_base_bepo6(__VA_ARGS__)
369#define TRANSIENT_5x14(...) LAYOUT_5x14_transient(__VA_ARGS__)
370
371/********************************************************************/
372/* Ortholinear 4x12 */
373/********************************************************************/
374#define LAYOUT_4x12_base( \
375 K01, K02, K03, K04, K05, \
376 K06, K07, K08, K09, K0A, \
377 K11, K12, K13, K14, K15, \
378 K16, K17, K18, K19, K1A, \
379 K21, K22, K23, K24, K25, \
380 K26, K27, K28, K29, K2A \
381 ) \
382 LVARG_4x12( \
383 ROW1_LEFT(K01, K02, K03, K04, K05), \
384 ROW1_RIGHT(K06, K07, K08, K09, K0A), \
385 \
386 ROW2_LEFT(K11, K12, K13, K14, K15), \
387 ROW2_RIGHT(K16, K17, K18, K19, K1A), \
388 \
389 ROW3_LEFT(K21, K22, K23, K24, K25), \
390 ROW3_RIGHT(K26, K27, K28, K29, K2A), \
391 \
392 ___12_BOTTOM___ \
393 )
394
395#define LAYOUT_4x12_base_bepo( \
396 K01, K02, K03, K04, K05, \
397 K06, K07, K08, K09, K0A, \
398 K11, K12, K13, K14, K15, \
399 K16, K17, K18, K19, K1A, \
400 K21, K22, K23, K24, K25, \
401 K26, K27, K28, K29, K2A \
402 ) \
403 LVARG_4x12( \
404 ROW1_LEFT_BP(K01, K02, K03, K04, K05), \
405 ROW1_RIGHT_BP(K06, K07, K08, K09, K0A), \
406 \
407 ROW2_LEFT_BP(K11, K12, K13, K14, K15), \
408 ROW2_RIGHT_BP(K16, K17, K18, K19, K1A), \
409 \
410 ROW3_LEFT_BP(K21, K22, K23, K24, K25), \
411 ROW3_RIGHT_BP(K26, K27, K28, K29, K2A), \
412 \
413 ___12_BOTTOM_BP___ \
414 )
415
416 // Just for bepo because it's a 3x6 matrix on each side.
417 // So 3 pairs of 6 keys, left and right.
418#define Layout_4x12_base_bepo6( \
419 K01, K02, K03, K04, K05, K06, \
420 K07, K08, K09, K0A, K0B, K0C, \
421 K11, K12, K13, K14, K15, K16, \
422 K17, K18, K19, K1A, K1B, K1C, \
423 K21, K22, K23, K24, K25, K26, \
424 K27, K28, K29, K2A, K2B, K2C \
425 ) \
426 LVARG_4x12( \
427 ROW1_LEFT_BP6(K01, K02, K03, K04, K05, K06), \
428 ROW1_RIGHT_BP6(K07, K08, K09, K0A, K0B, K0C), \
429 \
430 ROW2_LEFT_BP6(K11, K12, K13, K14, K15, K16), \
431 ROW2_RIGHT_BP6(K17, K18, K19, K1A, K1B, K1C), \
432 \
433 ROW3_LEFT_BP6(K21, K22, K23, K24, K25, K26), \
434 ROW3_RIGHT_BP6(K27, K28, K29, K2A, K2B, K2C), \
435 ___12_BOTTOM_BP___ \
436 )
437
438// takes 3 makes 4 rows of 12.
439#define LAYOUT_4x12_transient( \
440 K01, K02, K03, K04, K05, K06, \
441 K07, K08, K09, K0A, K0B, K0C, \
442 K11, K12, K13, K14, K15, K16, \
443 K17, K18, K19, K1A, K1B, K1C, \
444 K21, K22, K23, K24, K25, K26, \
445 K27, K28, K29, K2A, K2B, K2C \
446 ) \
447 LVARG_4x12( \
448 K01, K02, K03, K04, K05, K06, \
449 K07, K08, K09, K0A, K0B, K0C, \
450 K11, K12, K13, K14, K15, K16, \
451 K17, K18, K19, K1A, K1B, K1C, \
452 K21, K22, K23, K24, K25, K26, \
453 K27, K28, K29, K2A, K2B, K2C, \
454 ___12___) \
455
456#define BASE_4x12(...) LAYOUT_4x12_base(__VA_ARGS__)
457#define BASE_4x12_bepo(...) LAYOUT_4x12_base_bepo(__VA_ARGS__)
458#define BASE_4x12_bepo6(...) LAYOUT_4x12_base_bepo6(__VA_ARGS__)
459#define TRANSIENT_4x12(...) LAYOUT_4x12_transient(__VA_ARGS__)
460
461/********************************************************************/
462/* CRKBD Corne */
463/* The Corne has 3x6 matrix on both sides with 6 thumbs total */
464/* This Macro takes 2x3x5 and gives it pinkies, and thumbs. */
465/* Arg chunks are in the middle with the passthrough modifiers as */
466/* needed. Sama Sama apres cette fois. */
467/********************************************************************/
468#define Base_3x6_3( \
469 K01, K02, K03, K04, K05, \
470 K06, K07, K08, K09, K0A, \
471 K11, K12, K13, K14, K15, \
472 K16, K17, K18, K19, K1A, \
473 K21, K22, K23, K24, K25, \
474 K26, K27, K28, K29, K2A) \
475 LAYOUT_VARG( \
476 ROW1_LEFT(K01, K02, K03, K04, K05), \
477 ROW1_RIGHT(K06, K07, K08, K09, K0A), \
478 \
479 ROW2_LEFT(K11, K12, K13, K14, K15), \
480 ROW2_RIGHT(K16, K17, K18, K19, K1A), \
481 \
482 ROW3_LEFT(K21, K22, K23, K24, K25), \
483 ROW3_RIGHT(K26, K27, K28, K29, K2A), \
484 ___6_ERGO_THUMBS___ \
485 )
486
487// So we can have different transient layers for symbols and numbers on bepo.
488// for layouts like dvorak on bepo.
489#define Base_bepo_3x6_3( \
490 K01, K02, K03, K04, K05, \
491 K06, K07, K08, K09, K0A, \
492 K11, K12, K13, K14, K15, \
493 K16, K17, K18, K19, K1A, \
494 K21, K22, K23, K24, K25, \
495 K26, K27, K28, K29, K2A \
496 ) \
497 LAYOUT_VARG( \
498 ROW1_LEFT_BP(K01, K02, K03, K04, K05), \
499 ROW1_RIGHT_BP(K06, K07, K08, K09, K0A), \
500 \
501 ROW2_LEFT_BP(K11, K12, K13, K14, K15), \
502 ROW2_RIGHT_BP(K16, K17, K18, K19, K1A), \
503 \
504 ROW3_LEFT_BP(K21, K22, K23, K24, K25), \
505 ROW3_RIGHT_BP(K26, K27, K28, K29, K2A), \
506 ___6_ERGO_THUMBS_BP___ \
507 )
508
509// No room for pinkies.
510// Just for bepo because it's a 3x6 matrix on each side.
511// So 3 pairs of 6 keys, And we lose our left and right.
512// Except it keeps the layer toggles along with the keycode
513// on the bottom.
514#define Base_bepo6_3x6_3( \
515 K01, K02, K03, K04, K05, K06, \
516 K07, K08, K09, K0A, K0B, K0C, \
517 K11, K12, K13, K14, K15, K16, \
518 K17, K18, K19, K1A, K1B, K1C, \
519 K21, K22, K23, K24, K25, K26, \
520 K27, K28, K29, K2A, K2B, K2C \
521 ) \
522 LAYOUT_VARG( \
523 ROW1_LEFT_BP6(K01, K02, K03, K04, K05, K06), \
524 ROW1_RIGHT_BP6(K07, K08, K09, K0A, K0B, K0C), \
525 \
526 ROW2_LEFT_BP6(K11, K12, K13, K14, K15, K16), \
527 ROW2_RIGHT_BP6(K17, K18, K19, K1A, K1B, K1C), \
528 \
529 ROW3_LEFT_BP6(K21, K22, K23, K24, K25, K26), \
530 ROW3_RIGHT_BP6(K27, K28, K29, K2A, K2B, K2C), \
531 ___6_ERGO_THUMBS_BP___ \
532 )
533
534// All we really need is to add the see through thumbs to the end.
535#define Transient6_3x6_3( \
536 K01, K02, K03, K04, K05, K06, \
537 K07, K08, K09, K0A, K0B, K0C, \
538 K11, K12, K13, K14, K15, K16, \
539 K17, K18, K19, K1A, K1B, K1C, \
540 K21, K22, K23, K24, K25, K26, \
541 K27, K28, K29, K2A, K2B, K2C \
542 ) \
543 LAYOUT_VARG( \
544 K01, K02, K03, K04, K05, K06, \
545 K07, K08, K09, K0A, K0B, K0C, \
546 K11, K12, K13, K14, K15, K16, \
547 K17, K18, K19, K1A, K1B, K1C, \
548 K21, K22, K23, K24, K25, K26, \
549 K27, K28, K29, K2A, K2B, K2C, \
550 ___6___)
551
552//---------------------------------------------------------
553// 3x5
554#define Base_3x5_3( \
555 K01, K02, K03, K04, K05, \
556 K06, K07, K08, K09, K0A, \
557 K11, K12, K13, K14, K15, \
558 K16, K17, K18, K19, K1A, \
559 K21, K22, K23, K24, K25, \
560 K26, K27, K28, K29, K2A) \
561 LAYOUT_VARG( \
562 ROW1_LEFT5(K01, K02, K03, K04, K05), \
563 ROW1_RIGHT5(K06, K07, K08, K09, K0A), \
564 \
565 ROW2_LEFT5(K11, K12, K13, K14, K15), \
566 ROW2_RIGHT5(K16, K17, K18, K19, K1A), \
567 \
568 ROW3_LEFT5(K21, K22, K23, K24, K25), \
569 ROW3_RIGHT5(K26, K27, K28, K29, K2A), \
570 ___6_ERGO_THUMBS___ \
571 )
572
573// So we can have different transient layers for symbols and numbers on bepo.
574// for layouts like dvorak on bepo.
575#define Base_bepo_3x5_3( \
576 K01, K02, K03, K04, K05, \
577 K06, K07, K08, K09, K0A, \
578 K11, K12, K13, K14, K15, \
579 K16, K17, K18, K19, K1A, \
580 K21, K22, K23, K24, K25, \
581 K26, K27, K28, K29, K2A \
582 ) \
583 LAYOUT_VARG( \
584 ROW1_LEFT5_BP(K01, K02, K03, K04, K05), \
585 ROW1_RIGHT5_BP(K06, K07, K08, K09, K0A), \
586 \
587 ROW2_LEFT5_BP(K11, K12, K13, K14, K15), \
588 ROW2_RIGHT5_BP(K16, K17, K18, K19, K1A), \
589 \
590 ROW3_LEFT5_BP(K21, K22, K23, K24, K25), \
591 ROW3_RIGHT5_BP(K26, K27, K28, K29, K2A), \
592 ___6_ERGO_THUMBS_BP___ \
593 )
594
595// All we really need is to add the see through thumbs to the end.
596#define Transient5_3x5_3( \
597 K01, K02, K03, K04, K05, \
598 K07, K08, K09, K0A, K0B, \
599 K11, K12, K13, K14, K15, \
600 K17, K18, K19, K1A, K1B, \
601 K21, K22, K23, K24, K25, \
602 K27, K28, K29, K2A, K2B \
603 ) \
604 LAYOUT_VARG( \
605 K01, K02, K03, K04, K05, \
606 K07, K08, K09, K0A, K0B, \
607 K11, K12, K13, K14, K15, \
608 K17, K18, K19, K1A, K1B, \
609 K21, K22, K23, K24, K25, \
610 K27, K28, K29, K2A, K2B, \
611 ___6___)
612
613/********************************************************************/
614/* Kinesis*/
615/********************************************************************/
616// Basically an ergodox ez without the 3 pairs of middle keys.
617// Left, right, bottom, and thumbs all stay the same.
618#define Base_4x6_4_6( \
619 K01, K02, K03, K04, K05, \
620 K06, K07, K08, K09, K0A, \
621 K11, K12, K13, K14, K15, \
622 K16, K17, K18, K19, K1A, \
623 K21, K22, K23, K24, K25, \
624 K26, K27, K28, K29, K2A, \
625 K31, K32, K33, K34, K35, \
626 K36, K37, K38, K39, K3A \
627 ) \
628 LAYOUT_PVARG( \
629 ___KINTFUNC_L___, ___KINTFUNC_R___, \
630 ROW0_LEFT(K01, K02, K03, K04, K05), \
631 ROW0_RIGHT(K06, K07, K08, K09, K0A), \
632 \
633 ROW1_LEFT(K11, K12, K13, K14, K15), \
634 ROW1_RIGHT(K16, K17, K18, K19, K1A), \
635 \
636 ROW2_LEFT(K21, K22, K23, K24, K25), \
637 ROW2_RIGHT(K26, K27, K28, K29, K2A), \
638 \
639 ROW3_LEFT(K31, K32, K33, K34, K35), \
640 ROW3_RIGHT(K36, K37, K38, K39, K3A), \
641 ___4_BOTTOM_LEFT___, ___4_BOTTOM_RIGHT___, \
642 ___12_DOX_ALL_THUMBS___ \
643 )
644
645#define Base_bepo_4x6_4_6( \
646 K01, K02, K03, K04, K05, \
647 K06, K07, K08, K09, K0A, \
648 K11, K12, K13, K14, K15, \
649 K16, K17, K18, K19, K1A, \
650 K21, K22, K23, K24, K25, \
651 K26, K27, K28, K29, K2A, \
652 K31, K32, K33, K34, K35, \
653 K36, K37, K38, K39, K3A \
654 ) \
655 LAYOUT_PVARG( \
656 ___KINTFUNC_L___, ___KINTFUNC_R___, \
657 ROW0_LEFT(K01, K02, K03, K04, K05), \
658 ROW0_RIGHT(K06, K07, K08, K09, K0A), \
659 \
660 ROW1_LEFT(K11, K12, K13, K14, K15), \
661 ROW1_RIGHT(K16, K17, K18, K19, K1A), \
662 \
663 ROW2_LEFT(K21, K22, K23, K24, K25), \
664 ROW2_RIGHT(K26, K27, K28, K29, K2A), \
665 \
666 ROW3_LEFT(K31, K32, K33, K34, K35), \
667 ROW3_RIGHT(K36, K37, K38, K39, K3A), \
668 ___4_BOTTOM_LEFT___, ___4_BOTTOM_RIGHT___, \
669 ___12_DOX_ALL_THUMBS_BP___ \
670 )
671
672
673// So 3 pairs of 6 keys, left and right.
674#define Base_bepo6_4x6_4_6( \
675 K01, K02, K03, K04, K05, K06, \
676 K07, K08, K09, K0A, K0B, K0C, \
677 K11, K12, K13, K14, K15, K16, \
678 K17, K18, K19, K1A, K1B, K1C, \
679 K21, K22, K23, K24, K25, K26, \
680 K27, K28, K29, K2A, K2B, K2C \
681 ) \
682 LAYOUT_PVARG( \
683 ___KINTFUNC_L___, ___KINTFUNC_R___, \
684 ___6SYMBOL_BEPO_L___, \
685 ___6SYMBOL_BEPO_R___, \
686 ROW1_LEFT_BP6(K01, K02, K03, K04, K05, K06), \
687 ROW1_RIGHT_BP6(K07, K08, K09, K0A, K0B, K0C), \
688 \
689 ROW2_LEFT_BP6(K11, K12, K13, K14, K15, K16), \
690 ROW2_RIGHT_BP6(K17, K18, K19, K1A, K1B, K1C), \
691 \
692 ROW3_LEFT_BP6(K21, K22, K23, K24, K25, K26), \
693 ROW3_RIGHT_BP6(K27, K28, K29, K2A, K2B, K2C), \
694 ___4_BOTTOM_LEFT_BP___, ___4_BOTTOM_RIGHT_BP___, \
695 ___12_DOX_ALL_THUMBS_BP___ \
696 )
697
698#define Transient6_4x6_4_6( \
699 K01, K02, K03, K04, K05, K06, \
700 K07, K08, K09, K0A, K0B, K0C, \
701 K11, K12, K13, K14, K15, K16, \
702 K17, K18, K19, K1A, K1B, K1C, \
703 K21, K22, K23, K24, K25, K26, \
704 K27, K28, K29, K2A, K2B, K2C, \
705 K31, K32, K33, K34, K35, K36, \
706 K37, K38, K39, K3A, K3B, K3C \
707 ) \
708 LAYOUT_PVARG( \
709 ___KINTFUNC_L___, ___KINTFUNC_R___, \
710 K01, K02, K03, K04, K05, K06, \
711 K07, K08, K09, K0A, K0B, K0C, \
712 K11, K12, K13, K14, K15, K16, \
713 K17, K18, K19, K1A, K1B, K1C, \
714 K21, K22, K23, K24, K25, K26, \
715 K27, K28, K29, K2A, K2B, K2C, \
716 K31, K32, K33, K34, K35, K36, \
717 K37, K38, K39, K3A, K3B, K3C, \
718 ___4___, ___4___, \
719 ___12___ \
720 )
diff --git a/users/ericgebhart/mod_layer.h b/users/ericgebhart/mod_layer.h
new file mode 100644
index 000000000..a3c64b0bf
--- /dev/null
+++ b/users/ericgebhart/mod_layer.h
@@ -0,0 +1,178 @@
1#pragma once
2
3/*
4 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19// define our rows for the mod layer
20// takes 5 keycodes, adds mods, and left and right
21// so we get keycodes in groups of 6.
22// There are 3 sets of 4 rows.
23// 1 for normal 6 columns, qwerty, dvorak etc.
24// 1 for bepo/normal 6 columns, qwerty, dvorak etc. on bepo.
25// 1 for bepo 6 columns provided instead of a 5, for bepo which needs 3x12.
26// A 5 column keyboard would need another set of MACROS.
27
28// These macros are used in the layout wrapper macros to introduce a mod
29// layer. HomeRow mods and other things like that go here.
30
31
32#include "core_keys.h"
33
34//number row.
35#define ROW0_LEFT(K01, K02, K03, K04, K05) \
36 LEFT0, K01, K02, K03, K04, K05
37
38#define ROW0_RIGHT(K01, K02, K03, K04, K05) \
39 K01, K02, K03, K04, K05, RIGHT0
40
41#define ROW1_LEFT(K01, K02, K03, K04, K05) \
42 LEFT1, K01, K02, K03, LT(_NAV, K04), K05
43
44#define ROW1_RIGHT(K01, K02, K03, K04, K05) \
45 K01, K02, K03, K04, K05, RIGHT1
46
47// home row, shift, alt, ctl, gui - gui, ctl, alt, shift.
48// using MT so we can specify left and right.
49// caps_word needs left and right shift.
50#define ROW2_LEFT(K01, K02, K03, K04, K05) \
51 LEFT2, MT(MOD_LSFT, K01), MT(MOD_LALT, K02), MT(MOD_LCTL, K03), MT(MOD_LGUI, K04), K05
52
53#define ROW2_RIGHT(K01, K02, K03, K04, K05) \
54 K01, MT(MOD_RGUI, K02), MT(MOD_RCTL, K03), MT(MOD_RALT, K04), MT(MOD_RSFT, K05), RIGHT2 \
55
56#define ROW3_LEFT(K01, K02, K03, K04, K05) \
57 LEFT3, K01, LT(_TOPROWS, K02), K03, LT(_SYMB, K04), K05
58
59#define ROW3_RIGHT(K01, K02, K03, K04, K05) \
60 K01, LT(_SYMB, K02), LT(_NAV, K03), LT(_TOPROWS, K04), K05, RIGHT3
61
62
63//-----------------------------------------------y
64// For a 5 column keyboard - no edges added.
65//number row.
66#define ROW0_LEFT5(K01, K02, K03, K04, K05) \
67 K01, K02, K03, K04, K05
68
69#define ROW0_RIGHT5(K01, K02, K03, K04, K05) \
70 K01, K02, K03, K04, K05
71
72#define ROW1_LEFT5(K01, K02, K03, K04, K05) \
73 LT(_LAYERS, K01), K02, LT(_KEYPAD, K03), K04, K05
74
75#define ROW1_RIGHT5(K01, K02, K03, K04, K05) \
76 K01, K02, LT(_KEYPAD, K03), K04, LT(_LAYERS, K05)
77
78// home row, shift, alt, ctl, gui - gui, ctl, alt, shift.
79// using MT so we can specify left and right.
80// caps_word needs left and right shift.
81#define ROW2_LEFT5(K01, K02, K03, K04, K05) \
82 MT(MOD_LSFT, K01), MT(MOD_LALT, K02), MT(MOD_LCTL, K03), MT(MOD_LGUI, K04), K05
83
84#define ROW2_RIGHT5(K01, K02, K03, K04, K05) \
85 K01, MT(MOD_RGUI, K02), MT(MOD_RCTL, K03), MT(MOD_RALT, K04), MT(MOD_RSFT, K05)
86
87#define ROW3_LEFT5(K01, K02, K03, K04, K05) \
88 K01, LT(_TOPROWS, K02), LT(_NAV, K03), LT(_SYMB, K04), K05
89
90#define ROW3_RIGHT5(K01, K02, K03, K04, K05) \
91 K01, LT(_SYMB, K02), LT(_NAV, K03), LT(_TOPROWS, K04), K05
92
93
94//--------------------------------------------
95//bepo
96#define ROW0_LEFT_BP(K01, K02, K03, K04, K05) \
97 LEFT0_BP, K01, K02, K03, K04, K05
98
99#define ROW0_RIGHT_BP(K01, K02, K03, K04, K05) \
100 K01, K02, K03, K04, K05, RIGHT0_BP
101
102#define ROW1_LEFT_BP(K01, K02, K03, K04, K05) \
103 LEFT1_BP, K01, K02, K03, LT(_KEYPAD, K04), K05
104
105#define ROW1_RIGHT_BP(K01, K02, K03, K04, K05) \
106 K01, K02, LT(_KEYPAD, K03), K04, K05, RIGHT1_BP
107
108#define ROW2_LEFT_BP(K01, K02, K03, K04, K05) \
109 LEFT2_BP, MT(MOD_RSFT, K01), MT(MOD_LALT,K02), MT(MOD_RCTL, K03), \
110 MT(MOD_LGUI, K04), K05
111
112#define ROW2_RIGHT_BP(K01, K02, K03, K04, K05) \
113 K01, MT(MOD_RGUI, K02), MT(MOD_RCTL, K03), MT(MOD_RALT, K04), \
114 MT(MOD_RSFT, K05), RIGHT2_BP \
115
116#define ROW3_LEFT_BP(K01, K02, K03, K04, K05) \
117 LEFT3_BP, K01, LT(_SYMB_BP, K02), LT(_NAV, K03), LT(_TOPROWS_BP, K04), K05
118
119#define ROW3_RIGHT_BP(K01, K02, K03, K04, K05) \
120 K01, LT(_SYMB_BP, K02), LT(_NAV, K03), LT(_TOPROWS_BP, K04), K05, RIGHT3_BP
121
122
123//-------------------------------------------------
124//bepo - 6 args, no left or right added.
125#define ROW0_LEFT_BP6(K01, K02, K03, K04, K05, K06) \
126 K01, K02, K03, K04, K05, K06
127
128#define ROW0_RIGHT_BP6(K01, K02, K03, K04, K05, K06 ) \
129 K01, K02, K03, K04, K05, K06
130
131#define ROW1_LEFT_BP6(K01, K02, K03, K04, K05, K06) \
132 K01, K02, K03, K04, K05, K06
133
134#define ROW1_RIGHT_BP6(K01, K02, K03, K04, K05, K06 ) \
135 K01, K02, K03, K04, K05, K06
136
137#define ROW2_LEFT_BP6(K01, K02, K03, K04, K05, K06) \
138 K01, SFT_T(K02), ALT_T(K03), CTL_T(K04), GUI_T(K05), K06
139
140#define ROW2_RIGHT_BP6(K01, K02, K03, K04, K05, K06) \
141 K01, GUI_T(K02), RCTL_T(K03), RALT_T(K04), RSFT_T(K05), K06
142
143#define ROW3_LEFT_BP6(K01, K02, K03, K04, K05, K06) \
144 K01, K02, K03, K04, K05, K06
145
146#define ROW3_RIGHT_BP6(K01, K02, K03, K04, K05, K06 ) \
147 K01, K02, K03, K04, K05, K06
148
149
150//-------------------------------------------------
151// For a 5 column keyboard - no edges added.
152//number row.
153#define ROW0_LEFT5_BP(K01, K02, K03, K04, K05) \
154 K01, K02, K03, K04, K05
155
156#define ROW0_RIGHT5_BP(K01, K02, K03, K04, K05) \
157 K01, K02, K03, K04, K05
158
159#define ROW1_LEFT5_BP(K01, K02, K03, K04, K05) \
160 LT(_LAYERS, K01), K02, K03, LT(_KEYPAD_BP, K04), K05
161
162#define ROW1_RIGHT5_BP(K01, K02, K03, K04, K05) \
163 K01, LT(_KEYPAD_BP, K02), K03, K04, K05
164
165// home row, shift, alt, ctl, gui - gui, ctl, alt, shift.
166// using MT so we can specify left and right.
167// caps_word needs left and right shift.
168#define ROW2_LEFT5_BP(K01, K02, K03, K04, K05) \
169 MT(MOD_LSFT, K01), MT(MOD_LALT, K02), MT(MOD_LCTL, K03), MT(MOD_LGUI, K04), K05
170
171#define ROW2_RIGHT5_BP(K01, K02, K03, K04, K05) \
172 K01, MT(MOD_RGUI, K02), MT(MOD_RCTL, K03), MT(MOD_RALT, K04), MT(MOD_RSFT, K05)
173
174#define ROW3_LEFT5_BP(K01, K02, K03, K04, K05) \
175 K01, LT(_TOPROWS_BP, K02), LT(_NAV, K03), LT(_SYMB_BP, K04), K05
176
177#define ROW3_RIGHT5_BP(K01, K02, K03, K04, K05) \
178 K01, LT(_SYMB_BP, K02), LT(_NAV, K03), LT(_TOPROWS_BP, K04), K05
diff --git a/users/ericgebhart/oled_stuff.c b/users/ericgebhart/oled_stuff.c
new file mode 100755
index 000000000..99a752ec2
--- /dev/null
+++ b/users/ericgebhart/oled_stuff.c
@@ -0,0 +1,303 @@
1/*
2 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include "ericgebhart.h"
18#include <string.h>
19#include <stdio.h>
20
21void oled_render_default_layer_state(void) {
22 oled_write_P(PSTR("Layout: "), false);
23 switch (get_highest_layer(default_layer_state)) {
24 case _QWERTY:
25 oled_write_ln_P(PSTR("Qwerty"), false);
26 break;
27 case _COLEMAK:
28 oled_write_ln_P(PSTR("Colemak"), false);
29 break;
30 case _DVORAK_BP:
31 case _DVORAK:
32 oled_write_ln_P(PSTR("Dvorak"), false);
33 break;
34
35
36 /* case _WORKMAN: */
37 // oled_write_ln_P(PSTR("Workman\n"), false);
38 /* break; */
39 /* case _NORMAN: */
40 // oled_write_ln_P(PSTR("Norman\n"), false);
41 /* break; */
42 /* case _MALTRON: */
43 // oled_write_ln_P(PSTR("Maltron\n"), false);
44 /* break; */
45
46 /* case _EUCALYN: */
47 // oled_write_ln_P(PSTR("Eucalyn\n"), false);
48 /* break; */
49 /* case _CARPLAX: */
50 // oled_write_ln_P(PSTR("Carplax\n"), false);
51 /* break; */
52
53 case _BEAKL:
54 case _BEAKL_BP:
55 oled_write_ln_P(PSTR("Beakl"), false);
56 break;
57 case _BEPO:
58 oled_write_ln_P(PSTR("Bepo"), false);
59 break;
60 }
61}
62
63void oled_render_layer_state(void) {
64 oled_write_P(PSTR("Layer: "), false);
65 switch (get_highest_layer(layer_state)) {
66 case _NAV:
67 oled_write_P(PSTR("Navigation"), false);
68 break;
69 case _LAYERS:
70 oled_write_P(PSTR("Layers"), false);
71 break;
72 case _RGB:
73 oled_write_P(PSTR("RGB"), false);
74 break;
75 case _TOPROWS:
76 case _TOPROWS_BP:
77 oled_write_P(PSTR("TopRows"), false);
78 break;
79 case _SYMB:
80 case _SYMB_BP:
81 oled_write_P(PSTR("Symbols"), false);
82 break;
83 case _KEYPAD:
84 case _KEYPAD_BP:
85 oled_write_P(PSTR("Keypad"), false);
86 break;
87 case _ADJUST:
88 oled_write_P(PSTR("Adjust"), false);
89 break;
90 }
91 oled_write_ln_P(PSTR(" "), false);
92}
93
94// this is part of my answer to a challenge.
95// My friend Ross thinks that the only use of an oled
96// is to say which layer.
97// I think there is more. this is just a beginning.
98void oled_render_layer_map(void) {
99 uint8_t lyr = get_highest_layer(layer_state);
100 if (lyr <= _BEPO) {
101 switch (get_highest_layer(default_layer_state)) {
102 case _QWERTY:
103 oled_write_ln_P(PSTR(" qwert yuiop"), false);
104 oled_write_ln_P(PSTR(" asdfg hjkl;"), false);
105 oled_write_ln_P(PSTR(" zxcvb nm,./"), false);
106 break;
107 case _COLEMAK:
108 oled_write_ln_P(PSTR(" qwfpb jluy;"), false);
109 oled_write_ln_P(PSTR(" arstg mneio"), false);
110 oled_write_ln_P(PSTR(" zxcdv kh,./"), false);
111 break;
112 case _DVORAK_BP:
113 case _DVORAK:
114 oled_write_ln_P(PSTR(" \",.py fgcrl"), false);
115 oled_write_ln_P(PSTR(" aoeui dhtns"), false);
116 oled_write_ln_P(PSTR(" ;qjkx bmwvz "), false);
117 break;
118
119 case _BEAKL:
120 case _BEAKL_BP:
121 oled_write_ln_P(PSTR(" qhoux gcrfz"), false);
122 oled_write_ln_P(PSTR(" yiea. dstnb"), false);
123 oled_write_ln_P(PSTR(" j/,k' wmlpv"), false);
124 break;
125
126 case _BEPO:
127 oled_write_P(PSTR(" cbe'po`e vdljz %"), false);
128 oled_write_P(PSTR(" auie, tsrnmc"), false);
129 oled_write_P(PSTR(" e^a'yx.k 'qghfw"), false);
130 break;
131 }
132
133 } else {
134
135 switch (lyr) {
136 case _TOPROWS:
137 case _TOPROWS_BP:
138 oled_write_ln_P(PSTR(" !@#$% ^&*()"), false);
139 oled_write_ln_P(PSTR(" 40123 76598"), false);
140 oled_write_ln_P(PSTR(" F1- -- -F12"), false);
141 break;
142
143 case _SYMB:
144 case _SYMB_BP:
145 oled_write_ln_P(PSTR(" `<$>' ?[_]-"), false);
146 oled_write_ln_P(PSTR(" -\\(\")# !{:}/;"), false);
147 oled_write_ln_P(PSTR(" @=*+; %&^~|"), false);
148 break;
149
150 case _NAV:
151 oled_write_ln_P(PSTR("54321 0 ctn 12345"), false);
152 oled_write_ln_P(PSTR(" ldur 1 ccv ldur"), false);
153 oled_write_ln_P(PSTR(" ldur 2 cwq hdue"), false);
154 break;
155
156 case _KEYPAD:
157 oled_write_ln_P(PSTR(" 523: F9-F12"), false);
158 oled_write_ln_P(PSTR(" -7.104 F5-F8"), false);
159 oled_write_ln_P(PSTR(" /698, F1-F4"), false);
160 break;
161
162 case _LAYERS:
163 oled_write_ln_P(PSTR(" Bp Dv Bk|Nv S K TR"), false);
164 oled_write_ln_P(PSTR("Q Cl Dv Bk|Nv S K TR"), false);
165 oled_write_P(PSTR(" "), false);
166 //oled_write_ln_P(PSTR("Ctrls?-> RGB ___ ___ Adjust"), false);
167 break;
168 }
169 }
170}
171
172void oled_render_keylock_status(uint8_t led_usb_state) {
173 oled_write_P(PSTR(" Lock:"), false);
174 oled_write_P(PSTR(" "), false);
175 oled_write_P(PSTR("N"), led_usb_state & (1 << USB_LED_NUM_LOCK));
176 oled_write_P(PSTR("C"), led_usb_state & (1 << USB_LED_CAPS_LOCK));
177 oled_write_ln_P(PSTR("S"), led_usb_state & (1 << USB_LED_SCROLL_LOCK));
178}
179
180void oled_render_mod_status(uint8_t modifiers) {
181 oled_write_P(PSTR("Mods:"), false);
182 oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT));
183 oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL));
184 oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT));
185 oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI));
186}
187
188void oled_render_mod_lock_status(){
189 oled_render_mod_status(get_mods() | get_oneshot_mods());
190 oled_render_keylock_status(host_keyboard_leds());
191}
192
193
194char mkeylog_str[22] = {};
195
196const char mcode_to_name[60] = {
197 ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
198 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
199 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
200 '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
201 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
202 '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
203
204
205void oled_render_keylog(void) {
206 oled_write_ln(mkeylog_str, false);
207 // sometimes there's an extra row. this is because sometimes it drops
208 // to the last line. and this clears it.
209 oled_write_ln_P(PSTR(" "), false);
210}
211
212
213void add_keylog(uint16_t keycode, keyrecord_t *record) {
214 char name = ' ';
215 if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) ||
216 (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
217 keycode = keycode & 0xFF;
218 }
219 if (keycode < 60) {
220 name = mcode_to_name[keycode];
221 }
222
223 // update keylog
224 memset(mkeylog_str, ' ', sizeof(mkeylog_str) - 1);
225 snprintf(mkeylog_str, sizeof(mkeylog_str), "%dx%d, k%2d : %c",
226 record->event.key.row, record->event.key.col,
227 keycode, name);
228}
229
230__attribute__((weak)) oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return rotation; }
231
232oled_rotation_t oled_init_user(oled_rotation_t rotation) {
233
234 // for the big screen.
235#ifdef OLED_DISPLAY_128X64
236 return OLED_ROTATION_180;
237#endif
238
239 return oled_init_keymap(rotation);
240}
241
242/* oled_rotation_t oled_init_user(oled_rotation_t rotation) { */
243/* memset(mkeylog_str, ' ', sizeof(mkeylog_str) - 1); */
244/* if (is_keyboard_master()) { */
245/* return OLED_ROTATION_270; */
246/* } else { */
247/* return OLED_ROTATION_180; */
248/* } */
249/* } */
250
251bool process_record_user_oled(uint16_t keycode, keyrecord_t *record) {
252 if (record->event.pressed) {
253 //oled_timer = timer_read32();
254 add_keylog(keycode, record);
255 //add_keylog(keycode);
256 }
257 return true;
258}
259
260void render_bootmagic_status(bool status) {
261 /* Show Ctrl-Gui Swap options */
262 static const char PROGMEM logo[][2][3] = {
263 {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
264 {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
265 };
266 if (status) {
267 oled_write_ln_P(logo[0][0], false);
268 oled_write_ln_P(logo[0][1], false);
269 } else {
270 oled_write_ln_P(logo[1][0], false);
271 oled_write_ln_P(logo[1][1], false);
272 }
273}
274
275
276__attribute__((weak)) void oled_render_logo(void) {
277 // clang-format off
278 static const char PROGMEM qmk_logo[] = {
279 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
280 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
281 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
282 // clang-format on
283 oled_write_P(qmk_logo, false);
284}
285
286bool oled_task_user(void) {
287 if (is_keyboard_master()) {
288 oled_render_mod_lock_status();
289 oled_render_default_layer_state();
290 oled_render_layer_state();
291#ifdef OLED_DISPLAY_128X64
292 oled_render_layer_map();
293#endif
294 oled_render_keylog();
295 } else {
296 oled_render_logo();
297 oled_render_default_layer_state();
298 }
299 return(true);
300
301}
302/* oled_render_keylock_status(host_keyboard_leds()); */
303/* oled_render_mod_status(get_mods() | get_oneshot_mods()); */
diff --git a/users/ericgebhart/oled_stuff.h b/users/ericgebhart/oled_stuff.h
new file mode 100755
index 000000000..df1f50985
--- /dev/null
+++ b/users/ericgebhart/oled_stuff.h
@@ -0,0 +1,24 @@
1#pragma once
2/*
3 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#include "quantum.h"
20#include "oled_driver.h"
21
22void oled_render_mod_lock_status(void);
23void oled_driver_render_logo(void);
24bool process_record_user_oled(uint16_t keycode, keyrecord_t *record);
diff --git a/users/ericgebhart/process_records.c b/users/ericgebhart/process_records.c
new file mode 100755
index 000000000..c1036c7f0
--- /dev/null
+++ b/users/ericgebhart/process_records.c
@@ -0,0 +1,255 @@
1/*
2 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include "ericgebhart.h"
18#include "caps_word.h"
19#include "g/keymap_combo.h"
20
21__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; }
22
23__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; }
24
25
26uint16_t tap_taplong_timer;
27
28inline void tap_taplong(uint16_t kc1, uint16_t kc2, keyrecord_t *record) {
29 if (record->event.pressed) {
30 tap_taplong_timer = timer_read();
31 } else {
32 if (timer_elapsed(tap_taplong_timer) > TAPPING_TERM) {
33 tap_code16(kc2);
34 } else {
35 tap_code16(kc1);
36 }
37 }
38}
39
40/* for (){}[]""''<>``. tap for open. Hold for open and close, ending inbetween. */
41/* Assumes a one character length. */
42inline void open_openclose(uint16_t kc1, uint16_t kc2, keyrecord_t *record) {
43 if (record->event.pressed) {
44 tap_taplong_timer = timer_read();
45 }else{
46 if (timer_elapsed(tap_taplong_timer) > TAPPING_TERM) {
47 tap_code16(kc1);
48 tap_code16(kc2);
49 tap_code16(KC_LEFT);
50 } else {
51 tap_code16(kc1);
52 }
53 }
54}
55
56// Defines actions for my global custom keycodes. Defined in ericgebhart.h file
57// Then runs the _keymap's record handier if not processed here
58bool process_record_user(uint16_t keycode, keyrecord_t *record) {
59 // If console is enabled, it will print the matrix position and status of each key pressed
60
61#ifdef OLED_ENABLE
62 process_record_user_oled(keycode, record);
63#endif // OLED
64
65 if (!process_caps_word(keycode, record)) { return false; }
66
67 if (process_record_keymap(keycode, record) && process_record_secrets(keycode, record)) {
68 switch (keycode) {
69
70 // Handle the key translations for Dvorak on bepo. It's best if these are the first
71 // enums after SAFE_RANGE.
72 case DB_1 ... BB_QUOT:
73 if(record->event.pressed)
74 send_keycode(keycode);
75 unregister_code(keycode);
76 break;
77
78 // Set the default layer. eeprom if shifted.
79 case KC_DVORAK ... KC_BEPO:
80 if (record->event.pressed) {
81 uint8_t mods = mod_config(get_mods() | get_oneshot_mods());
82 if (!mods) {
83 default_layer_set(1UL << (keycode - KC_DVORAK));
84 } else if (mods & MOD_MASK_SHIFT) {
85 set_single_persistent_default_layer(1UL << (keycode - KC_DVORAK));
86 }
87 }
88 break;
89
90
91 case KC_RESET: // Custom RESET code
92 if (!record->event.pressed) {
93 reset_keyboard();
94 }
95 return false;
96 break;
97
98 case KC_SPACETEST: // test something.
99 // default_layer_set(1UL << _BEAKL);
100 // tap_code16(LSFT(KC_SPACE));
101 break;
102
103
104 // tap or long tap for different key.
105 case KC_CCCV: // One key copy/paste
106 tap_taplong(LCTL(KC_C), LCTL(KC_V), record);
107 break;
108
109 case BP_CCCV: // One key copy/paste
110 tap_taplong(LCTL(BP_C), LCTL(BP_V), record);
111 break;
112
113 case KC_CTCN: // New TaB/Window
114 tap_taplong(LCTL(KC_T), LCTL(KC_N), record);
115 break;
116
117 case BP_CTCN: // New TaB/Window
118 tap_taplong(LCTL(BP_T), LCTL(BP_N), record);
119 break;
120
121 case KC_CWCQ: // Close Tab-window/Quit
122 tap_taplong(LCTL(KC_W), LCTL(KC_Q), record);
123 break;
124
125 case BP_CWCQ: // Close Tab-window/Quit
126 tap_taplong(LCTL(BP_W), LCTL(BP_Q), record);
127 break;
128
129 case KC_XM_PORD: // Xmonad scratch pads or desktop
130 tap_taplong(LGUI(KC_E), LGUI(KC_T), record);
131 break;
132
133 case BP_XM_PORD: // Xmonad scratch pads or desktop
134 tap_taplong(LGUI(BP_E), LGUI(BP_T), record);
135 break;
136
137
138 // Open on tap and Open with close and back arrow on hold.
139 case KC_OCPRN:
140 open_openclose(KC_LPRN, KC_RPRN, record);
141 break;
142
143 case BP_OCPRN:
144 open_openclose(DB_LPRN, DB_RPRN, record);
145 break;
146
147 case KC_OCBRC:
148 open_openclose(KC_LBRC, KC_RBRC, record);
149 break;
150
151 case BP_OCBRC:
152 open_openclose(KC_RBRC, KC_LBRC, record);
153 break;
154
155 case KC_OCCBR:
156 open_openclose(KC_LCBR, KC_RCBR, record);
157 break;
158
159 case BP_OCCBR:
160 open_openclose(BP_LCBR, BP_RCBR, record);
161 break;
162
163 case KC_OCDQUO:
164 open_openclose(KC_DQUO, KC_DQUO, record);
165 break;
166
167 case BP_OCDQUO:
168 open_openclose(BP_DQUO, BP_DQUO, record);
169 break;
170
171 case KC_OCQUOT:
172 open_openclose(KC_QUOT, KC_QUOT, record);
173 break;
174
175 case BP_OCQUOT:
176 open_openclose(BP_QUOT, BP_QUOT, record);
177 break;
178
179 case KC_OCGRV:
180 open_openclose(KC_GRAVE, KC_GRAVE, record);
181 break;
182
183 case BP_OCGRV:
184 open_openclose(BP_GRV, BP_GRV, record);
185 break;
186
187 case KC_OCLTGT:
188 open_openclose(KC_LT, KC_GT, record);
189 break;
190
191 case BP_OCLTGT:
192 open_openclose(BP_LDAQ, BP_RDAQ, record);
193 break;
194
195
196 //Turn shift backspace into delete.
197 /* case KC_BSPC: */
198 /* { */
199 /* // Initialize a boolean variable that keeps track */
200 /* // of the delete key status: registered or not? */
201 /* static bool delkey_registered; */
202 /* if (record->event.pressed) { */
203 /* uint8_t mod_state = get_mods(); */
204 /* // Detect the activation of either shift keys */
205 /* if (mod_state & MOD_MASK_SHIFT) { */
206 /* // First temporarily canceling both shifts so that */
207 /* // shift isn't applied to the KC_DEL keycode */
208 /* del_mods(MOD_MASK_SHIFT); */
209 /* register_code(KC_DEL); */
210 /* // Update the boolean variable to reflect the status of KC_DEL */
211 /* delkey_registered = true; */
212 /* // Reapplying modifier state so that the held shift key(s) */
213 /* // still work even after having tapped the Backspace/Delete key. */
214 /* set_mods(mod_state); */
215 /* return false; */
216 /* } */
217 /* } else { // on release of KC_BSPC */
218 /* // In case KC_DEL is still being sent even after the release of KC_BSPC */
219 /* if (delkey_registered) { */
220 /* unregister_code(KC_DEL); */
221 /* delkey_registered = false; */
222 /* return false; */
223 /* } */
224 /* } */
225 /* // Let QMK process the KC_BSPC keycode as usual outside of shift */
226 /* return true; */
227 /* } */
228
229
230#ifdef UNICODE_ENABLE
231 case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
232 if (record->event.pressed) {
233 send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
234 }
235 break;
236 case UC_TABL: // ┬─┬ノ( º _ ºノ)
237 if (record->event.pressed) {
238 send_unicode_string("┬─┬ノ( º _ ºノ)");
239 }
240 break;
241 case UC_SHRG: // ¯\_(ツ)_/¯
242 if (record->event.pressed) {
243 send_unicode_string("¯\\_(ツ)_/¯");
244 }
245 break;
246 case UC_DISA: // ಠ_ಠ
247 if (record->event.pressed) {
248 send_unicode_string("ಠ_ಠ");
249 }
250 break;
251#endif
252 }
253 }
254 return true;
255}
diff --git a/users/ericgebhart/readme.md b/users/ericgebhart/readme.md
index cd57735c2..4a081bd34 100644..100755
--- a/users/ericgebhart/readme.md
+++ b/users/ericgebhart/readme.md
@@ -1,124 +1,212 @@
1Overview 1Overview
2======== 2========
3 3
4This is my personal userspace. Most of my code exists here. I only have one keymap, and that 4Warning: dvorak touch typist, that uses qwerty and bepo locales on my
5is for an ergodox_ez. There are a lot of layers, 7 of them are default layers. I primarily use 5computer. 40+ years of vi, 30 years of vi in Emacs.
6dvorak and Bepo. I've been using emacs in vi mode for over 23 years. I also us Xmonad as my 6
7window manager, additionally I've been using a Kinesis advantage keyboard in dvorak for over 20 7Recent years I have gone minimal, I don't use most of the keys on my ergodox,
8years. All of those things tend to color the layouts I have. 8or original edition dactyl. These maps work great on large and small keyboards,
9 9my preference seems to be 40% split ergo keyboards like the corne.
10The Bepo layer needs some love. It is true to the layout at Bepo.fr, but I find it a little 10
11cumbersome, and I miss some of my favorite keys. 11I think that what is special here is the layouts. I don't worry too
12 12much about leds, or RGB, although I do like oled. But really its mod_layer.h,
13There are 2 dvorak layers, one for a qwerty OS keyboard, and one for a Bepo OS keyboard. 13all the simple layer chunks and definitions, and the ability to apply that
14There is a symbol/keypad layer for bepo and qwerty. And of course there is a mouse/media layer. 14to any keyboard with minimal effort. The other thing is the example it
15There are 2 Xmonad layers one for qwerty and one for Bepo. Layer selection happens automatically 15provides for defining keymaps based on different OS locales. I use both
16based on your current default layer. I use 2 tap dance keys for layer selection. 16dvorak on Qwerty, and bepo/dvorak on bepo. That means I must change my
17 17locale on my OS to match my keyboard which can do qwerty or bepo locales.
18There are also Qwerty, Colemak, Workman and Norman layers for qwerty. 18
19 19It is possible, as I do, to send a keycode invoking xmonad, to execute my
20 20qwerty - bepo switch on my computer.
21Keyboard Layout Templates 21
22------------------------- 22Besides using dvorak, another thing that colors my keyboard code is that I
23 23have used the kinesis
24I borrowed the idea for the keyboard defines and some of the definitions from @drashna. 24advantage for for more than 2 decades. I have used the ergodox ez for several years
25I think it is an awesome idea, It makes consistency between layout definitions so much easier. 25as well, so the evolution of my keymaps starts there with space, enter, backspace
26@drashna had this to say about it. 26and delete keys on the thumbs.
27 27
28 28Layouts
29This borrows from @jola5's "Not quite neo" code. This allows me to maintain blocks of keymaps in the userspace, so that I can modify the userspace, and this is reflected in all of the keyboards that use it, at once. 29-----------
30 30This evolved from the old layout...wrapper code. Calling everything a wrapper seems
31This makes adding tap/hold mods, or other special keycodes or functions to all keyboards super easy, as it's done to all of them at once. 31silly. So I took a step back.
32 32
33The caveat here is that the keymap needs a processor/wrapper, as it doesn't like the substitutions. However, this is as simple as just pushing it through a define. For instance: 33Also, with all these layers it was a real pain to apply mods consistently and
34 34easily. So I changed the way I use keymap macro wrappers and added in my own
35`#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)` 35mod layer. The only thing it has is the mods to apply. No more editing keymaps
36 36to apply mods. I do it once, and it works everywhere I want.
37Once that's been done and you've switched the keymaps to use the "wrapper", it will read the substitution blocks just fine. 37
38 38All layouts, almost, boil down to a 3x5 x 2 matrix. Bepo is 3x6. Mostly, I want
39Credit goes to @jola5 for first implementing this awesome idea. 39my controls to stay the same. As we have been conditioned, these are the keys on
40 40the edges, or middle. Not that they can't change but I don't usually change them
41 41much, except the side edges, - the extra pinky columns.
42Custom Keycodes 42the F keys, the columns to the left and right and the row on the bottom.
43--------------- 43Thumb keys if you have them. Even the number row is practically the same.
44 44
45Keycodes are defined in the ericgebhart.h file and need to be included in the keymap.c files, so that they can be used there. The keymap.c file has very little in it, the most important thing to see there are the keys that are at the ends of each row, ie. the 1st and last key on each row is defined there. 45With that in mind, reducing my layouts to 3x10 or 12 matrices would be great.
46Everything else is in ericgebhart.h. 46At the same time extracting my mods so they are easy to apply to any matrix.
47 47So that's what is here.
48Layer Indication 48
49---------------- 49At the bottom is the LAYOUT, needed by the keeb you have. Then I have my Layouts
50 50to feed it with my ROWS macros which are my MOD layer. At the end of it all,
51The ergodox_ez only has 3 leds, layer indication is pretty lame. 51I give a 3x10 or 12 to a layout and I have a complete keyboard definition.
52Currently the first led lights up if the default layer is not qwerty. The symbol and media layers get 52Creating a new keyboard map is super simple.
53the other 2 leds, and all the leds light up if you are on the "layers" layer. 53
54I hope I can figure out how to make it better, but I just don't see a way with 3 leds and 11 layers. 54 * mod_layer.h is the place for home row mods or any other mods.
55 55 * layouts.h is where I define a new matrix using the ROW macros when I need one.
56 56 * core_keys.h - where I define my custom keys. Ya know, the big enum.
57BEPO vs Qwerty Layers 57 * altlocal_keys.c - Alternate key/shift keys for emulation on other locales.
58 * core_keysets.h - Base layers; qwerty, dvorak, beakl, colemak, norman, carplax...
59 * edge_keys.h - defines the edges and bottom/thumb keys of a keyboard.
60 * layers.h - defines actual layers for navigation, symbols, keypad, layers, top rows, etc.
61
62Process_records.c
63--------------------
64This is where the keycodes are processed...
65
66Custom keys
67-------------------
68I have a lot of custom keys because of bepo. It is somewhat confusing this interaction
69between a keyboard and the software that receives it.
70
71A lot of my pain is invoked by my desire to have dvorak on bepo. Which works just fine,
72although an english/cyrillic situation may not work so well. Currently I have
73dvorak and beakl on bepo in addition to bepo it's self.
74
75Alternate keycodes for emulating a layout on another locale/language.
76-----------------------------
77Because of wanting dvorak and beakl on bepo there was the necessity to create keys
78from keycodes which were not combined. For this I have a special function that
79takes a keycode and gives a proper shifted character for it. It is only a 2 keycode
80definition, but it does the basic non-shifted and shifted characters as you define them.
81
82Combos/Chords
83----------------------------
84This is recently new to me. I'm using them on my thumb keys which are all LT's.
85the combos allow for layer locking for the Nav layer, and a oneshot for symbols
86among other things.
87
88I followed the simple example at the end of the doc than uses the
89combos.def file to define the combos.
90
91Tap-mods
92-------------------------------------
93I had been using MT on my thumbs for GUI,CTRL,ALT on hold along with
94Escape, Enter, space and backspace, my thumb keys. I then added shift to my home row pinky key.
95I had layer shifts to symbols, numbers, navigation all on the home row of both hands.
96It worked nicely but choppy I think, switching hands for the holder of the layer is
97a little like having no caps lock. It was a lot of work adding them to all my maps.
98This is what prompted my mod_layer. So much easier. No maps to modify.
99
100Then I moved to all home row mods with layers on my thumb keys.
101
102This does allow for more rolls, and I have found chord/rolls simply from having my
103xmonad controls be GUI-some-home-row-key-or-close. When Gui is your index finger,
104everything gets easier.
105
106Somewhere along the way I got a corne, and everything had to be small. and I realized
107that everything really was small. My layers are blending back, with LTs near the
108home row, and all the thumbs. On my dactyl I currently have 8 thumb keys per thumb,
109I don't know what to do with them all. Remembering a time I thought that would be
110awesome.
111
112### tap_taplong and open_openclose
113In process_records.c I have a nice couple of functions,
114tap_taplong(), and open_openclose() for my non MT/LT functionality.
115
116 * I have home row mods for Shift, Ctrl, Alt, and Gui on both hands.
117 * I have a number of LT mods to raise layers nearby. Nav, toprows, symbol, keypad
118 are on both hands on the first and third rows around home row.
119 * Xmonad tap_taplong to pull up desktops or terminals with tap or hold.
120 * C-c/C-v, C-t/C-n, C-w/C-q are all on my Navigation layer as custom keys with tap_taplong.
121 * My thumbs are Enter/space and Esc/backspace which are also Navigation and toprows and symbol layers. They used to be GUI,CTRL,ALT,SFT. but all that's on the home row now.
122 * All of the paired characters on my symbol layer have a hold which closes them, and moves the cursor back between.
123
124### caps word
125Holding both pinkies on home row for double tapping term, is effectively
126right-shift and left-shift, invokes caps-word. The next word will be capitalized.
127It continues until it shouldn't.
128
129BEPO vs Qwerty Locale/language/Layers
58--------------------- 130---------------------
131Essentially they are different keycode sets. So anything that needs them, causes a layer.
132So there are two symbol layers, two toprows layers, two keypad layers.
133One for Qwerty and one for bepo. The Navigation layer is not affected.
59 134
60There are 7 base layers. Dvorak, qwerty, Colemak, Workman, and Norman work on a Qwerty software layer on the OS. Dvorak_on_bepo and Bepo both work on a Bepo software layer on the os. 135I only have bepo, dvorak and beakl on bepo. There are a bunch for Qwerty.
61Dvorak on qwerty is the default. There is a function in ericgebhart.c which will allow the keyboard 136I have a ton of basic layers. I'm most interested in beakl at the moment, but I've used Dvorak for more than 20 years. There is also qwerty, colemak, norman, carplax, etc.
62to persist it's default layer through power down. It is currently commented out.
63
64I don't actually use Qwerty, but it seemed like I should have it,
65@drashna had it along with Colemak, Workman and Norman so I added them
66to my existing dvorak and bepo definitions.
67
68There are two tap dance functions that allow switching the default layers
69and the overlay layers.
70 137
71The default layers switch according to the current OS keyboard of the current Default layer. 138The navigation/mouse layer is not affected by bepo/qwerty, but symbols and numbers are.
72Shifting the key, causes the selection to use the other OS keyboard selections. ie, 139There are bepo versions of everything that needs it.
73if you are on qwerty, you get dvorak, qwerty, colemak, workman and norman. If you shift it you get
74dvorak on bepo and bepo. If you are not on qwerty the unshifted taps get dvorak and bepo on bepo.
75 140
76The other tap dance for layers is for the symbol, mouse and layers layers. The layers layer is just a 141Navigation Layer
77safety layer, knowing I can get to if I screw something up... 142-----------------------
143I do not use a mouse. I use Xmonad as my window manager, and I have
144practically no use for one. They are necessary however. So I have
145a Navigation layer which is all mouse, arrows, home, end, tab, page
146up, down, 5 mouse buttons and so on.
147This layer is not affected by bepo/qwerty, but symbols and numbers are.
148There are bepo versions of everything that needs it.
149
150Arrow combos work just fine, in emacs I use SFT(arrows) to move between windows.
151To do this; shift is my left pinky home, Nav is right thumb Enter, and one of the four
152home keys of my left hand are the arrows. Home row mods allow this to work well.
153
154I don't use the arrows on the dactyl and kinesis, even though they are there.
155
156Symbol Layer
157-------------------
158The symbol layer is based on the Beakl15 symbol layer.
159The beakl symbol layer is intuitive and fairly easy to remember. There are 3 versions.
160The original, an extended called A, and an extended and enhanced for vi, called B.
161The primary purpose of the extension was to provide keys which might not be available
162elsewhere on the default layer. B, takes this further and moves :/? to better places.
163
164TopRows Layer
165--------------------
166I think, truly this is the layer that makes tiny keyboards accessible in the beginning.
167This is basically the number row, the shifted number row and the function key row.
168I have them so it is numbers on the home row, shifted keys above and functions below.
169There are multiple choices, I currently use the beakl number row, with everything
170else as you would expect.
171
172Keypad Layer
173--------------
174There are several variations of keypads and function key pads in various sizes.
175Currently I am using a Beakl Keypad on the left hand and 3x4 funcpad on the right.
176
177OLED
178--------------------
179It shows the basic stuff I could find in most places. The
180default layer, the current layer, the mods, the locks, the last key pressed, and
181a map of the current layer as simply as possible. I'm sure there is more that could
182be done. @Drashna has some fancy stuff. If the display is big enough, there is even
183a display of the current layer's keymap.
78 184
79XMonad 185XMonad
80--------------------- 186---------------------
187I use xmonad. Gui is my hot key for that. With home row mods I have home
188row chords which give me access to my desktops, my scratchpads/terminals,
189custom key KC_XM_PORD, among others. It sometimes feels that I am playing
190an instrument when I invoke xmonad to do something.
191
192I had an xmonad layer at one time, it was basically dvorak, I would invoke it
193with a GUI mod, so that even on bepo, or colemak, my xmonad commands remain the same.
81 194
82Additionally there is an advanced tap dance called XMONAD_ESC. One tap is Escape, tap and hold is 195I'm going to need to revisit that, as things are, all the commands move when I change
83LGUI with the proper XMONAD layer, it is essentially dvorak, for the 196to a different default layer from dvorak.
84given OS layer. 2 taps is Shift lgui with xmonad, and 2 taps and hold
85is Control LGUI with Xmonad. This allows for the finger patterns for
86Xmonad to remain the same regarless of the keyboard in use. The hold
87versions allow for secondary menu selection in Xmonad, the 2 tap function
88must be for a key that is in the top level keymap of Xmonad. This is how
89many people use xmonad so it's not a real problem. There are plenty of
90keys combinations to choose from with these choices. The function can
91be expanded to 3 taps and 3 tap and hold, and on and on....
92 197
93I have a few other special keys, for momentary symbols or shift on the home row of each hand. 198Combo's can alleviate some of this pain. More to play with.
94 199
95Also, after using a kinesis for many years I'm very accustomed to the
96space, enter, backspace and delete keys on the thumbs. I've added control
97and alt as a secondary function. These are also the Control and Alt keys
98if held down.
99 200
100Tap Dance 201Tap Dance
101-------------------- 202--------------------
102 203I have a lot of tap dance, It's turned off. It's big. tap-hold works pretty well most of the time, instead.
103Additionally there are other tap dance functions, tab-backtab, home-end as well as I few I'm not actually using. 204My favorites were tab-backtab, home-end.
104
105Building and flashing
106-----------------------
107
108```make ergodox_z:ericgebhart``` will compile the code.
109
110I use the teensy-loader cli so that's all I know. There is a script here called flash_ergodox
111
112Use it like this,
113
114```flash-ergodox <path to your hex file>```
115
116then use a paperclip to push the reset button on your keyboard.
117 205
118Switching the OS keyboard 206Switching the OS keyboard
119------------------------- 207-------------------------
120
121This varies from system to system. I use Arch Linux, so I use ```setxkbmap```. 208This varies from system to system. I use Arch Linux, so I use ```setxkbmap```.
122I've included a helper script which makes it easy to switch between EN and FR Bepo, 209I've included a helper script which makes it easy to switch between EN and FR Bepo,
123called switch-kbd. 210called switch-kbd. In xmonad I invoke this with a keystroke. so, same deal. just map
211the keystroke to a key.
124 212
diff --git a/users/ericgebhart/rules.mk b/users/ericgebhart/rules.mk
index 698f6131e..8afaeb780 100755
--- a/users/ericgebhart/rules.mk
+++ b/users/ericgebhart/rules.mk
@@ -1,14 +1,34 @@
1SRC += ericgebhart.c 1SRC += ericgebhart.c
2SRC += tap_dances.c
3SRC += process_records.c
4SRC += caps_word.c
5SRC += altlocal_keys.c
6
7VPATH += keyboards/gboards
8
9OLED_ENABLE = yes
10
11ifeq ($(strip $(OLED_ENABLE)), yes)
12 SRC += $(USER_PATH)/oled_stuff.c
13endif
14
2 15
3MOUSEKEY_ENABLE = yes # Mouse keys 16MOUSEKEY_ENABLE = yes # Mouse keys
4EXTRAKEY_ENABLE = yes # Audio control and System control 17EXTRAKEY_ENABLE = yes # Audio control and System control
5COMMAND_ENABLE = no # Commands for debug and configuration 18COMMAND_ENABLE = no # Commands for debug and configuration
6NKRO_ENABLE = no # USB Nkey Rollover - for issues, see github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 19NKRO_ENABLE = no # Enable N-Key Rollover
7SWAP_HANDS_ENABLE= no # Allow swapping hands of keyboard 20SWAP_HANDS_ENABLE= no # Allow swapping hands of keyboard
8KEY_LOCK_ENABLE = yes # Enable the KC_LOCK key 21KEY_LOCK_ENABLE = no # Enable the KC_LOCK key
9TAP_DANCE_ENABLE = yes # Enable the tap dance feature. 22TAP_DANCE_ENABLE = no # Enable the tap dance feature.
10CONSOLE_ENABLE = no # Console for debug 23CONSOLE_ENABLE = no # Console for debug
11 24
12BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 25BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
13UNICODE_ENABLE = no 26UNICODE_ENABLE = no
14SLEEP_LED_ENABLE = no 27SLEEP_LED_ENABLE = no
28
29LTO_ENABLE = yes
30
31SPACE_CADET_ENABLE = no
32GRAVE_ESC_ENABLE = no
33MAGIC_ENABLE = no
34COMBO_ENABLE = yes
diff --git a/users/ericgebhart/tap_dances.c b/users/ericgebhart/tap_dances.c
new file mode 100755
index 000000000..9f344986a
--- /dev/null
+++ b/users/ericgebhart/tap_dances.c
@@ -0,0 +1,269 @@
1/*
2 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#ifdef TAP_DANCES_ENABLE
18
19#include "tap_dances.h"
20
21#include "action.h"
22#include "action_layer.h"
23#include "process_keycode/process_tap_dance.h"
24
25void tap_dance_mouse_btns (qk_tap_dance_state_t *state, void *user_data) {
26 switch(state->count){
27 case 1:
28 register_code(KC_BTN1);
29 break;
30 case 2:
31 register_code(KC_BTN2);
32 break;
33 case 3:
34 register_code(KC_BTN3);
35 break;
36 case 4:
37 register_code(KC_BTN4);
38 break;
39 case 5:
40 register_code(KC_BTN5);
41 break;
42 default:
43 break;
44 }
45 reset_tap_dance(state);
46}
47
48// counting on all the qwerty layers to be less than dvorak_on_bepo
49int on_qwerty(){
50 uint8_t deflayer = (biton32(default_layer_state));
51 return (deflayer < _DVORAK_BP);
52}
53
54static void switch_default_layer(uint8_t layer) {
55 default_layer_set(1UL<<layer);
56 clear_keyboard();
57}
58
59// so the keyboard remembers which layer it's in after power disconnect.
60/*
61 uint32_t default_layer_state_set_kb(uint32_t state) {
62 eeconfig_update_default_layer(state);
63 return state;
64 }
65*/
66
67void tap_dance_df_bepo_layers_switch (qk_tap_dance_state_t *state, void *user_data) {
68 switch(state->count){
69 case 1:
70 switch_default_layer(_DVORAK_BP);
71 break;
72 case 2:
73 switch_default_layer(_BEPO);
74 break;
75 case 3:
76 layer_invert(_LAYERS);
77 break;
78 default:
79 break;
80 }
81 reset_tap_dance(state);
82}
83
84void tap_dance_layer_switch (qk_tap_dance_state_t *state, void *user_data) {
85 switch(state->count){
86 case 1:
87 if(on_qwerty())
88 layer_invert(_SYMB);
89 else
90 layer_invert(_SYMB_BP);
91 break;
92 case 2:
93 layer_invert(_NAV);
94 break;
95 case 3:
96 layer_invert(_LAYERS);
97 break;
98 case 4:
99 if(on_qwerty())
100 layer_invert(_KEYPAD);
101 else
102 layer_invert(_KEYPAD_BP);
103 break;
104 default:
105 break;
106 }
107 reset_tap_dance(state);
108}
109
110void tap_dance_default_layer_switch (qk_tap_dance_state_t *state, void *user_data) {
111 switch(state->count){
112 case 1:
113 switch_default_layer(_DVORAK);
114 break;
115 case 2:
116 switch_default_layer(_DVORAK_BP);
117 break;
118 case 3:
119 switch_default_layer(_BEPO);
120 break;
121 default:
122 break;
123 }
124 reset_tap_dance(state);
125}
126
127// switch the default layer to another qwerty based layer.
128void switch_default_layer_on_qwerty(int count) {
129 switch(count){
130 case 1:
131 switch_default_layer(_DVORAK);
132 break;
133 case 2:
134 switch_default_layer(_QWERTY);
135 break;
136 case 3:
137 switch_default_layer(_COLEMAK);
138 break;
139
140 /* case 4: */
141 /* switch_default_layer(_WORKMAN); */
142 /* break; */
143 /* case 5: */
144 /* switch_default_layer(_NORMAN); */
145 /* break; */
146
147 default:
148 switch_default_layer(_DVORAK);
149 break;
150 }
151}
152
153// switch the default layer to another bepo based layer.
154void switch_default_layer_on_bepo(int count) {
155 switch(count){
156 case 1:
157 switch_default_layer(_DVORAK_BP);
158 break;
159 case 2:
160 switch_default_layer(_BEPO);
161 break;
162 default:
163 switch_default_layer(_DVORAK_BP);
164 break;
165 }
166}
167
168
169// tap to change the default layer. Distinguishes between layers that are based on
170// a qwerty software keyboard and a bepo software keyboard.
171// if shifted, choose layers based on the other software keyboard, otherwise choose only
172// layers that work on the current software keyboard.
173void tap_dance_default_os_layer_switch (qk_tap_dance_state_t *state, void *user_data) {
174 //uint8_t shifted = (get_mods() & MOD_BIT(KC_LSFT|KC_RSFT));
175 bool shifted = ( keyboard_report->mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) );
176 int qwerty = on_qwerty();
177
178
179 // shifted, choose between layers on the other software keyboard
180 if(shifted){
181 if (qwerty)
182 switch_default_layer_on_bepo(state->count);
183 else
184 switch_default_layer_on_qwerty(state->count);
185
186 // not shifted, choose between layers on the same software keyboard
187 } else {
188 if (qwerty)
189 switch_default_layer_on_qwerty(state->count);
190 else
191 switch_default_layer_on_bepo(state->count);
192 }
193
194 reset_tap_dance(state);
195}
196
197
198/* Return an integer that corresponds to what kind of tap dance should be executed.
199 *
200 * How to figure out tap dance state: interrupted and pressed.
201 *
202 * Interrupted: If the state of a dance dance is "interrupted", that means that another key has been hit
203 * under the tapping term. This is typically indicitive that you are trying to "tap" the key.
204 *
205 * Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term
206 * has ended, but the key is still being pressed down. This generally means the key is being "held".
207 *
208 * One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold"
209 * feature. In general, advanced tap dances do not work well if they are used with commonly typed letters.
210 * For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters.
211 *
212 * Good places to put an advanced tap dance:
213 * z,q,x,j,k,v,b, any function key, home/end, comma, semi-colon
214 *
215 * Criteria for "good placement" of a tap dance key:
216 * Not a key that is hit frequently in a sentence
217 * Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or
218 * in a web form. So 'tab' would be a poor choice for a tap dance.
219 * Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the
220 * letter 'p', the word 'pepper' would be quite frustating to type.
221 *
222 * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested
223 *
224 */
225int cur_dance (qk_tap_dance_state_t *state) {
226 if (state->count == 1) {
227 if (state->interrupted || !state->pressed) return SINGLE_TAP;
228 //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'.
229 else return SINGLE_HOLD;
230 }
231 else if (state->count == 2) {
232 /*
233 * DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
234 * action when hitting 'pp'. Suggested use case for this return value is when you want to send two
235 * keystrokes of the key, and not the 'double tap' action/macro.
236 */
237 if (state->interrupted) return DOUBLE_SINGLE_TAP;
238 else if (state->pressed) return DOUBLE_HOLD;
239 else return DOUBLE_TAP;
240 }
241 //Assumes no one is trying to type the same letter three times (at least not quickly).
242 //If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
243 //an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP'
244 if (state->count == 3) {
245 if (state->interrupted || !state->pressed) return TRIPLE_TAP;
246 else return TRIPLE_HOLD;
247 }
248 else return 8; //magic number. At some point this method will expand to work for more presses
249}
250
251//Tap Dance Definitions
252qk_tap_dance_action_t tap_dance_actions[] = {
253 //Tap once for Esc, twice for Caps Lock
254 [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
255 [TD_TAB_BKTAB] = ACTION_TAP_DANCE_DOUBLE(KC_TAB, LSFT(KC_TAB)),
256 [TD_RIGHT_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_RIGHT, KC_TAB),
257 [TD_LEFT_BACKTAB] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT, LSFT(KC_TAB)),
258 [TD_UP_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_UP, KC_HOME),
259 [TD_DOWN_END] = ACTION_TAP_DANCE_DOUBLE(KC_DOWN, KC_END),
260 [TD_MDIA_SYMB] = ACTION_TAP_DANCE_FN(tap_dance_layer_switch),
261 [TD_DVORAK_BEPO] = ACTION_TAP_DANCE_FN(tap_dance_df_bepo_layers_switch),
262 [TD_DEF_LAYER_SW] = ACTION_TAP_DANCE_FN(tap_dance_default_layer_switch),
263 [TD_DEF_OS_LAYER_SW] = ACTION_TAP_DANCE_FN(tap_dance_default_os_layer_switch),
264 [TD_HOME_END] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END),
265 [TD_MOUSE_BTNS] = ACTION_TAP_DANCE_FN(tap_dance_mouse_btns)
266
267};
268
269#endif
diff --git a/users/ericgebhart/tap_dances.h b/users/ericgebhart/tap_dances.h
new file mode 100755
index 000000000..11978467a
--- /dev/null
+++ b/users/ericgebhart/tap_dances.h
@@ -0,0 +1,19 @@
1#pragma once
2/*
3 Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#include "ericgebhart.h"