diff options
-rw-r--r-- | keyboards/ergodox/ez/keymaps/blakedietz/keymap.c | 289 | ||||
-rw-r--r-- | keyboards/hhkb/keymaps/blakedietz/Makefile | 2 | ||||
-rw-r--r-- | keyboards/hhkb/keymaps/blakedietz/README.md | 134 | ||||
-rw-r--r-- | keyboards/hhkb/keymaps/blakedietz/config.h | 24 | ||||
-rw-r--r-- | keyboards/hhkb/keymaps/blakedietz/keymap.c | 122 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/blakedietz/README.md | 129 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/blakedietz/blank_key_template.md | 13 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/blakedietz/config.h | 31 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/blakedietz/keymap.c | 342 |
9 files changed, 1086 insertions, 0 deletions
diff --git a/keyboards/ergodox/ez/keymaps/blakedietz/keymap.c b/keyboards/ergodox/ez/keymaps/blakedietz/keymap.c new file mode 100644 index 000000000..a88e6795a --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/blakedietz/keymap.c | |||
@@ -0,0 +1,289 @@ | |||
1 | #include "ergodox.h" | ||
2 | #include "debug.h" | ||
3 | #include "action_layer.h" | ||
4 | |||
5 | /** | ||
6 | * This section of macros is for tap or hold functionality. Keys will fire off the second symbol in the name if tapped | ||
7 | * or fire the first symbol in the name if held. For example | ||
8 | * GUI_Z | ||
9 | * | ||
10 | * - will fire z if tapped | ||
11 | * - will fire cmd/super/win if held | ||
12 | */ | ||
13 | #define ALT_DOT ALT_T(KC_DOT) | ||
14 | #define ALT_X ALT_T(KC_X) | ||
15 | #define CTL_SLSH CTL_T(KC_SLSH) | ||
16 | #define CTL_Z CTL_T(KC_Z) | ||
17 | #define GUI_C GUI_T(KC_C) | ||
18 | #define GUI_COMM GUI_T(KC_COMM) | ||
19 | #define HPR_ESC ALL_T(KC_ESC) | ||
20 | #define HPR_QUO ALL_T(KC_QUOT) | ||
21 | |||
22 | #define BASE 0 | ||
23 | #define SYMB 1 | ||
24 | #define MDIA 2 | ||
25 | #define MOUSE 3 | ||
26 | #define DEV 4 | ||
27 | |||
28 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
29 | /* Keymap 0: Basic layer | ||
30 | * | ||
31 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
32 | * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | | ||
33 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
34 | * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | | ||
35 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
36 | * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2| '" | | ||
37 | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| | ||
38 | * | LShift |Z/Ctrl|X/Alt |C/GUI | V | B | | | | N | M |,/GUI |./ALT |//Ctrl| RShift | | ||
39 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
40 | * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | | ||
41 | * `----------------------------------' `----------------------------------' | ||
42 | * ,-------------. ,------------. | ||
43 | * |MOUSE | Home | | PgDn | PgUp| | ||
44 | * ,------|------|------| |------+-----+------. | ||
45 | * | | | ESC | | ESC | | | | ||
46 | * | Space|Backsp|------| |------| Tab |Enter | | ||
47 | * | |ace | LGui | | LGui | | | | ||
48 | * `--------------------' `-------------------' | ||
49 | */ | ||
50 | // If it accepts an argument (i.e, is a function), it doesn't need KC_. | ||
51 | // Otherwise, it needs KC_* | ||
52 | [BASE] = KEYMAP( // layer 0 : default | ||
53 | // left hand | ||
54 | KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, | ||
55 | KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(DEV), | ||
56 | KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, | ||
57 | KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), GUI_T(KC_C), KC_V, KC_B, ALL_T(KC_NO), | ||
58 | LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, | ||
59 | |||
60 | TG(MOUSE), KC_HOME, | ||
61 | KC_ESC, | ||
62 | KC_SPC, KC_BSPC, KC_LGUI, | ||
63 | |||
64 | // right hand | ||
65 | KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, | ||
66 | TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
67 | KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT, | ||
68 | MEH_T(KC_NO), KC_N, KC_M, GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT, | ||
69 | KC_DOWN, KC_UP, KC_LBRC, KC_RBRC, KC_FN1, | ||
70 | |||
71 | KC_PGDN, KC_PGUP, | ||
72 | KC_ESC, | ||
73 | KC_LGUI, KC_TAB, KC_ENT | ||
74 | ), | ||
75 | /* Keymap 1: Symbol Layer | ||
76 | * | ||
77 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
78 | * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | | ||
79 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
80 | * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | | ||
81 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
82 | * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | | ||
83 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
84 | * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | | ||
85 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
86 | * | | | | | | | | . | 0 | = | | | ||
87 | * `----------------------------------' `----------------------------------' | ||
88 | * ,-------------. ,-------------. | ||
89 | * | | | | | | | ||
90 | * ,------|------|------| |------+------+------. | ||
91 | * | | | | | | | | | ||
92 | * | | |------| |------| | | | ||
93 | * | | | | | | | | | ||
94 | * `--------------------' `--------------------' | ||
95 | */ | ||
96 | // SYMBOLS | ||
97 | [SYMB] = KEYMAP( | ||
98 | // left hand | ||
99 | KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, | ||
100 | KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, | ||
101 | KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, | ||
102 | KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, | ||
103 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, | ||
104 | KC_TRNS,KC_TRNS, | ||
105 | KC_TRNS, | ||
106 | KC_TRNS,KC_TRNS,KC_TRNS, | ||
107 | // right hand | ||
108 | KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
109 | KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, | ||
110 | KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, | ||
111 | KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, | ||
112 | KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, | ||
113 | KC_TRNS, KC_TRNS, | ||
114 | KC_TRNS, | ||
115 | KC_TRNS, KC_TRNS, KC_TRNS | ||
116 | ), | ||
117 | /* Keymap 2: Media and mouse keys | ||
118 | * | ||
119 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
120 | * | | | | | | | | | | | | | | | | | ||
121 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
122 | * | | | | | | | | | | | | | | | | | ||
123 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
124 | * | | | | | | |------| |------| | Prev | Next | Mute | | Play | | ||
125 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
126 | * | | | | | | | | | | | VolDn| VolUp| | | | | ||
127 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
128 | * | | | | | | | | | | | | | ||
129 | * `----------------------------------' `----------------------------------' | ||
130 | * ,-------------. ,-------------. | ||
131 | * | | | | | | | ||
132 | * ,------|------|------| |------+------+------. | ||
133 | * | | | | | | | | | ||
134 | * | | |------| |------| | | | ||
135 | * | | | | | | | | | ||
136 | * `--------------------' `--------------------' | ||
137 | */ | ||
138 | // MEDIA | ||
139 | [MDIA] = KEYMAP( | ||
140 | // left hand | ||
141 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
142 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
143 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
144 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
145 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
146 | KC_TRNS, KC_TRNS, | ||
147 | KC_TRNS, | ||
148 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
149 | // right hand | ||
150 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
151 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
152 | KC_TRNS, KC_MPRV, KC_MNXT, KC_MUTE, KC_TRNS, KC_MPLY, | ||
153 | KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, | ||
154 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
155 | KC_TRNS, KC_TRNS, | ||
156 | KC_TRNS, | ||
157 | KC_TRNS, KC_TRNS, KC_TRNS | ||
158 | ), | ||
159 | [MOUSE] = KEYMAP( | ||
160 | // left hand | ||
161 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
162 | KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, | ||
163 | KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, | ||
164 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
165 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
166 | KC_TRNS, KC_TRNS, | ||
167 | KC_TRNS, | ||
168 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
169 | // right hand | ||
170 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
171 | KC_TRNS, KC_TRNS, KC_ACL2, KC_ACL1, KC_ACL0, KC_TRNS, KC_TRNS, | ||
172 | KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, | ||
173 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
174 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
175 | KC_TRNS, KC_TRNS, | ||
176 | KC_TRNS, | ||
177 | KC_TRNS, KC_TRNS, KC_TRNS | ||
178 | ), | ||
179 | [DEV] = KEYMAP( | ||
180 | // left hand | ||
181 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
182 | KC_TRNS, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_TRNS, | ||
183 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, | ||
184 | KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, | ||
185 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
186 | KC_TRNS, KC_TRNS, | ||
187 | KC_TRNS, | ||
188 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
189 | // right hand | ||
190 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
191 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
192 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
193 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
194 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
195 | KC_TRNS, KC_TRNS, | ||
196 | KC_TRNS, | ||
197 | KC_TRNS, KC_TRNS, KC_TRNS | ||
198 | ), | ||
199 | }; | ||
200 | |||
201 | const uint16_t PROGMEM fn_actions[] = { | ||
202 | [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) | ||
203 | }; | ||
204 | |||
205 | // MACRODOWN only works in this function | ||
206 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
207 | { | ||
208 | switch(id) { | ||
209 | case 0: | ||
210 | if (record->event.pressed) { | ||
211 | register_code(KC_RSFT); | ||
212 | } else { | ||
213 | unregister_code(KC_RSFT); | ||
214 | } | ||
215 | break; | ||
216 | } | ||
217 | return MACRO_NONE; | ||
218 | }; | ||
219 | |||
220 | // Runs just one time when the keyboard initializes. | ||
221 | void matrix_init_user(void) { | ||
222 | |||
223 | }; | ||
224 | |||
225 | // Runs constantly in the background, in a loop. | ||
226 | void matrix_scan_user(void) { | ||
227 | uint8_t layer = biton32(layer_state); | ||
228 | |||
229 | ergodox_board_led_off(); | ||
230 | ergodox_right_led_1_off(); | ||
231 | ergodox_right_led_2_off(); | ||
232 | ergodox_right_led_3_off(); | ||
233 | switch (layer) { | ||
234 | case SYMB: | ||
235 | // Binary 1 represented by the leds | ||
236 | // --* | ||
237 | ergodox_right_led_3_on(); | ||
238 | break; | ||
239 | case MDIA: | ||
240 | // Binary 2 represented by the leds | ||
241 | // -*- | ||
242 | ergodox_right_led_2_on(); | ||
243 | break; | ||
244 | case MOUSE: | ||
245 | // Binary 3 represented by the leds | ||
246 | // -** | ||
247 | ergodox_right_led_3_on(); | ||
248 | ergodox_right_led_2_on(); | ||
249 | break; | ||
250 | case DEV: | ||
251 | // Binary 4 represented by the leds | ||
252 | // *-- | ||
253 | ergodox_right_led_1_on(); | ||
254 | break; | ||
255 | default: | ||
256 | // none | ||
257 | break; | ||
258 | } | ||
259 | }; | ||
260 | |||
261 | //bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
262 | // switch (keycode) { | ||
263 | // case QWERTY: | ||
264 | // return false | ||
265 | // break; | ||
266 | // case LOWER: | ||
267 | // if (record->event.pressed) { | ||
268 | // layer_on(_LOWER); | ||
269 | // update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
270 | // } else { | ||
271 | // layer_off(_LOWER); | ||
272 | // update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
273 | // } | ||
274 | // return false; | ||
275 | // break; | ||
276 | // case RAISE: | ||
277 | // if (record->event.pressed) { | ||
278 | // layer_on(_RAISE); | ||
279 | // update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
280 | // } else { | ||
281 | // layer_off(_RAISE); | ||
282 | // update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
283 | // } | ||
284 | // return false; | ||
285 | // break; | ||
286 | // } | ||
287 | // return true; | ||
288 | //} | ||
289 | |||
diff --git a/keyboards/hhkb/keymaps/blakedietz/Makefile b/keyboards/hhkb/keymaps/blakedietz/Makefile new file mode 100644 index 000000000..7c16b2c98 --- /dev/null +++ b/keyboards/hhkb/keymaps/blakedietz/Makefile | |||
@@ -0,0 +1,2 @@ | |||
1 | TAP_DANCE_ENABLE = no | ||
2 | UNICODE_ENABLE = no | ||
diff --git a/keyboards/hhkb/keymaps/blakedietz/README.md b/keyboards/hhkb/keymaps/blakedietz/README.md new file mode 100644 index 000000000..c0f7fde7a --- /dev/null +++ b/keyboards/hhkb/keymaps/blakedietz/README.md | |||
@@ -0,0 +1,134 @@ | |||
1 | # QMK HHKB Keymap: blakedietz | ||
2 | |||
3 | <!-- TODO: Link to Hasu's geekhack page from his name --> | ||
4 | <!-- TODO: Link to the ergodox ez layout in this repository --> | ||
5 | |||
6 | This is my (Blake Dietz's) own take on a QMK keymap for the Happy Hacking Keyboard Pro 2 alternate controller made by Hasu. A lot of the | ||
7 | functionality was inspired by the ergodox ez default layout. | ||
8 | |||
9 | ## Dependencies | ||
10 | |||
11 | ### macOS | ||
12 | |||
13 | ```bash | ||
14 | brew tap osx-cross/avr | ||
15 | brew install avr-libc | ||
16 | brew install dfu-programmer | ||
17 | ``` | ||
18 | |||
19 | ### Windows/Linux | ||
20 | |||
21 | [Build Environment Setup](https://github.com/jackhumbert/qmk_firmware/wiki#build-environment-setup) | ||
22 | |||
23 | ## Flashing | ||
24 | |||
25 | You will need to make sure that you have something that you can use to press the button on the alternate controller in | ||
26 | order to put it into boot mode. | ||
27 | |||
28 | From the hhkb directory run the following: | ||
29 | |||
30 | ```bash | ||
31 | make clean | ||
32 | make hhkb-blakedietz-dfu | ||
33 | ``` | ||
34 | |||
35 | Press the button on the alternate controller to put the board into boot mode. | ||
36 | |||
37 | You'll see an output similar to the following: | ||
38 | |||
39 | ```bash | ||
40 | make hhkb-blakedietz-dfu | ||
41 | |||
42 | Making hhkb with keymap blakedietz and target dfu | ||
43 | |||
44 | avr-gcc (GCC) 6.2.0 | ||
45 | Copyright (C) 2016 Free Software Foundation, Inc. | ||
46 | This is free software; see the source for copying conditions. There is NO | ||
47 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
48 | |||
49 | Size before: | ||
50 | text data bss dec hex filename | ||
51 | 0 22162 0 22162 5692 hhkb_blakedietz.hex | ||
52 | |||
53 | Compiling: keyboards/hhkb/keymaps/blakedietz/keymap.c [OK] | ||
54 | Compiling: ./tmk_core/common/command.c [OK] | ||
55 | Linking: .build/hhkb_blakedietz.elf [OK] | ||
56 | Creating load file for Flash: .build/hhkb_blakedietz.hex [OK] | ||
57 | |||
58 | Size after: | ||
59 | text data bss dec hex filename | ||
60 | 0 22162 0 22162 5692 hhkb_blakedietz.hex | ||
61 | |||
62 | dfu-programmer: no device present. | ||
63 | Error: Bootloader not found. Trying again in 5s. | ||
64 | dfu-programmer: no device present. | ||
65 | Error: Bootloader not found. Trying again in 5s. | ||
66 | Bootloader Version: 0x00 (0) | ||
67 | Erasing flash... Success | ||
68 | Checking memory from 0x0 to 0x6FFF... Empty. | ||
69 | Checking memory from 0x0 to 0x56FF... Empty. | ||
70 | 0% 100% Programming 0x5700 bytes... | ||
71 | [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success | ||
72 | 0% 100% Reading 0x7000 bytes... | ||
73 | [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success | ||
74 | Validating... Success | ||
75 | 0x5700 bytes written into 0x7000 bytes memory (77.68%). | ||
76 | ``` | ||
77 | |||
78 | ### Layers | ||
79 | |||
80 | #### Default | ||
81 | |||
82 | ##### A more "standard" layout | ||
83 | |||
84 | This layout places tilde in the standard location. Backspace is moved to the two upper-right-most keys and pipe | ||
85 | is put back where it belongs (where backspace is on the default hhkb2 keymapping). | ||
86 | |||
87 | ##### Hyper key | ||
88 | |||
89 | <!-- TODO: Link to Brett's article about the thyper key --> | ||
90 | |||
91 | This layout throws out the HHKB's control key in favor of a Hyper key. Ctrl is instead placed on the z and / keys and | ||
92 | can be activated with a long press. I find that this is far more ergonomic as it's less of a reach and it allows you to | ||
93 | alternate to either hand when you need to use `ctrl` as a modifier. | ||
94 | |||
95 | The hyper key can be held for hyper and tapped for escape. You'll find that this is quite nice for vim. | ||
96 | |||
97 | Enter is also a hyper key. This allows for symmetry between control and enter. Hold for hyper, tap for enter. | ||
98 | |||
99 | ##### Tap to Hold | ||
100 | |||
101 | ###### CTL, ALT, GUI | ||
102 | |||
103 | Since the HHKB does not have three super/meta keys, these keys were moved to pinky, ring and middle finger for ctrl, alt/ | ||
104 | option and super respectively. This is closer to home row which I've found causes less strain. | ||
105 | |||
106 | The Alt and Super keys are instead replaced with layer toggle keys to go to dev and mouse mode respectively. | ||
107 | |||
108 | ###### Space | ||
109 | |||
110 | Hold space to switch to dev mode. This will put you on a layer to have vim like arrow functionality on h,j,k and l. Use | ||
111 | this in editors that don't have vim keybindings. | ||
112 | |||
113 | ### Dev | ||
114 | |||
115 | The Dev layer can be activated holding space or hitting the HHKB's Alt key. This will put you in a mode | ||
116 | where all function keys are available and left, right, up and down are mapped to their vim equivalents. The function | ||
117 | keys are mapped in such a way that you can use them for debugging. Typically I map debugging functions in all IDEs to | ||
118 | the following for a seamless debugging experience (e.g. jumping from Intellij to chrome dev tools and back): | ||
119 | |||
120 | - f1 -> step over | ||
121 | - f2 -> step into | ||
122 | - f3 -> step out | ||
123 | - f4 -> continue | ||
124 | - f5 -> set break point on current line | ||
125 | |||
126 | ### Media | ||
127 | |||
128 | The media layer can be activated by pressing and holding the semi-colon. I've also placed the play and pause key on the | ||
129 | apostrophe key in the media layer. This allows you to easily roll your pinky from the media toggle (semi-colon) to the | ||
130 | play/pause key in one fluid motion. | ||
131 | |||
132 | I've also tried to logically map next/previous track along with volume up/down vim behavior. In vim since middle finger | ||
133 | goes up on k and index finger goes down on j, next/prev track is k/j respectively. ,/m changes volume up/down | ||
134 | respectively while toggled to the media layer. | ||
diff --git a/keyboards/hhkb/keymaps/blakedietz/config.h b/keyboards/hhkb/keymaps/blakedietz/config.h new file mode 100644 index 000000000..e0d2bce0f --- /dev/null +++ b/keyboards/hhkb/keymaps/blakedietz/config.h | |||
@@ -0,0 +1,24 @@ | |||
1 | // Based off of this section: | ||
2 | // https://github.com/qmk/qmk_firmware/blob/master/doc/BUILD_GUIDE.md#the-configh-file | ||
3 | #ifndef CONFIG_BLAKEDIETZ_H | ||
4 | #define CONFIG_BLAKEDIETZ_H | ||
5 | |||
6 | // Bring in original defaults | ||
7 | #include "../../config.h" | ||
8 | |||
9 | // Define mousekey settings | ||
10 | #define MOUSEKEY_DELAY 0 | ||
11 | #define MOUSEKEY_INTERVAL 20 | ||
12 | #define MOUSEKEY_MAX_SPEED 2 | ||
13 | #define MOUSEKEY_TIME_TO_MAX 5 | ||
14 | #define MOUSEKEY_WHEEL_DELAY 0 | ||
15 | |||
16 | // Set up tapdance functionality | ||
17 | //#define TAPPING_TOGGLE 1 | ||
18 | // TAPPING_TERM is set in config.h this defaults to 200 | ||
19 | |||
20 | // This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when | ||
21 | // you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) | ||
22 | #define IGNORE_MOD_TAP_INTERRUPT | ||
23 | |||
24 | #endif | ||
diff --git a/keyboards/hhkb/keymaps/blakedietz/keymap.c b/keyboards/hhkb/keymaps/blakedietz/keymap.c new file mode 100644 index 000000000..ef29a5c80 --- /dev/null +++ b/keyboards/hhkb/keymaps/blakedietz/keymap.c | |||
@@ -0,0 +1,122 @@ | |||
1 | #include "hhkb.h" | ||
2 | |||
3 | // Layer names | ||
4 | #define BASE 0 | ||
5 | #define DEV 1 | ||
6 | #define MOUSE 2 | ||
7 | #define MEDIA 3 | ||
8 | |||
9 | // Required for leader function. Measured in ms | ||
10 | // #define LEADER_TIMEOUT 300 | ||
11 | |||
12 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
13 | |||
14 | /* BASE Level: Default Layer | ||
15 | |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| | ||
16 | | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bksp |Lead| | ||
17 | |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| | ||
18 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | \ | | ||
19 | |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| | ||
20 | | Esc/Hyper | A | S | D | F | G | H | J | K | L |;/Media| ' | Enter | | | | ||
21 | |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| | ||
22 | | Shift | Z/Ctl | X/Alt | C/Gui | V | B | N | M | ,/Gui | ./Alt | //Ctl | Shift | Dev | | | | ||
23 | |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| | ||
24 | TODO: Maybe add a photoshop layer for when I need to hold spacebar down. Maybe just make it a layer that you | ||
25 | |------+------+-----------------------+------+------| | ||
26 | | Dev |Mouse | ******* Space ******* | Dev |Mouse | | ||
27 | |------+------+-----------------------+------+------| | ||
28 | */ | ||
29 | |||
30 | [BASE] = KEYMAP( // default layer | ||
31 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_LEAD, \ | ||
32 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ | ||
33 | ALL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(MEDIA, KC_SCLN), KC_QUOT, ALL_T(KC_ENT), \ | ||
34 | KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), GUI_T(KC_C), KC_V, KC_B, KC_N, KC_M, GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, TG(DEV), \ | ||
35 | TG(DEV), TG(MOUSE), LT(DEV, KC_SPC), TG(MOUSE), TG(DEV)), | ||
36 | |||
37 | /* Layer DEV: DEV mode (DEV Fn) | ||
38 | TODO: Add a cmd/tab function to the developer layer for quick switching between different applications when debugging | ||
39 | |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
40 | | | | | | | | | | | | | | | | | | ||
41 | |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
42 | | | | | | | | | | | | | | | | | | ||
43 | |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
44 | | | F1 | F2 | F3 | F4 | F5 | Left | Down | Up | Right | | | | | | | ||
45 | |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
46 | | | | | | | | | | | | | | | | | | ||
47 | |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
48 | |||
49 | |------+------+----------------------+------+------+ | ||
50 | | **** | **** | ******************** | **** | **** | | ||
51 | |------+------+----------------------+------+------+ | ||
52 | */ | ||
53 | |||
54 | [DEV] = KEYMAP( | ||
55 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
56 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
57 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
58 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), \ | ||
59 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
60 | |||
61 | /* Layer MOUSE: MOUSE mode (MOUSE Fn) | ||
62 | |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
63 | | | | | | | | | | | | | | | | | | ||
64 | |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
65 | | | | | | | | | | | | | | | | | | ||
66 | |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
67 | | | | | | | | | | | | | | | | | | ||
68 | |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
69 | | | | | | | | | | | | | | | | | | ||
70 | |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
71 | |||
72 | |------+------+----------------------+------+------+ | ||
73 | | **** | **** | ******************** | **** | **** | | ||
74 | |------+------+----------------------+------+------+ | ||
75 | */ | ||
76 | |||
77 | [MOUSE] = KEYMAP( | ||
78 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
79 | KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
80 | KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
81 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), \ | ||
82 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
83 | |||
84 | /* Layer MEDIA: mode (Hold Semi-colon) | ||
85 | |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
86 | | | | | | | | | | | | | | | | | | ||
87 | |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
88 | | | | | | | | | | | | | | | | | | ||
89 | |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
90 | | | | | | | | | Previous | Next | | Play/Pause | | | | | | ||
91 | |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
92 | | | | | | | | | Volume Down | Volume Up | Mute | | | | | | | ||
93 | |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| | ||
94 | |||
95 | |------+------+----------------------+------+------+ | ||
96 | | **** | **** | ******************** | **** | **** | | ||
97 | |------+------+----------------------+------+------+ | ||
98 | |||
99 | */ | ||
100 | |||
101 | [MEDIA] = KEYMAP( | ||
102 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
103 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
104 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_MUTE, KC_TRNS, KC_MPLY, KC_TRNS, \ | ||
105 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), \ | ||
106 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) | ||
107 | }; | ||
108 | |||
109 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
110 | { | ||
111 | // MACRODOWN only works in this function | ||
112 | switch(id) { | ||
113 | case 0: | ||
114 | if (record->event.pressed) { | ||
115 | register_code(KC_RSFT); | ||
116 | } else { | ||
117 | unregister_code(KC_RSFT); | ||
118 | } | ||
119 | break; | ||
120 | } | ||
121 | return MACRO_NONE; | ||
122 | }; | ||
diff --git a/keyboards/jd45/keymaps/blakedietz/README.md b/keyboards/jd45/keymaps/blakedietz/README.md new file mode 100644 index 000000000..2e45a46d9 --- /dev/null +++ b/keyboards/jd45/keymaps/blakedietz/README.md | |||
@@ -0,0 +1,129 @@ | |||
1 | jeebak's JD45 layout | ||
2 | ======================= | ||
3 | NOTE: This is a port of jeebak's planck layout, for jd45. | ||
4 | |||
5 | This WIP keymap attempts to minimize fingers straying away from the home row. | ||
6 | To aid in this endeavor, when additional modifyer keys to switch layers are | ||
7 | needed, they will be mapped to home row keys. The `keymap.c` file will contain | ||
8 | the exact changes. The diagrams in this README shows the highlights of the | ||
9 | changes from the default mappings. | ||
10 | |||
11 | I also decided to change all calls to `persistant_default_layer_set()` to | ||
12 | `default_layer_set()` since this is my personal perference. | ||
13 | |||
14 | ## Macros | ||
15 | ``` | ||
16 | #define ALT_TAB M(KC_ALT_TAB) | ||
17 | ``` | ||
18 | |||
19 | ## Base Layers (Qwerty/Colemak/Dvorak) | ||
20 | These base layers are mostly the same as the default mappings. The interesting | ||
21 | changes are shown below. | ||
22 | |||
23 | - The `Ctrl/Esc`, will emit an `Escape` when tapped, and act as a `Control` key when held, | ||
24 | - `GUI/;` as `;` and `GUI`, | ||
25 | - `Alt/"` as `"` and `Alt`, | ||
26 | - `Sft/Ent` as `Enter` and `Shift`, and | ||
27 | - `Hyper/Tab` as `Tab` and `Hyper` | ||
28 | |||
29 | A `TODO` item is to see if it can also act as a `CapsLock` when double-tapped. | ||
30 | The arrow keys, which have been moved to the | ||
31 | [TouchCursor](http://martin-stone.github.io/touchcursor/) layer, have been | ||
32 | replaced with the Media keys as shown. The `MC/kc` key activates the | ||
33 | `MouseCursor` layer when held, and emits the corresponding `kc` for its layer, | ||
34 | when tapped. | ||
35 | ``` | ||
36 | ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
37 | |Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | [ | Bksp | | ||
38 | |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
39 | | Ctrl/Esc | A | S | MC/D | F | G | H | J | K | L |GUI/; | Alt/" | | ||
40 | |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
41 | | Shift | Z | X | C | V | B | N | M | , | . | / | Sft/Ent | | ||
42 | |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
43 | | RGUI | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol- | Vol+ | Play | | ||
44 | `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
45 | ``` | ||
46 | |||
47 | ## Lower Layer (Symbols and Function Keys) | ||
48 | The symbols and functions keys are essentially the same as the default mapping. | ||
49 | The most notable changes are that the symbol keys from the `RAISE` layer have | ||
50 | been moved here. The remaining Media keys replace those that are now on the | ||
51 | base layers. The `BACKLIT` key has also been moved here. | ||
52 | ``` | ||
53 | ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
54 | | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | Bksp | | ||
55 | |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
56 | | [ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | "|" | | ||
57 | |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
58 | | ] | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | \ | | ||
59 | |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
60 | | Brite | | | | | | | Prev | Next | Mute | | ||
61 | `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
62 | ``` | ||
63 | |||
64 | ## Raise Layer (Numbers and Arithmetic Operators) | ||
65 | All of the numbers and arithmetic operators are available on this layer. Some | ||
66 | keys are duplicated for the convenience of their positions. The `0` and `$` | ||
67 | keys at the far left are for quick access to beginning and end of line in vim. | ||
68 | ``` | ||
69 | ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
70 | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Bksp | | ||
71 | |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
72 | | $ | 4 | 5 | 6 | . | + | . | 4 | 5 | 6 | * | "|" | | ||
73 | |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
74 | | = | 7 | 8 | 9 | 0 | - | . | 1 | 2 | 3 | / | \ | | ||
75 | |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
76 | | Brite | | | | | | | Prev | Next | Mute | | ||
77 | `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
78 | ``` | ||
79 | |||
80 | ## TouchCursor layer plus personal customizations | ||
81 | [TouchCursor](http://martin-stone.github.io/touchcursor/) uses the `Space` key | ||
82 | as the modifier, with the `IJKL` home row keys representing the inverted-T of | ||
83 | the arrow keys. All of the default TouchCursor keymappings for the right hand | ||
84 | are represented below. My personalizations include all of the keys shown for | ||
85 | the left hand. Having the `Alt` and `Shift` keys (as well as the `Control` key | ||
86 | from the base layers) readily accessible from the home row allows quick word | ||
87 | jumps and highlighting when used in conjunction with the arrow keys. The | ||
88 | `Alt-Tab` macro is not only useful under Windows, but also under Mac when used | ||
89 | with alternative switchers like [HyperSwitch](https://bahoom.com/hyperswitch). | ||
90 | The `Cmd-Tab` and `Ctrl-Tab` sequences are duplicated for easy access while in | ||
91 | this layer. The `KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_FIND,` and `KC_AGAIN` | ||
92 | keycodes do not seem to work. There are macros in place that'll "automatically" | ||
93 | choose the correct version (`Cmd-Tab` vs. `Alt-Tab`, `Cmd-C` vs. `Ctrl-C`, | ||
94 | etc.) depending on which layout you've currently selected (`AG_NORM` or | ||
95 | `AG_SWAP`) in the `_ADJUST` layer. The `Desk_L` and `Desk_R` macros are what I | ||
96 | use to switch between Virtual Desktops Left/Right. The `Tab_C`, `Tab_N` and | ||
97 | `Tab_R` are for "Close Tab," "New Tab" and "Reopen Closed Tab" for apps such as | ||
98 | Google Chrome. | ||
99 | ``` | ||
100 | ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
101 | | AltTab |CmdTab|CtlTab| GUI |Shift | ~ |Insert| Home | Up | End | Bksp | | | | ||
102 | |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
103 | | | Alt |Space |Tab_C | Find |Again | PgUp | Left | Down |Right |Desk_L| Desk_R | | ||
104 | |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
105 | | | Undo | Cut | Copy |Paste | ` | PgDn | Del |Tab_N |Tab_R |iTerm2| | | ||
106 | |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
107 | | | | | | | | | | | | | ||
108 | `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
109 | ``` | ||
110 | |||
111 | ## Mouse Layer | ||
112 | The Mouse layer, closely mimics the layout/behaviour of the TouchCursor layer. | ||
113 | The `D` key (on QWERTY) is used to activate this layer. All 16 keycodes for the | ||
114 | mouse from the `doc/keycode.txt` file are represented, and logically located, | ||
115 | IMHO. The left and right click buttons are duplicated; on the right hand side, | ||
116 | for a quick click here and there, and again on the left hand side for when the | ||
117 | buttons need to be held for dragging things or highlighting text, thus allowing | ||
118 | the right hand to be free to use the up/down/left/right actions. | ||
119 | ``` | ||
120 | ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
121 | | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | | | ||
122 | |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
123 | | |ACCL2 | BTN2 | | BTN1 |ACCL1 |WHL_Up| Left | Down |Right | BTN4 | BTN5 | | ||
124 | |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
125 | | | | | | BTN3 | |WHL_Dn| BTN1 | | | BTN3 | | | ||
126 | |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
127 | | | | | | | | | | | | | ||
128 | `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
129 | ``` | ||
diff --git a/keyboards/jd45/keymaps/blakedietz/blank_key_template.md b/keyboards/jd45/keymaps/blakedietz/blank_key_template.md new file mode 100644 index 000000000..2a58cfdd1 --- /dev/null +++ b/keyboards/jd45/keymaps/blakedietz/blank_key_template.md | |||
@@ -0,0 +1,13 @@ | |||
1 | ``` | ||
2 | /* Name | ||
3 | * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
4 | * | | | | | | | | | | | | | | | ||
5 | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
6 | * | | | | | | | | | | | | | | ||
7 | * |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
8 | * | | | | | | | | | | | | | | ||
9 | * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
10 | * | | | | | | | | | | | | ||
11 | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
12 | */ | ||
13 | ``` | ||
diff --git a/keyboards/jd45/keymaps/blakedietz/config.h b/keyboards/jd45/keymaps/blakedietz/config.h new file mode 100644 index 000000000..6667d6fa1 --- /dev/null +++ b/keyboards/jd45/keymaps/blakedietz/config.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #include "../../config.h" | ||
2 | |||
3 | /** | ||
4 | *JD45 keymap definition macro | ||
5 | */ | ||
6 | #define KEYMAP_JD45( \ | ||
7 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \ | ||
8 | K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, \ | ||
9 | K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \ | ||
10 | K38, K39, K40, K41, K42, K43, K44, K45, K46, K47 \ | ||
11 | ) { \ | ||
12 | { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13 }, \ | ||
13 | { K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, KC_NO }, \ | ||
14 | { K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, KC_NO }, \ | ||
15 | { K38, K39, K40, K41, K42, KC_NO, K43, KC_NO, K44, K45, K46, K47, KC_NO } \ | ||
16 | } | ||
17 | |||
18 | /** | ||
19 | * This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when | ||
20 | * you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) | ||
21 | */ | ||
22 | #define IGNORE_MOD_TAP_INTERRUPT | ||
23 | |||
24 | /** | ||
25 | * Improve the smootheness of mouse interaction | ||
26 | */ | ||
27 | #define MOUSEKEY_INTERVAL 20 | ||
28 | #define MOUSEKEY_DELAY 0 | ||
29 | #define MOUSEKEY_TIME_TO_MAX 5 | ||
30 | #define MOUSEKEY_MAX_SPEED 2 | ||
31 | #define MOUSEKEY_WHEEL_DELAY 0 \ No newline at end of file | ||
diff --git a/keyboards/jd45/keymaps/blakedietz/keymap.c b/keyboards/jd45/keymaps/blakedietz/keymap.c new file mode 100644 index 000000000..1b1d0817e --- /dev/null +++ b/keyboards/jd45/keymaps/blakedietz/keymap.c | |||
@@ -0,0 +1,342 @@ | |||
1 | #include "jd45.h" | ||
2 | |||
3 | extern keymap_config_t keymap_config; | ||
4 | |||
5 | /* | ||
6 | * Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
7 | * The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
8 | * Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
9 | * entirely and just use numbers. | ||
10 | */ | ||
11 | #define _ADJUST 16 | ||
12 | #define _LOWER 3 | ||
13 | #define _MEDIA 8 | ||
14 | #define _MOUSECURSOR 7 | ||
15 | #define _QWERTY 0 | ||
16 | #define _RAISE 4 | ||
17 | #define _VIM 9 | ||
18 | // TODO: (bdietz) - make a symbols layer for fun emoji and ascii art | ||
19 | // TODO: (bdietz) - make a symbol layer for greek symbols | ||
20 | |||
21 | // Keycodes | ||
22 | enum planck_keycodes { | ||
23 | QWERTY = SAFE_RANGE, | ||
24 | LOWER, | ||
25 | RAISE, | ||
26 | }; | ||
27 | |||
28 | enum macro_keycodes { | ||
29 | KC_ALT_TAB, | ||
30 | KC_CMD_TAB, | ||
31 | KC_CTL_TAB, | ||
32 | KC_CMD_SLSH, | ||
33 | KC_AG_FIND, | ||
34 | KC_AG_AGAIN, | ||
35 | KC_AG_UNDO, | ||
36 | KC_AG_CUT, | ||
37 | KC_AG_COPY, | ||
38 | KC_AG_PASTE, | ||
39 | KC_AG_DESK_L, | ||
40 | KC_AG_DESK_R, | ||
41 | KC_AG_TAB_C, | ||
42 | KC_AG_TAB_N, | ||
43 | KC_AG_TAB_R, | ||
44 | }; | ||
45 | |||
46 | // Fillers to make layering more clear | ||
47 | #define _______ KC_TRNS | ||
48 | #define XXXXXXX KC_NO | ||
49 | |||
50 | /** | ||
51 | * This section of macros is for tap or hold functionality. Keys will fire off the second symbol in the name if tapped | ||
52 | * or fire the first symbol in the name if held. For example | ||
53 | * GUI_Z | ||
54 | * | ||
55 | * - will fire z if tapped | ||
56 | * - will fire cmd/super/win if held | ||
57 | */ | ||
58 | #define ALT_DOT ALT_T(KC_DOT) | ||
59 | #define ALT_X ALT_T(KC_X) | ||
60 | #define CTL_SLSH CTL_T(KC_SLSH) | ||
61 | #define CTL_Z CTL_T(KC_Z) | ||
62 | #define GUI_C GUI_T(KC_C) | ||
63 | #define GUI_COMM GUI_T(KC_COMM) | ||
64 | #define HPR_ESC ALL_T(KC_ESC) | ||
65 | #define HPR_QUO ALL_T(KC_QUOT) | ||
66 | |||
67 | // Toggle to VIM when left space button is held, emit space keycode when left space is tapped | ||
68 | #define TGL_VIM LT(_VIM, KC_SPC) | ||
69 | // Toggle to the mouse layer when the right space button is held and emit enter when right space is tapped | ||
70 | #define TGL_MOUSE LT(_MOUSECURSOR, KC_ENT) | ||
71 | |||
72 | // TODO: (bdietz) - need to audit these keycodes to see what sort of cool things the default layout was doing. | ||
73 | #define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab | ||
74 | #define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab | ||
75 | #define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab | ||
76 | #define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility) | ||
77 | #define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings | ||
78 | #define AG_AGAIN M(KC_AG_AGAIN) | ||
79 | #define AG_UNDO M(KC_AG_UNDO) | ||
80 | #define AG_CUT M(KC_AG_CUT) | ||
81 | #define AG_COPY M(KC_AG_COPY) | ||
82 | #define AG_PASTE M(KC_AG_PASTE) | ||
83 | #define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and | ||
84 | #define AG_D_R M(KC_AG_DESK_R) // Right | ||
85 | #define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close, | ||
86 | #define AG_T_N M(KC_AG_TAB_N) // Tab New, and | ||
87 | #define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed | ||
88 | |||
89 | /* Qwerty | ||
90 | * | ||
91 | * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
92 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | | | ||
93 | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
94 | * |Hyper/Esc| A | S | D | F | G | H | J | K | L |MEDIA/;| Hyper/" | | ||
95 | * |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
96 | * | Shift |CTL/Zl|ALT/X |GUI/C | V | B | N | M |GUI/, | ALT/.|CTL// | Shift | | ||
97 | * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
98 | * | | | | Lower | VIM/Space| MOUSE/Ent| Raise | | | | | ||
99 | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
100 | */ | ||
101 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
102 | [_QWERTY] = KEYMAP_JD45( | ||
103 | /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ | ||
104 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, ALL_T(KC_NO), | ||
105 | /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ | ||
106 | HPR_ESC , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MEDIA, KC_SCLN), HPR_QUO, | ||
107 | /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ | ||
108 | KC_LSFT, CTL_Z, ALT_X, GUI_C, KC_V, KC_B, KC_N, KC_M,GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT , | ||
109 | /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ | ||
110 | _______ , _______ , _______ , LOWER , TGL_VIM , TGL_MOUSE , RAISE , _______ , _______ , _______), | ||
111 | /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ | ||
112 | |||
113 | // TODO: (bdietz) - update the keymap documentation to include the modifier keys on the third row | ||
114 | /* Lower | ||
115 | * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
116 | * | ` | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | Bksp | | ||
117 | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
118 | * | [ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | "|" | | ||
119 | * |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
120 | * | ] | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | \ | | ||
121 | * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
122 | * | | | | | | | | Prev | Next | Mute | | ||
123 | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
124 | */ | ||
125 | [_LOWER] = KEYMAP_JD45( | ||
126 | /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ | ||
127 | KC_GRV,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_BSPC, | ||
128 | /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ | ||
129 | KC_LBRC , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , | ||
130 | /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ | ||
131 | KC_RBRC , CTL_T(KC_F7), ALT_T(KC_F8),GUI_T(KC_F9), KC_F10, KC_F11, KC_F12, KC_MINS, GUI_T(KC_EQL) , ALT_T(KC_LBRC), CTL_T(KC_RBRC), KC_BSLS , | ||
132 | /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ | ||
133 | _______ , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE), | ||
134 | /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ | ||
135 | |||
136 | /* Raise | ||
137 | * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
138 | * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Bksp | | ||
139 | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
140 | * | $ | 4 | 5 | 6 | . | + | . | 4 | 5 | 6 | * | "|" | | ||
141 | * |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
142 | * | = | 7 | 8 | 9 | 0 | - | . | 1 | 2 | 3 | / | \ | | ||
143 | * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
144 | * | | | | | | | | Prev | Next | Mute | | ||
145 | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
146 | */ | ||
147 | [_RAISE] = KEYMAP_JD45( | ||
148 | /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ | ||
149 | KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSPC, | ||
150 | /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ | ||
151 | KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE , | ||
152 | /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ | ||
153 | KC_EQL , CTL_T(KC_7), ALT_T(KC_8), GUI_T(KC_9), KC_0, KC_MINS, KC_DOT, KC_1 ,GUI_T(KC_2), ALT_T(KC_3), CTL_T(KC_SLSH), KC_BSLS , | ||
154 | /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ | ||
155 | _______ , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE), | ||
156 | /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ | ||
157 | |||
158 | /* Mouse Layer | ||
159 | * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
160 | * | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | | | ||
161 | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
162 | * | |ACCL2 | BTN2 | | BTN1 |ACCL1 |WHL_Up| Left | Down |Right | BTN4 | BTN5 | | ||
163 | * |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
164 | * | | | | | BTN3 | |WHL_Dn| BTN1 | | | BTN3 | | | ||
165 | * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
166 | * | | | | | | | | | | | | ||
167 | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
168 | */ | ||
169 | |||
170 | [_MOUSECURSOR] = KEYMAP_JD45( | ||
171 | /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ | ||
172 | _______,_______, _______, KC_MS_U, _______, _______, _______, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, _______, | ||
173 | /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ | ||
174 | _______ ,_______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______ , | ||
175 | /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ | ||
176 | _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , | ||
177 | /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ | ||
178 | _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______), | ||
179 | /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ | ||
180 | |||
181 | /* Adjust (Lower + Raise) | ||
182 | * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
183 | * | | | | | | | | | | | | | Del | | ||
184 | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
185 | * | | | | | |AGnorm|AGswap|Qwerty|Mouse | |Plover| | | ||
186 | * |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
187 | * | | | | | | | | | | | | | | ||
188 | * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
189 | * | | | | | | | | | | Reset | | ||
190 | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
191 | */ | ||
192 | [_ADJUST] = KEYMAP_JD45( | ||
193 | |||
194 | /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ | ||
195 | _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , | ||
196 | /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ | ||
197 | _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______ , | ||
198 | /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ | ||
199 | _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , | ||
200 | /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ | ||
201 | _______ , _______, _______, _______, _______ , _______ , _______, _______, _______, RESET), | ||
202 | /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ | ||
203 | |||
204 | /* VIM | ||
205 | * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
206 | * | | | | | | | | | | | | | | | ||
207 | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
208 | * | | | | | | | LEFT | DOWN | UP |RIGHT | | | | ||
209 | * |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
210 | * | | | | | | | | | | | | | | ||
211 | * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
212 | * | | | | | | | | | | | | ||
213 | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
214 | */ | ||
215 | [_VIM] = KEYMAP_JD45( | ||
216 | /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ | ||
217 | _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
218 | /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ | ||
219 | _______ ,_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______ , | ||
220 | /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ | ||
221 | _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , | ||
222 | /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ | ||
223 | _______ , _______, _______, _______, _______ , _______ , _______, _______, _______,_______), | ||
224 | /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ | ||
225 | |||
226 | /* Media | ||
227 | * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. | ||
228 | * | | | | | | | | | | | | | | | ||
229 | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| | ||
230 | * | | | | | | | | Prev | Next | Mute | | Play/Pause | | ||
231 | * |----------`------`------`------`------`------`------`------`------`------`------`------------| | ||
232 | * | | | | | | | | VolD | VolU | | | | | ||
233 | * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| | ||
234 | * | | | | | | | | | | | | ||
235 | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' | ||
236 | */ | ||
237 | [_MEDIA] = KEYMAP_JD45( | ||
238 | /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ | ||
239 | _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
240 | /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ | ||
241 | _______ ,_______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, _______, KC_MPLY , | ||
242 | /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ | ||
243 | _______ ,_______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______ , | ||
244 | /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ | ||
245 | _______ , _______, _______, _______, _______ , _______ , _______, _______, _______, _______) | ||
246 | /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ | ||
247 | }; | ||
248 | |||
249 | void persistant_default_layer_set(uint16_t default_layer) { | ||
250 | eeconfig_update_default_layer(default_layer); | ||
251 | default_layer_set(default_layer); | ||
252 | } | ||
253 | |||
254 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
255 | switch (keycode) { | ||
256 | case QWERTY: | ||
257 | if (record->event.pressed) { | ||
258 | default_layer_set(1UL<<_QWERTY); | ||
259 | } | ||
260 | return false; | ||
261 | break; | ||
262 | case LOWER: | ||
263 | if (record->event.pressed) { | ||
264 | layer_on(_LOWER); | ||
265 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
266 | } else { | ||
267 | layer_off(_LOWER); | ||
268 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
269 | } | ||
270 | return false; | ||
271 | break; | ||
272 | case RAISE: | ||
273 | if (record->event.pressed) { | ||
274 | layer_on(_RAISE); | ||
275 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
276 | } else { | ||
277 | layer_off(_RAISE); | ||
278 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
279 | } | ||
280 | return false; | ||
281 | break; | ||
282 | } | ||
283 | return true; | ||
284 | } | ||
285 | |||
286 | /* | ||
287 | * Macro definition | ||
288 | */ | ||
289 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
290 | { | ||
291 | if (!eeconfig_is_enabled()) { | ||
292 | eeconfig_init(); | ||
293 | } | ||
294 | |||
295 | bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc. | ||
296 | // Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in: | ||
297 | // quantum/quantum.c | ||
298 | if(keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) { | ||
299 | use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc. | ||
300 | } | ||
301 | |||
302 | switch (id) { | ||
303 | case KC_ALT_TAB: | ||
304 | if(use_cmd) { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); } | ||
305 | else { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); } | ||
306 | case KC_CMD_TAB: | ||
307 | if(use_cmd) { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); } | ||
308 | else { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); } | ||
309 | |||
310 | case KC_CTL_TAB: | ||
311 | return (record->event.pressed ? MACRO( D(LCTRL), D(TAB), END ) : MACRO( U(TAB), END )); | ||
312 | case KC_CMD_SLSH: | ||
313 | return (record->event.pressed ? MACRO( D(LGUI), D(SLSH),END ) : MACRO( U(SLSH),END )); | ||
314 | |||
315 | case KC_AG_FIND: | ||
316 | return use_cmd ? MACRODOWN( D(LGUI), T(F), END ) : MACRODOWN( D(LCTRL), T(F), END ); | ||
317 | case KC_AG_AGAIN: | ||
318 | return use_cmd ? MACRODOWN( D(LGUI), T(G), END ) : MACRODOWN( D(LCTRL), T(G), END ); | ||
319 | case KC_AG_UNDO: | ||
320 | return use_cmd ? MACRODOWN( D(LGUI), T(Z), END ) : MACRODOWN( D(LCTRL), T(Z), END ); | ||
321 | case KC_AG_CUT: | ||
322 | return use_cmd ? MACRODOWN( D(LGUI), T(X), END ) : MACRODOWN( D(LCTRL), T(X), END ); | ||
323 | case KC_AG_COPY: | ||
324 | return use_cmd ? MACRODOWN( D(LGUI), T(C), END ) : MACRODOWN( D(LCTRL), T(C), END ); | ||
325 | case KC_AG_PASTE: | ||
326 | return use_cmd ? MACRODOWN( D(LGUI), T(V), END ) : MACRODOWN( D(LCTRL), T(V), END ); | ||
327 | |||
328 | case KC_AG_DESK_L: | ||
329 | return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(SCLN), END ) : MACRODOWN( D(LALT), D(LCTRL), T(SCLN), END ); | ||
330 | case KC_AG_DESK_R: | ||
331 | return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(QUOT), END ) : MACRODOWN( D(LALT), D(LCTRL), T(QUOT), END ); | ||
332 | |||
333 | case KC_AG_TAB_C: | ||
334 | return use_cmd ? MACRODOWN( D(LGUI), T(W), END ) : MACRODOWN( D(LCTRL), T(W), END ); | ||
335 | case KC_AG_TAB_N: | ||
336 | return use_cmd ? MACRODOWN( D(LGUI), T(T), END ) : MACRODOWN( D(LCTRL), T(T), END ); | ||
337 | case KC_AG_TAB_R: | ||
338 | return use_cmd ? MACRODOWN( D(LGUI), D(LSHIFT), T(T), END ) : MACRODOWN( D(LCTRL), D(LSHIFT), T(T), END ); | ||
339 | } | ||
340 | |||
341 | return MACRO_NONE; | ||
342 | } | ||