summaryrefslogtreecommitdiff
path: root/users/kuchosauronad0/leader.c
diff options
context:
space:
mode:
authorkuchosauronad0 <22005492+kuchosauronad0@users.noreply.github.com>2019-08-24 09:01:12 -0700
committerDrashna Jaelre <drashna@live.com>2019-08-24 09:01:12 -0700
commit2ef6bbbf5ffba0142613bc394c41ba580a7e2c7e (patch)
tree84a21a557f13e08ef6cc660a05f2fb2edc011ddf /users/kuchosauronad0/leader.c
parent51bcadf38cfccc08b287554ab17e21624abf55b8 (diff)
[Keymap] Update to userspace kuchosauroand0 (#6596)
* added combos * minor adjustments, added combos * Add second encoder, add modifiers to encoders Added a skeleton for the possibily having a second encoder. Added 9 modifiers for the first rotary encoder: - None General navigation. Page up/down - SHIFT Fast navigation. Home/end - CTRL Vertical navigation. Up/down - CTRL+SHIFT Horizontal navigation. Left/right - ALT Audio volume control. - GUI Browser navigation(windows). Forward/backward - ALT+SHIFT Form navigation. Tab up/down - ALT+CTRL Media control. (Play|pause)/mute - HYPER Media navigation. Next/prev track Key codes are stored in `uint16_t encoder_actions[2][9]` * Add second encoder, add modifiers to encoders Added a skeleton for the possibily having a second encoder. Added 9 modifiers for the first rotary encoder: - None General navigation. Page up/down - SHIFT Fast navigation. Home/end - CTRL Vertical navigation. Up/down - CTRL+SHIFT Horizontal navigation. Left/right - ALT Audio volume control. - GUI Browser navigation(windows). Forward/backward - ALT+SHIFT Form navigation. Tab up/down - ALT+CTRL Media control. (Play|pause)/mute - HYPER Media navigation. Next/prev track Key codes are stored in `uint16_t encoder_actions[2][9]` * Clean up; added combos Combos: - CV: Copy - XC: Cut - ZV: Paste - QP: KC_SLEEP * Fix LEADER_DICTIONARY to be more useful * Add documentation * Minor fixes * Raise TAPPING_TERM * testing * Rearrange modifiers * Fix kc being stored in uint8 instead of uint16 * Update documentation * Clean up * Remove excess comments * Put encoder_actions in progmem
Diffstat (limited to 'users/kuchosauronad0/leader.c')
-rw-r--r--users/kuchosauronad0/leader.c43
1 files changed, 18 insertions, 25 deletions
diff --git a/users/kuchosauronad0/leader.c b/users/kuchosauronad0/leader.c
index 611b70074c..58935abb3c 100644
--- a/users/kuchosauronad0/leader.c
+++ b/users/kuchosauronad0/leader.c
@@ -20,12 +20,9 @@ void matrix_scan_user(void){
LEADER_DICTIONARY() {
leading = false;
leader_end();
- // Q is for TMUX
- // Z is for OS related things
- // other single key sequences are mostly for terminals and vim
SEQ_ONE_KEY(KC_W) {
- // Vim + Tmux Macro, when in command mode in vim: write to file, change to the other pane in the current session and repeat the last command
+ // vim/tmux: Use in command mode in vim: write to file, switch tmux pane in the current session window and repeat the last command
SEND_STRING(":w" SS_TAP(X_ENTER));
tmux_pane_switch_repeat();
}
@@ -36,42 +33,38 @@ void matrix_scan_user(void){
}
SEQ_ONE_KEY(KC_A) {
- // Send the Tmux Prefix and press 'right' arrow
+ // tmux: Send the prefix and press 'right' arrow
tmux_prefix();
tap_code(KC_RIGHT);
}
SEQ_TWO_KEYS(KC_T, KC_T) {
- // Send the Tmux Prefix to a nested session
+ // tmux: Send the prefix to a nested session
tmux_prefix();
tmux_prefix();
}
- SEQ_TWO_KEYS(KC_Q, KC_A) {
- // Switch pane and repeat last action
+ SEQ_TWO_KEYS(KC_T, KC_R) {
+ // tmux: Switch pane and repeat last action
tmux_pane_switch_repeat();
}
- SEQ_TWO_KEYS(KC_Z, KC_P){
- // Press windows key, send string 'plex' and press enter
- register_code(KC_LGUI);
- register_code(KC_S);
- unregister_code(KC_S);
-
- unregister_code(KC_LGUI);
- SEND_STRING("plex");
- tap_code(KC_ENTER);
+ SEQ_TWO_KEYS(KC_V, KC_Z){
+ // vim: Zoom pane
+ tap_code16(LCTL(KC_W));
+ tap_code16(LSFT(KC_BSLS));
}
- SEQ_TWO_KEYS(KC_Z, KC_F) {
- // Open a search
- register_code(KC_LGUI);
- register_code(KC_S);
- unregister_code(KC_S);
- unregister_code(KC_LGUI);
+ SEQ_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);
}
- SEQ_TWO_KEYS(KC_Z, KC_Z) {
- SEND_STRING("https://start.duckduckgo.com"SS_TAP(X_ENTER));
+ SEQ_TWO_KEYS(KC_V, KC_T) {
+ // vim: move current pane to new tab
+ tap_code16(LCTL(KC_W));
+ tap_code16(LSFT(KC_T));
}
SEQ_THREE_KEYS(KC_BSPC, KC_BSPC, KC_BSPC){