diff options
author | Ryan <fauxpark@gmail.com> | 2023-02-13 03:19:02 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 03:19:02 +1100 |
commit | bbf7a20b33de2d203518687cb5cd1aa85005ea27 (patch) | |
tree | ee1a5c412a02021d085c81a26321c3424eca7022 /keyboards/splitkb/kyria/keymaps/mattir | |
parent | d10350cd2ceb2b9d80522cdec3ea908118f7fd35 (diff) |
Refactor Leader key feature (#19632)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/splitkb/kyria/keymaps/mattir')
-rw-r--r-- | keyboards/splitkb/kyria/keymaps/mattir/keymap.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/keyboards/splitkb/kyria/keymaps/mattir/keymap.c b/keyboards/splitkb/kyria/keymaps/mattir/keymap.c index 5f97c40765..5bc0b8215e 100644 --- a/keyboards/splitkb/kyria/keymaps/mattir/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/mattir/keymap.c @@ -56,11 +56,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +void leader_end_user(void) { + if (leader_sequence_one_key(KC_A)) { + tap_code16(SGUI(KC_L)); + } + if (leader_sequence_two_keys(KC_S, KC_S)) { + tap_code16(SGUI(KC_5)); + } +} + bool is_cmd_tab_active = false; uint16_t cmd_tab_timer = 0; -LEADER_EXTERNS(); - void matrix_scan_user(void) { if (is_cmd_tab_active) { if (timer_elapsed(cmd_tab_timer) > 1000) { @@ -68,18 +75,6 @@ void matrix_scan_user(void) { is_cmd_tab_active = false; } } - - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_ONE_KEY(KC_A) { - tap_code16(SGUI(KC_L)); - } - SEQ_TWO_KEYS(KC_S, KC_S) { - tap_code16(SGUI(KC_5)); - } - } } #ifdef OLED_ENABLE |