diff options
| author | Joel Challis <git@zvecr.com> | 2024-11-23 13:35:34 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-23 13:35:34 +0000 |
| commit | e4e015c0c80ca59d329e1343ee7803250b7e60fe (patch) | |
| tree | 35fda543ce80327a2b79bdc522a4ebebed1a0729 /keyboards/tkw | |
| parent | 4a5bae51cd1f2cbca0ab8c8ae6e15262f8dc5a68 (diff) | |
Update keymaps to use PDF keycode (#24633)
Diffstat (limited to 'keyboards/tkw')
| -rw-r--r-- | keyboards/tkw/grandiceps/keymaps/default/keymap.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/keyboards/tkw/grandiceps/keymaps/default/keymap.c b/keyboards/tkw/grandiceps/keymaps/default/keymap.c index 7c2cd09506..eb9ca69353 100644 --- a/keyboards/tkw/grandiceps/keymaps/default/keymap.c +++ b/keyboards/tkw/grandiceps/keymaps/default/keymap.c | |||
| @@ -26,9 +26,7 @@ enum grandiceps_layers { | |||
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| 28 | enum custom_keycodes { | 28 | enum custom_keycodes { |
| 29 | KC_QWERTY = SAFE_RANGE, | 29 | KC_LOWER = SAFE_RANGE, |
| 30 | KC_COLEMAK, | ||
| 31 | KC_LOWER, | ||
| 32 | KC_RAISE, | 30 | KC_RAISE, |
| 33 | KC_ADJUST, | 31 | KC_ADJUST, |
| 34 | KC_PRVWD, | 32 | KC_PRVWD, |
| @@ -39,7 +37,8 @@ enum custom_keycodes { | |||
| 39 | KC_TEAMS | 37 | KC_TEAMS |
| 40 | }; | 38 | }; |
| 41 | 39 | ||
| 42 | 40 | #define KC_QWERTY PDF(_QWERTY) | |
| 41 | #define KC_COLEMAK PDF(_COLEMAK) | ||
| 43 | 42 | ||
| 44 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 43 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 45 | /* | 44 | /* |
| @@ -154,19 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 154 | }; | 153 | }; |
| 155 | 154 | ||
| 156 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 155 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 157 | |||
| 158 | |||
| 159 | switch (keycode) { | 156 | switch (keycode) { |
| 160 | case KC_QWERTY: | ||
| 161 | if (record->event.pressed) { | ||
| 162 | set_single_persistent_default_layer(_QWERTY); | ||
| 163 | } | ||
| 164 | return false; | ||
| 165 | case KC_COLEMAK: | ||
| 166 | if (record->event.pressed) { | ||
| 167 | set_single_persistent_default_layer(_COLEMAK); | ||
| 168 | } | ||
| 169 | return false; | ||
| 170 | case KC_LOWER: | 157 | case KC_LOWER: |
| 171 | if (record->event.pressed) { | 158 | if (record->event.pressed) { |
| 172 | layer_on(_LOWER); | 159 | layer_on(_LOWER); |
