diff options
Diffstat (limited to 'users/jjerrell')
-rw-r--r-- | users/jjerrell/jjerrell.c | 65 | ||||
-rw-r--r-- | users/jjerrell/wrappers.h | 6 |
2 files changed, 32 insertions, 39 deletions
diff --git a/users/jjerrell/jjerrell.c b/users/jjerrell/jjerrell.c index 95c2acba5e..47aa9bc042 100644 --- a/users/jjerrell/jjerrell.c +++ b/users/jjerrell/jjerrell.c @@ -23,41 +23,36 @@ __attribute__((weak)) void matrix_scan_keymap(void) {} __attribute__((weak)) void leader_scan_secrets(void) {} #ifdef LEADER_ENABLE - LEADER_EXTERNS(); - void matrix_scan_leader(void) { - static uint8_t mods = 0; - mods = get_mods(); - LEADER_DICTIONARY() { - leading = false; - leader_end(); - clear_mods(); - - // Website Refresh / XCode "Run" - SEQ_ONE_KEY(KC_R) { - SEND_STRING(SS_LGUI("r")); - } - - SEQ_TWO_KEYS(KC_B, KC_D) { - send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION " Built at: " QMK_BUILDDATE), TAP_CODE_DELAY); - } - - SEQ_TWO_KEYS(KC_L, KC_C) { - send_string_with_delay("/** */", TAP_CODE_DELAY); - wait_ms(TAPPING_TERM); - tap_code(KC_LEFT); - tap_code(KC_LEFT); - tap_code(KC_LEFT); - if (!(mods & MOD_MASK_SHIFT)) { - tap_code(KC_ENT); - } - } - - set_mods(mods); - #ifndef NO_SECRETS - leader_scan_secrets(); - #endif // !NO_SECRETS +void leader_end_user(void) { + static uint8_t mods = 0; + mods = get_mods(); + clear_mods(); + + // Website Refresh / XCode "Run" + if (leader_sequence_one_key(KC_R)) { + SEND_STRING(SS_LGUI("r")); + } + + if (leader_sequence_two_keys(KC_B, KC_D)) { + send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION " Built at: " QMK_BUILDDATE), TAP_CODE_DELAY); + } + + if (leader_sequence_two_keys(KC_L, KC_C)) { + send_string_with_delay("/** */", TAP_CODE_DELAY); + wait_ms(TAPPING_TERM); + tap_code(KC_LEFT); + tap_code(KC_LEFT); + tap_code(KC_LEFT); + if (!(mods & MOD_MASK_SHIFT)) { + tap_code(KC_ENT); } } + + set_mods(mods); + #ifndef NO_SECRETS + leader_scan_secrets(); + #endif // !NO_SECRETS +} #endif static bool is_first_run = true; @@ -66,9 +61,7 @@ void matrix_scan_user(void) { is_first_run = false; startup_user(); } - #ifdef LEADER_ENABLE - matrix_scan_leader(); - #endif + matrix_scan_keymap(); } diff --git a/users/jjerrell/wrappers.h b/users/jjerrell/wrappers.h index 39e579cbfa..f98e9ef121 100644 --- a/users/jjerrell/wrappers.h +++ b/users/jjerrell/wrappers.h @@ -323,7 +323,7 @@ #define __________________ADJUST_L2__________________ KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT #define __________________ADJUST_L3__________________ KC_VRSN, AU_ON, AU_OFF, CG_SWAP, CG_NORM -#define __________________ADJUST_R1__________________ MU_MOD, MU_ON, MU_OFF, MI_ON, MI_OFF -#define __________________ADJUST_R2__________________ MUV_IN, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD -#define __________________ADJUST_R3__________________ MUV_DE, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD +#define __________________ADJUST_R1__________________ MU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF +#define __________________ADJUST_R2__________________ AU_NEXT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD +#define __________________ADJUST_R3__________________ AU_PREV, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD // clang-format on |