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 /keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space | |
parent | d70e9b8659a7fbbd7069fd542bd07e67e04327a1 (diff) | |
parent | b865b9e1706ad28ae4882bd2e0331e98808295fa (diff) |
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space')
-rw-r--r-- | keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/keymap.c | 148 |
1 files changed, 64 insertions, 84 deletions
diff --git a/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/keymap.c b/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/keymap.c index 885c31e8c6..1d49d91346 100644 --- a/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/keymap.c +++ b/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/keymap.c @@ -49,89 +49,69 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void matrix_init_user(void) { - -} - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - // Close a program in i3wm - SEQ_ONE_KEY(KC_Q) { - register_code(KC_LGUI); - register_code(KC_LSFT); - register_code(KC_Q); - unregister_code(KC_Q); - unregister_code(KC_LSFT); - unregister_code(KC_LGUI); - } - // Exit i3wm - SEQ_ONE_KEY(KC_E) { - register_code(KC_LGUI); - register_code(KC_LSFT); - register_code(KC_E); - unregister_code(KC_E); - unregister_code(KC_LSFT); - unregister_code(KC_LGUI); - } - // Copy selected text in suckless terminal - SEQ_ONE_KEY(KC_C) { - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_C); - unregister_code(KC_C); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - } - // Paste text in suckless terminal - SEQ_ONE_KEY(KC_V) { - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_V); - unregister_code(KC_V); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - } - // FZF shortcut to fuzzy switch directories - SEQ_ONE_KEY(KC_D) { - register_code(KC_LALT); - register_code(KC_C); - unregister_code(KC_C); - unregister_code(KC_LALT); - } - // Send keys to bring up fuzzy process kill - SEQ_ONE_KEY(KC_K) { - SEND_STRING("kill " SS_TAP(X_TAB)); - } - // Send keys to start neovim and fuzzy search for filename - SEQ_ONE_KEY(KC_T) { - SEND_STRING("nvim "); - register_code(KC_LCTL); - register_code(KC_T); - unregister_code(KC_T); - unregister_code(KC_LCTL); - } - // Switch between windows in tmux - SEQ_ONE_KEY(KC_L) { - register_code(KC_LCTL); - register_code(KC_B); - unregister_code(KC_B); - unregister_code(KC_LCTL); - register_code(KC_L); - unregister_code(KC_L); - } +void leader_end_user() { + // Close a program in i3wm + if (leader_sequence_one_key(KC_Q)) { + register_code(KC_LGUI); + register_code(KC_LSFT); + register_code(KC_Q); + unregister_code(KC_Q); + unregister_code(KC_LSFT); + unregister_code(KC_LGUI); + } + // Exit i3wm + if (leader_sequence_one_key(KC_E)) { + register_code(KC_LGUI); + register_code(KC_LSFT); + register_code(KC_E); + unregister_code(KC_E); + unregister_code(KC_LSFT); + unregister_code(KC_LGUI); + } + // Copy selected text in suckless terminal + if (leader_sequence_one_key(KC_C)) { + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_C); + unregister_code(KC_C); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + } + // Paste text in suckless terminal + if (leader_sequence_one_key(KC_V)) { + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_V); + unregister_code(KC_V); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + } + // FZF shortcut to fuzzy switch directories + if (leader_sequence_one_key(KC_D)) { + register_code(KC_LALT); + register_code(KC_C); + unregister_code(KC_C); + unregister_code(KC_LALT); + } + // Send keys to bring up fuzzy process kill + if (leader_sequence_one_key(KC_K)) { + SEND_STRING("kill " SS_TAP(X_TAB)); + } + // Send keys to start neovim and fuzzy search for filename + if (leader_sequence_one_key(KC_T)) { + SEND_STRING("nvim "); + register_code(KC_LCTL); + register_code(KC_T); + unregister_code(KC_T); + unregister_code(KC_LCTL); + } + // Switch between windows in tmux + if (leader_sequence_one_key(KC_L)) { + register_code(KC_LCTL); + register_code(KC_B); + unregister_code(KC_B); + unregister_code(KC_LCTL); + register_code(KC_L); + unregister_code(KC_L); } -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - } |