diff options
author | Joel Challis <[email protected]> | 2024-11-23 13:35:34 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-11-23 13:35:34 +0000 |
commit | e4e015c0c80ca59d329e1343ee7803250b7e60fe (patch) | |
tree | 35fda543ce80327a2b79bdc522a4ebebed1a0729 /keyboards/sofle/keymaps | |
parent | 4a5bae51cd1f2cbca0ab8c8ae6e15262f8dc5a68 (diff) | |
download | qmk_firmware-e4e015c0c80ca59d329e1343ee7803250b7e60fe.tar.gz qmk_firmware-e4e015c0c80ca59d329e1343ee7803250b7e60fe.zip |
Update keymaps to use PDF keycode (#24633)
Diffstat (limited to 'keyboards/sofle/keymaps')
-rw-r--r-- | keyboards/sofle/keymaps/default/keymap.c | 17 | ||||
-rw-r--r-- | keyboards/sofle/keymaps/rgb_default/keymap.c | 24 |
2 files changed, 9 insertions, 32 deletions
diff --git a/keyboards/sofle/keymaps/default/keymap.c b/keyboards/sofle/keymaps/default/keymap.c index 37996c3e41..564a624c58 100644 --- a/keyboards/sofle/keymaps/default/keymap.c +++ b/keyboards/sofle/keymaps/default/keymap.c @@ -12,14 +12,15 @@ enum sofle_layers { }; enum custom_keycodes { - KC_QWERTY = QK_USER, - KC_COLEMAK, - KC_PRVWD, + KC_PRVWD = QK_USER, KC_NXTWD, KC_LSTRT, KC_LEND }; +#define KC_QWERTY PDF(_QWERTY) +#define KC_COLEMAK PDF(_COLEMAK) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * QWERTY @@ -134,16 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case KC_QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - case KC_COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; case KC_PRVWD: if (record->event.pressed) { if (keymap_config.swap_lctl_lgui) { diff --git a/keyboards/sofle/keymaps/rgb_default/keymap.c b/keyboards/sofle/keymaps/rgb_default/keymap.c index fd2346e10b..e992cf9adb 100644 --- a/keyboards/sofle/keymaps/rgb_default/keymap.c +++ b/keyboards/sofle/keymaps/rgb_default/keymap.c @@ -76,15 +76,16 @@ enum sofle_layers { }; enum custom_keycodes { - KC_QWERTY = SAFE_RANGE, - KC_COLEMAK, - KC_COLEMAKDH, - KC_LOWER, + KC_LOWER = SAFE_RANGE, KC_RAISE, KC_ADJUST, KC_D_MUTE }; +#define KC_QWERTY PDF(_QWERTY) +#define KC_COLEMAK PDF(_COLEMAK) +#define KC_COLEMAKDH PDF(_COLEMAKDH) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * QWERTY @@ -478,21 +479,6 @@ bool oled_task_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case KC_QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - case KC_COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - case KC_COLEMAKDH: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAKDH); - } - return false; case KC_LOWER: if (record->event.pressed) { layer_on(_LOWER); |