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/7c8 | |
parent | d10350cd2ceb2b9d80522cdec3ea908118f7fd35 (diff) |
Refactor Leader key feature (#19632)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/7c8')
-rw-r--r-- | keyboards/7c8/framework/keymaps/steven/keymap.c | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/keyboards/7c8/framework/keymaps/steven/keymap.c b/keyboards/7c8/framework/keymaps/steven/keymap.c index f39be10c2d..5cba63e0fa 100644 --- a/keyboards/7c8/framework/keymaps/steven/keymap.c +++ b/keyboards/7c8/framework/keymaps/steven/keymap.c @@ -78,42 +78,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - // qq, alt+f4 close window - SEQ_TWO_KEYS(KC_Q, KC_Q) { - tap_code16(A(KC_F4)); - } +void leader_end_user(void) { + // qq, alt+f4 close window + if (leader_sequence_two_keys(KC_Q, KC_Q)) { + tap_code16(A(KC_F4)); + } - // ee, open explorer - SEQ_TWO_KEYS(KC_E, KC_E) { - tap_code16(G(KC_E)); - } + // ee, open explorer + if (leader_sequence_two_keys(KC_E, KC_E)) { + tap_code16(G(KC_E)); + } - // rr, windows run prompt - SEQ_TWO_KEYS(KC_R, KC_R) { - tap_code16(G(KC_R)); - } + // rr, windows run prompt + if (leader_sequence_two_keys(KC_R, KC_R)) { + tap_code16(G(KC_R)); + } - // ww, maximize window - SEQ_TWO_KEYS(KC_W, KC_W) { - tap_code16(G(KC_UP)); - } + // ww, maximize window + if (leader_sequence_two_keys(KC_W, KC_W)) { + tap_code16(G(KC_UP)); + } - // ss, minimize window - SEQ_TWO_KEYS(KC_S, KC_S) { - tap_code16(G(KC_DOWN)); - } + // ss, minimize window + if (leader_sequence_two_keys(KC_S, KC_S)) { + tap_code16(G(KC_DOWN)); + } - // <space><space>, toggle desktop - SEQ_TWO_KEYS(KC_SPC, KC_SPC) { - tap_code16(G(KC_D)); - } + // <space><space>, toggle desktop + if (leader_sequence_two_keys(KC_SPC, KC_SPC)) { + tap_code16(G(KC_D)); } } |