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/mechkeys/mechmini/v2/keymaps/wsturgiss | |
parent | d10350cd2ceb2b9d80522cdec3ea908118f7fd35 (diff) |
Refactor Leader key feature (#19632)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss')
-rw-r--r-- | keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c b/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c index 2338bb7d04..85725c8c5c 100644 --- a/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c +++ b/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c @@ -50,39 +50,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; //Leader maps - - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_ONE_KEY(KC_F) { - // Anything you can do in a macro. - SEND_STRING("QMK is awesome."); +void leader_end_user(void) { + if (leader_sequence_one_key(KC_F)) { + // Anything you can do in a macro. + SEND_STRING("QMK is awesome."); } //tableflip (LEADER - TF) - SEQ_TWO_KEYS(KC_T, KC_F) { + if (leader_sequence_two_keys(KC_T, KC_F)) { set_unicode_input_mode(UNICODE_MODE_MACOS); send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); } //screencap (LEADER - SC) - SEQ_TWO_KEYS(KC_S, KC_C) { - SEND_STRING(SS_LGUI(SS_LSFT(SS_TAP(X_4)))); + if (leader_sequence_two_keys(KC_S, KC_C)) { + SEND_STRING(SS_LGUI(SS_LSFT(SS_TAP(X_4)))); } //screencap (LEADER - TM) - SEQ_TWO_KEYS(KC_T, KC_M) { + if (leader_sequence_two_keys(KC_T, KC_M)) { set_unicode_input_mode(UNICODE_MODE_MACOS); register_unicode(0x2122); // ™ } /* - SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { - SEND_STRING("https://start.duckduckgo.com"SS_TAP(X_ENTER)); + if (leader_sequence_three_keys(KC_D, KC_D, KC_S)) { + SEND_STRING("https://start.duckduckgo.com"SS_TAP(X_ENTER)); } */ - } } //change colors and rgb modes on layer change |