diff options
author | Nick Brassel <nick@tzarc.org> | 2023-02-28 11:22:29 +1100 |
---|---|---|
committer | Nick Brassel <nick@tzarc.org> | 2023-02-28 11:22:29 +1100 |
commit | bacec14073b2e897d5a52caf12de5a6a1f7b4078 (patch) | |
tree | d4e3e57aac1a829a191831efd2e62c8a43217885 /users/yet-another-developer/leader_user.c | |
parent | d70e9b8659a7fbbd7069fd542bd07e67e04327a1 (diff) | |
parent | b865b9e1706ad28ae4882bd2e0331e98808295fa (diff) |
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'users/yet-another-developer/leader_user.c')
-rw-r--r-- | users/yet-another-developer/leader_user.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/users/yet-another-developer/leader_user.c b/users/yet-another-developer/leader_user.c new file mode 100644 index 0000000000..53a7e2d7e5 --- /dev/null +++ b/users/yet-another-developer/leader_user.c @@ -0,0 +1,41 @@ +#include "leader_user.h" + +void leader_end_user(void) { + if (leader_sequence_two_keys(KC_V, KC_Z)){ + // vim: Zoom pane + tap_code16(LCTL(KC_W)); + tap_code16(LSFT(KC_BSLS)); + } + + if (leader_sequence_two_keys(KC_V, KC_R)) { + // vim: Substitute and place cursor + SEND_STRING(":%s///g" SS_TAP(X_LEFT)); + tap_code(KC_LEFT); + tap_code(KC_LEFT); + } + + if (leader_sequence_two_keys(KC_V, KC_T)) { + // vim: move current pane to new tab + tap_code16(LCTL(KC_W)); + tap_code16(LSFT(KC_T)); + } + + if (leader_sequence_three_keys(KC_BSPC, KC_BSPC, KC_BSPC)){ + // Reset the keyboard + reset_keyboard(); + } +} + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void){ + +#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. +// run_diablo_macro_check(); +#endif // TAP_DANCE_ENABLE + +#ifdef RGBLIGHT_ENABLE + matrix_scan_rgb(); +#endif // RGBLIGHT_ENABLE + + matrix_scan_keymap(); +} |