Refactor Leader key feature (#19632)
Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
parent
d10350cd2c
commit
bbf7a20b33
File diff suppressed because it is too large
Load Diff
@ -78,42 +78,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
LEADER_EXTERNS();
|
||||
void leader_end_user(void) {
|
||||
// qq, alt+f4 close window
|
||||
if (leader_sequence_two_keys(KC_Q, KC_Q)) {
|
||||
tap_code16(A(KC_F4));
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
// ee, open explorer
|
||||
if (leader_sequence_two_keys(KC_E, KC_E)) {
|
||||
tap_code16(G(KC_E));
|
||||
}
|
||||
|
||||
// qq, alt+f4 close window
|
||||
SEQ_TWO_KEYS(KC_Q, KC_Q) {
|
||||
tap_code16(A(KC_F4));
|
||||
}
|
||||
// rr, windows run prompt
|
||||
if (leader_sequence_two_keys(KC_R, KC_R)) {
|
||||
tap_code16(G(KC_R));
|
||||
}
|
||||
|
||||
// ee, open explorer
|
||||
SEQ_TWO_KEYS(KC_E, KC_E) {
|
||||
tap_code16(G(KC_E));
|
||||
}
|
||||
// ww, maximize window
|
||||
if (leader_sequence_two_keys(KC_W, KC_W)) {
|
||||
tap_code16(G(KC_UP));
|
||||
}
|
||||
|
||||
// rr, windows run prompt
|
||||
SEQ_TWO_KEYS(KC_R, KC_R) {
|
||||
tap_code16(G(KC_R));
|
||||
}
|
||||
// ss, minimize window
|
||||
if (leader_sequence_two_keys(KC_S, KC_S)) {
|
||||
tap_code16(G(KC_DOWN));
|
||||
}
|
||||
|
||||
// ww, maximize window
|
||||
SEQ_TWO_KEYS(KC_W, KC_W) {
|
||||
tap_code16(G(KC_UP));
|
||||
}
|
||||
|
||||
// ss, minimize window
|
||||
SEQ_TWO_KEYS(KC_S, KC_S) {
|
||||
tap_code16(G(KC_DOWN));
|
||||
}
|
||||
|
||||
// <space><space>, toggle desktop
|
||||
SEQ_TWO_KEYS(KC_SPC, KC_SPC) {
|
||||
tap_code16(G(KC_D));
|
||||
}
|
||||
// <space><space>, toggle desktop
|
||||
if (leader_sequence_two_keys(KC_SPC, KC_SPC)) {
|
||||
tap_code16(G(KC_D));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,47 @@ void keyboard_post_init_keymap(void) {
|
||||
bspc_timer = 0;
|
||||
}
|
||||
|
||||
LEADER_EXTERNS();
|
||||
void leader_end_user(void) {
|
||||
// layer navigation
|
||||
if (leader_sequence_one_key(KC_R)) { layer_invert(_RPT); }
|
||||
if (leader_sequence_one_key(KC_G)) { layer_invert(_GAME); }
|
||||
if (leader_sequence_one_key(KC_K)) { layer_invert(_KP); }
|
||||
if (leader_sequence_one_key(KC_KP_5)) { layer_invert(_KP); }
|
||||
|
||||
// tmux navigation
|
||||
if (leader_sequence_one_key(KC_L)) { SEND_STRING(SS_LCTL("a") "n"); }
|
||||
if (leader_sequence_one_key(KC_H)) { SEND_STRING(SS_LCTL("a") "p"); }
|
||||
if (leader_sequence_one_key(KC_N)) { SEND_STRING(SS_LCTL("a") "c"); }
|
||||
if (leader_sequence_one_key(KC_W)) { SEND_STRING(SS_LCTL("a") "x"); }
|
||||
if (leader_sequence_one_key(KC_MINS)) { SEND_STRING(SS_LCTL("a") "-"); }
|
||||
if (leader_sequence_one_key(KC_QUOT)) { SEND_STRING(SS_LCTL("a") "\""); }
|
||||
if (leader_sequence_one_key(KC_1)) { SEND_STRING(SS_LCTL("a") "1"); }
|
||||
if (leader_sequence_one_key(KC_2)) { SEND_STRING(SS_LCTL("a") "2"); }
|
||||
if (leader_sequence_one_key(KC_3)) { SEND_STRING(SS_LCTL("a") "3"); }
|
||||
if (leader_sequence_one_key(KC_4)) { SEND_STRING(SS_LCTL("a") "4"); }
|
||||
if (leader_sequence_one_key(KC_5)) { SEND_STRING(SS_LCTL("a") "5"); }
|
||||
if (leader_sequence_one_key(KC_6)) { SEND_STRING(SS_LCTL("a") "6"); }
|
||||
if (leader_sequence_one_key(KC_7)) { SEND_STRING(SS_LCTL("a") "7"); }
|
||||
if (leader_sequence_one_key(KC_8)) { SEND_STRING(SS_LCTL("a") "8"); }
|
||||
if (leader_sequence_one_key(KC_9)) { SEND_STRING(SS_LCTL("a") "9"); }
|
||||
|
||||
// secrets
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_M)) { send_secret_string(0); }
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_COMM)) { send_secret_string(1); }
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_DOT)) { send_secret_string(2); }
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_J)) { send_secret_string(3); }
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_K)) { send_secret_string(4); }
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_L)) { send_secret_string(5); }
|
||||
|
||||
// fast control-C
|
||||
if (leader_sequence_one_key(KC_C)) { tap_code16(C(KC_C)); }
|
||||
|
||||
// neovim: terminal escape
|
||||
if (leader_sequence_one_key(KC_BSLS)) {
|
||||
tap_code16(C(KC_BSLS));
|
||||
tap_code16(C(KC_N));
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_keymap(void) {
|
||||
if (rgblight_is_enabled() && timer_elapsed(rgb_timer) > 1000) {
|
||||
@ -248,50 +288,6 @@ void matrix_scan_keymap(void) {
|
||||
bspc_timer = 0;
|
||||
register_code(KC_BSPC);
|
||||
}
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
// layer navigation
|
||||
SEQ_ONE_KEY(KC_R) { layer_invert(_RPT); }
|
||||
SEQ_ONE_KEY(KC_G) { layer_invert(_GAME); }
|
||||
SEQ_ONE_KEY(KC_K) { layer_invert(_KP); }
|
||||
SEQ_ONE_KEY(KC_KP_5) { layer_invert(_KP); }
|
||||
|
||||
// tmux navigation
|
||||
SEQ_ONE_KEY(KC_L) { SEND_STRING(SS_LCTL("a") "n"); }
|
||||
SEQ_ONE_KEY(KC_H) { SEND_STRING(SS_LCTL("a") "p"); }
|
||||
SEQ_ONE_KEY(KC_N) { SEND_STRING(SS_LCTL("a") "c"); }
|
||||
SEQ_ONE_KEY(KC_W) { SEND_STRING(SS_LCTL("a") "x"); }
|
||||
SEQ_ONE_KEY(KC_MINS) { SEND_STRING(SS_LCTL("a") "-"); }
|
||||
SEQ_ONE_KEY(KC_QUOT) { SEND_STRING(SS_LCTL("a") "\""); }
|
||||
SEQ_ONE_KEY(KC_1) { SEND_STRING(SS_LCTL("a") "1"); }
|
||||
SEQ_ONE_KEY(KC_2) { SEND_STRING(SS_LCTL("a") "2"); }
|
||||
SEQ_ONE_KEY(KC_3) { SEND_STRING(SS_LCTL("a") "3"); }
|
||||
SEQ_ONE_KEY(KC_4) { SEND_STRING(SS_LCTL("a") "4"); }
|
||||
SEQ_ONE_KEY(KC_5) { SEND_STRING(SS_LCTL("a") "5"); }
|
||||
SEQ_ONE_KEY(KC_6) { SEND_STRING(SS_LCTL("a") "6"); }
|
||||
SEQ_ONE_KEY(KC_7) { SEND_STRING(SS_LCTL("a") "7"); }
|
||||
SEQ_ONE_KEY(KC_8) { SEND_STRING(SS_LCTL("a") "8"); }
|
||||
SEQ_ONE_KEY(KC_9) { SEND_STRING(SS_LCTL("a") "9"); }
|
||||
|
||||
// secrets
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_M) { send_secret_string(0); }
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_COMM) { send_secret_string(1); }
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_DOT) { send_secret_string(2); }
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_J) { send_secret_string(3); }
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_K) { send_secret_string(4); }
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_L) { send_secret_string(5); }
|
||||
|
||||
// fast control-C
|
||||
SEQ_ONE_KEY(KC_C) { tap_code16(C(KC_C)); }
|
||||
|
||||
// neovim: terminal escape
|
||||
SEQ_ONE_KEY(KC_BSLS) {
|
||||
tap_code16(C(KC_BSLS));
|
||||
tap_code16(C(KC_N));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY(TD(APMR_PIPE)) {
|
||||
register_code(KC_LCTL);
|
||||
register_code(KC_LSFT);
|
||||
register_code(KC_U);
|
||||
|
||||
unregister_code(KC_U);
|
||||
unregister_code(KC_LSFT);
|
||||
unregister_code(KC_LCTL);
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
LEADER_EXTERNS();
|
@ -1,5 +1,3 @@
|
||||
#include "../leader/leader_setup.c"
|
||||
|
||||
bool MATRIX_SCANNED = false;
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
@ -7,6 +5,16 @@ void matrix_scan_user(void) {
|
||||
rgblight_sethsv_noeeprom(HSV_GREEN);
|
||||
MATRIX_SCANNED = true;
|
||||
}
|
||||
|
||||
#include "../leader/leader_dictionary.c"
|
||||
};
|
||||
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(TD(APMR_PIPE))) {
|
||||
register_code(KC_LCTL);
|
||||
register_code(KC_LSFT);
|
||||
register_code(KC_U);
|
||||
|
||||
unregister_code(KC_U);
|
||||
unregister_code(KC_LSFT);
|
||||
unregister_code(KC_LCTL);
|
||||
}
|
||||
}
|
||||
|
@ -244,7 +244,30 @@ uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
|
||||
LEADER_EXTERNS();
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(KC_F)) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
if (leader_sequence_one_key(KC_S)) {
|
||||
SEND_STRING ("sudo -i\n");
|
||||
}
|
||||
if (leader_sequence_one_key(KC_H)) {
|
||||
SEND_STRING ("--help\n");
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_D, KC_D)) {
|
||||
SEND_STRING(SS_LGUI("ac"));
|
||||
/* SEND_STRING(SS_LGUI("a") SS_LGUI("c")); */
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_D, KC_D, KC_S)) {
|
||||
SEND_STRING("https://start.duckduckgo.com\n");
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_A, KC_S)) {
|
||||
register_code(KC_LGUI);
|
||||
register_code(KC_S);
|
||||
unregister_code(KC_S);
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
if (is_alt_tab_active) {
|
||||
@ -253,31 +276,4 @@ void matrix_scan_user(void) {
|
||||
is_alt_tab_active = false;
|
||||
}
|
||||
}
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY(KC_F) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
SEQ_ONE_KEY(KC_S) {
|
||||
SEND_STRING ("sudo -i\n");
|
||||
}
|
||||
SEQ_ONE_KEY(KC_H) {
|
||||
SEND_STRING ("--help\n");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_D, KC_D) {
|
||||
SEND_STRING(SS_LGUI("ac"));
|
||||
/* SEND_STRING(SS_LGUI("a") SS_LGUI("c")); */
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_D, KC_D, KC_S) {
|
||||
SEND_STRING("https://start.duckduckgo.com\n");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_A, KC_S) {
|
||||
register_code(KC_LGUI);
|
||||
register_code(KC_S);
|
||||
unregister_code(KC_S);
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
||||
}
|
||||
|
@ -42,25 +42,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LEFT, KC_RGHT, _______, KC_PENT,
|
||||
_______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)};
|
||||
|
||||
/*void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY(KC_RSFT) {
|
||||
register_code(KC_S);
|
||||
unregister_code(KC_S);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_A, KC_S) {
|
||||
register_code(KC_H);
|
||||
unregister_code(KC_H);
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_A, KC_S, KC_D) {
|
||||
register_code(KC_LGUI);
|
||||
register_code(KC_S);
|
||||
unregister_code(KC_S);
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
@ -181,15 +181,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY(KC_U) {
|
||||
SEND_STRING(":luvu:\n");
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(KC_U)) {
|
||||
SEND_STRING(":luvu:\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -255,38 +255,29 @@ L06 -> <TBD>: UNSPECIFIED
|
||||
|
||||
};
|
||||
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(KC_1)) {
|
||||
// ¯\_(ツ)_/¯
|
||||
unicode_input_start(); register_hex(0xaf); unicode_input_finish();
|
||||
register_code (KC_RALT); TAP_ONCE (KC_MINS); unregister_code (KC_RALT);
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
|
||||
unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT);
|
||||
unicode_input_start (); register_hex(0xaf); unicode_input_finish();
|
||||
}
|
||||
|
||||
if (leader_sequence_one_key(KC_2)) {
|
||||
// 凸(ツ)凸
|
||||
unicode_input_start(); register_hex(0x51F8); unicode_input_finish();
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
|
||||
unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
|
||||
unicode_input_start (); register_hex(0x51F8); unicode_input_finish();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
set_unicode_input_mode(UNICODE_MODE_LINUX);
|
||||
};
|
||||
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY (KC_1) {
|
||||
// ¯\_(ツ)_/¯
|
||||
unicode_input_start(); register_hex(0xaf); unicode_input_finish();
|
||||
register_code (KC_RALT); TAP_ONCE (KC_MINS); unregister_code (KC_RALT);
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
|
||||
unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT);
|
||||
unicode_input_start (); register_hex(0xaf); unicode_input_finish();
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY (KC_2) {
|
||||
// 凸(ツ)凸
|
||||
unicode_input_start(); register_hex(0x51F8); unicode_input_finish();
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
|
||||
unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
|
||||
unicode_input_start (); register_hex(0x51F8); unicode_input_finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,9 +32,6 @@ enum custom_keycodes {
|
||||
#define MW_L KC_MS_WH_LEFT
|
||||
#define MW_R KC_MS_WH_RIGHT
|
||||
|
||||
//// only uncomment the below line when you enable leader key in rules.mk
|
||||
//LEADER_EXTERNS();
|
||||
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
TD_SCL = 0
|
||||
|
@ -76,68 +76,62 @@ static bool wiggle_mouse;
|
||||
static uint16_t wiggle_timer;
|
||||
static uint16_t next_wiggle;
|
||||
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY(QK_LEAD) {
|
||||
tap_code(KC_CAPS);
|
||||
}
|
||||
|
||||
SEQ_FOUR_KEYS(KC_I, KC_D, KC_L, KC_E) {
|
||||
wiggle_mouse = !wiggle_mouse;
|
||||
wiggle_timer = timer_read();
|
||||
}
|
||||
|
||||
SEQ_TWO_KEYS(KC_O, KC_K) {
|
||||
send_unicode_string("👍");
|
||||
}
|
||||
|
||||
SEQ_THREE_KEYS(KC_S, KC_A, KC_D) {
|
||||
send_unicode_string("😞");
|
||||
}
|
||||
|
||||
SEQ_FIVE_KEYS(KC_C, KC_H, KC_E, KC_C, KC_K) {
|
||||
send_unicode_string("✅");
|
||||
}
|
||||
|
||||
SEQ_FIVE_KEYS(KC_C, KC_R, KC_O, KC_S, KC_S) {
|
||||
send_unicode_string("❎");
|
||||
}
|
||||
|
||||
SEQ_FIVE_KEYS(KC_T, KC_H, KC_A, KC_N, KC_K) {
|
||||
send_unicode_string("🙏");
|
||||
}
|
||||
|
||||
SEQ_FIVE_KEYS(KC_S, KC_M, KC_I, KC_L, KC_E) {
|
||||
send_unicode_string("😊");
|
||||
}
|
||||
|
||||
SEQ_FIVE_KEYS(KC_P, KC_A, KC_R, KC_T, KC_Y) {
|
||||
send_unicode_string("🎉");
|
||||
}
|
||||
|
||||
SEQ_FOUR_KEYS(KC_E, KC_Y, KC_E, KC_S) {
|
||||
send_unicode_string("(ಠ_ಠ)");
|
||||
}
|
||||
|
||||
SEQ_FIVE_KEYS(KC_M, KC_A, KC_G, KC_I, KC_C) {
|
||||
send_unicode_string("(ಠ_ಠ) 🪄 ⠁⭒*.✫.*⭒⠁");
|
||||
}
|
||||
|
||||
SEQ_FIVE_KEYS(KC_T, KC_A, KC_B, KC_L, KC_E) {
|
||||
send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
|
||||
}
|
||||
|
||||
SEQ_FIVE_KEYS(KC_S, KC_H, KC_R, KC_U, KC_G) {
|
||||
send_unicode_string("¯\\_(ツ)_/¯");
|
||||
}
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(QK_LEAD)) {
|
||||
tap_code(KC_CAPS);
|
||||
}
|
||||
|
||||
if (leader_sequence_four_keys(KC_I, KC_D, KC_L, KC_E)) {
|
||||
wiggle_mouse = !wiggle_mouse;
|
||||
wiggle_timer = timer_read();
|
||||
}
|
||||
|
||||
if (leader_sequence_two_keys(KC_O, KC_K)) {
|
||||
send_unicode_string("👍");
|
||||
}
|
||||
|
||||
if (leader_sequence_three_keys(KC_S, KC_A, KC_D)) {
|
||||
send_unicode_string("😞");
|
||||
}
|
||||
|
||||
if (leader_sequence_five_keys(KC_C, KC_H, KC_E, KC_C, KC_K)) {
|
||||
send_unicode_string("✅");
|
||||
}
|
||||
|
||||
if (leader_sequence_five_keys(KC_C, KC_R, KC_O, KC_S, KC_S)) {
|
||||
send_unicode_string("❎");
|
||||
}
|
||||
|
||||
if (leader_sequence_five_keys(KC_T, KC_H, KC_A, KC_N, KC_K)) {
|
||||
send_unicode_string("🙏");
|
||||
}
|
||||
|
||||
if (leader_sequence_five_keys(KC_S, KC_M, KC_I, KC_L, KC_E)) {
|
||||
send_unicode_string("😊");
|
||||
}
|
||||
|
||||
if (leader_sequence_five_keys(KC_P, KC_A, KC_R, KC_T, KC_Y)) {
|
||||
send_unicode_string("🎉");
|
||||
}
|
||||
|
||||
if (leader_sequence_four_keys(KC_E, KC_Y, KC_E, KC_S)) {
|
||||
send_unicode_string("(ಠ_ಠ)");
|
||||
}
|
||||
|
||||
if (leader_sequence_five_keys(KC_M, KC_A, KC_G, KC_I, KC_C)) {
|
||||
send_unicode_string("(ಠ_ಠ) 🪄 ⠁⭒*.✫.*⭒⠁");
|
||||
}
|
||||
|
||||
if (leader_sequence_five_keys(KC_T, KC_A, KC_B, KC_L, KC_E)) {
|
||||
send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
|
||||
}
|
||||
|
||||
if (leader_sequence_five_keys(KC_S, KC_H, KC_R, KC_U, KC_G)) {
|
||||
send_unicode_string("¯\\_(ツ)_/¯");
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
if (wiggle_mouse && timer_elapsed(wiggle_timer) > next_wiggle) {
|
||||
wiggle_timer = timer_read();
|
||||
|
||||
|
@ -446,27 +446,18 @@ bool rgb_matrix_indicators_user(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef LEADER_ENABLE
|
||||
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.");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_D, KC_D) {
|
||||
SEND_STRING(SS_LCTL("a") SS_LCTL("c"));
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_S, KC_S) {
|
||||
SEND_STRING(SS_LCTL("v"));
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_D, KC_D, KC_S) {
|
||||
SEND_STRING("https://start.duckduckgo.com\n");
|
||||
}
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(KC_F)) {
|
||||
// Anything you can do in a macro.
|
||||
SEND_STRING("QMK is awesome.");
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_D, KC_D)) {
|
||||
SEND_STRING(SS_LCTL("a") SS_LCTL("c"));
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_S, KC_S)) {
|
||||
SEND_STRING(SS_LCTL("v"));
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_D, KC_D, KC_S)) {
|
||||
SEND_STRING("https://start.duckduckgo.com\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -255,30 +255,19 @@ bool rgb_matrix_indicators_user(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef LEADER_ENABLE
|
||||
LEADER_EXTERNS();
|
||||
|
||||
//SEND_STRING seems to be local dependent.
|
||||
//For swiss-german layout I have to send "ctrl+." to get ":"
|
||||
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.");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_D, KC_D) {
|
||||
SEND_STRING(SS_LCTL("a") SS_LCTL("c"));
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_D, KC_D, KC_S) {
|
||||
SEND_STRING("https");
|
||||
register_code(KC_LSFT);
|
||||
SEND_STRING(".77");
|
||||
unregister_code(KC_LSFT);
|
||||
SEND_STRING("start.duckduckgo.com\n");
|
||||
}
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(KC_F)) {
|
||||
// Anything you can do in a macro.
|
||||
SEND_STRING("QMK is awesome.");
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_D, KC_D)) {
|
||||
SEND_STRING(SS_LCTL("a") SS_LCTL("c"));
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_D, KC_D, KC_S)) {
|
||||
SEND_STRING("https");
|
||||
register_code(KC_LSFT);
|
||||
SEND_STRING(".77");
|
||||
unregister_code(KC_LSFT);
|
||||
SEND_STRING("start.duckduckgo.com\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -256,6 +256,54 @@ static void set_rgb_layer(int layer) {
|
||||
}
|
||||
}
|
||||
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(KC_K)) {
|
||||
layer_invert(_KP);
|
||||
}
|
||||
if (leader_sequence_one_key(KC_G)) {
|
||||
layer_invert(_GAME);
|
||||
}
|
||||
if (leader_sequence_one_key(KC_KP_5)) {
|
||||
layer_invert(_KP);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_1)) {
|
||||
send_secret_string(0);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_2)) {
|
||||
send_secret_string(1);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_3)) {
|
||||
send_secret_string(2);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_4)) {
|
||||
send_secret_string(3);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_5)) {
|
||||
send_secret_string(4);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_6)) {
|
||||
send_secret_string(5);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_M)) {
|
||||
send_secret_string(0);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_COMM)) {
|
||||
send_secret_string(1);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_DOT)) {
|
||||
send_secret_string(2);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_J)) {
|
||||
send_secret_string(3);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_K)) {
|
||||
send_secret_string(4);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_L)) {
|
||||
send_secret_string(5);
|
||||
}
|
||||
}
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_keymap(void) {
|
||||
// force numlock on upon startup
|
||||
@ -264,8 +312,6 @@ void matrix_init_keymap(void) {
|
||||
}
|
||||
};
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_keymap(void) {
|
||||
if (rgb_matrix_get_flags() != LED_FLAG_NONE && timer_elapsed(rgb_timer) > 1000) {
|
||||
@ -282,56 +328,6 @@ void matrix_scan_keymap(void) {
|
||||
else
|
||||
rgb_matrix_set_color(15, 0, 0, 0);
|
||||
}
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY(KC_K) {
|
||||
layer_invert(_KP);
|
||||
}
|
||||
SEQ_ONE_KEY(KC_G) {
|
||||
layer_invert(_GAME);
|
||||
}
|
||||
SEQ_ONE_KEY(KC_KP_5) {
|
||||
layer_invert(_KP);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_1) {
|
||||
send_secret_string(0);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_2) {
|
||||
send_secret_string(1);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_3) {
|
||||
send_secret_string(2);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_4) {
|
||||
send_secret_string(3);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_5) {
|
||||
send_secret_string(4);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_6) {
|
||||
send_secret_string(5);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_M) {
|
||||
send_secret_string(0);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_COMM) {
|
||||
send_secret_string(1);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_DOT) {
|
||||
send_secret_string(2);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_J) {
|
||||
send_secret_string(3);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_K) {
|
||||
send_secret_string(4);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_L) {
|
||||
send_secret_string(5);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
layer_state_t layer_state_set_keymap(layer_state_t state) {
|
||||
|
@ -130,18 +130,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
};
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_TWO_KEYS(KC_G, KC_P) {
|
||||
SEND_STRING("git push");
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_G, KC_F, KC_P) {
|
||||
SEND_STRING("git push --force-with-lease");
|
||||
}
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_two_keys(KC_G, KC_P)) {
|
||||
SEND_STRING("git push");
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_G, KC_F, KC_P)) {
|
||||
SEND_STRING("git push --force-with-lease");
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -157,47 +157,41 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
LEADER_EXTERNS();
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
// Screenshot
|
||||
SEQ_ONE_KEY(KC_S) {
|
||||
tap_code16(G(C(S(KC_4))));
|
||||
}
|
||||
// Record Screen
|
||||
SEQ_TWO_KEYS(KC_S, KC_S) {
|
||||
tap_code16(S(G(KC_5)));
|
||||
}
|
||||
// 1Pass browser
|
||||
SEQ_ONE_KEY(KC_A) {
|
||||
tap_code16(G(A(KC_BSLS)));
|
||||
}
|
||||
// 1Pass mini
|
||||
SEQ_TWO_KEYS(KC_A, KC_A) {
|
||||
tap_code16(G(KC_BSLS));
|
||||
}
|
||||
// Comment out
|
||||
SEQ_ONE_KEY(KC_F) {
|
||||
tap_code16(G(KC_SLSH));
|
||||
}
|
||||
// Spotlight
|
||||
SEQ_ONE_KEY(KC_SPC) {
|
||||
tap_code16(G(KC_SPC));
|
||||
}
|
||||
// Auto format
|
||||
SEQ_ONE_KEY(KC_ENT) {
|
||||
tap_code16(S(G(A(KC_F))));
|
||||
}
|
||||
// Focus file tree
|
||||
SEQ_ONE_KEY(KC_TAB) {
|
||||
tap_code16(G(KC_1));
|
||||
}
|
||||
// Caps-lock
|
||||
SEQ_TWO_KEYS(KC_TAB, KC_TAB) {
|
||||
tap_code16(KC_CAPS);
|
||||
}
|
||||
void leader_end_user(void) {
|
||||
// Screenshot
|
||||
if (leader_sequence_one_key(KC_S)) {
|
||||
tap_code16(G(C(S(KC_4))));
|
||||
}
|
||||
// Record Screen
|
||||
if (leader_sequence_two_keys(KC_S, KC_S)) {
|
||||
tap_code16(S(G(KC_5)));
|
||||
}
|
||||
// 1Pass browser
|
||||
if (leader_sequence_one_key(KC_A)) {
|
||||
tap_code16(G(A(KC_BSLS)));
|
||||
}
|
||||
// 1Pass mini
|
||||
if (leader_sequence_two_keys(KC_A, KC_A)) {
|
||||
tap_code16(G(KC_BSLS));
|
||||
}
|
||||
// Comment out
|
||||
if (leader_sequence_one_key(KC_F)) {
|
||||
tap_code16(G(KC_SLSH));
|
||||
}
|
||||
// Spotlight
|
||||
if (leader_sequence_one_key(KC_SPC)) {
|
||||
tap_code16(G(KC_SPC));
|
||||
}
|
||||
// Auto format
|
||||
if (leader_sequence_one_key(KC_ENT)) {
|
||||
tap_code16(S(G(A(KC_F))));
|
||||
}
|
||||
// Focus file tree
|
||||
if (leader_sequence_one_key(KC_TAB)) {
|
||||
tap_code16(G(KC_1));
|
||||
}
|
||||
// Caps-lock
|
||||
if (leader_sequence_two_keys(KC_TAB, KC_TAB)) {
|
||||
tap_code16(KC_CAPS);
|
||||
}
|
||||
}
|
||||
|
@ -372,39 +372,32 @@ void music_scale_user(void)
|
||||
|
||||
#endif
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY (KC_R) {
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
}
|
||||
SEQ_ONE_KEY (KC_V) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
SEQ_ONE_KEY(KC_F) {
|
||||
SEND_STRING("if yes\n\tpeanut butter\nelse\n\trice snacks");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_A, KC_S) {
|
||||
register_code(KC_H);
|
||||
unregister_code(KC_H);
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_A, KC_S, KC_D) {
|
||||
register_code(KC_LGUI);
|
||||
register_code(KC_S);
|
||||
unregister_code(KC_S);
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(KC_R)) {
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
tap_random_base64();
|
||||
}
|
||||
if (leader_sequence_one_key(KC_V)) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
if (leader_sequence_one_key(KC_F)) {
|
||||
SEND_STRING("if yes\n\tpeanut butter\nelse\n\trice snacks");
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_A, KC_S)) {
|
||||
register_code(KC_H);
|
||||
unregister_code(KC_H);
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_A, KC_S, KC_D)) {
|
||||
register_code(KC_LGUI);
|
||||
register_code(KC_S);
|
||||
unregister_code(KC_S);
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
}
|
||||
|
@ -408,7 +408,64 @@ void keyboard_post_init_keymap(void) {
|
||||
bspc_timer = 0;
|
||||
}
|
||||
|
||||
LEADER_EXTERNS();
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(KC_K)) {
|
||||
layer_invert(_KP);
|
||||
}
|
||||
if (leader_sequence_one_key(KC_G)) {
|
||||
layer_invert(_GAME);
|
||||
}
|
||||
if (leader_sequence_one_key(KC_KP_5)) {
|
||||
layer_invert(_KP);
|
||||
}
|
||||
if (leader_sequence_one_key(KC_5)) {
|
||||
layer_invert(_KP);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_1)) {
|
||||
send_secret_string(0);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_2)) {
|
||||
send_secret_string(1);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_3)) {
|
||||
send_secret_string(2);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_4)) {
|
||||
send_secret_string(3);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_5)) {
|
||||
send_secret_string(4);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_6)) {
|
||||
send_secret_string(5);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_M)) {
|
||||
send_secret_string(0);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_COMM)) {
|
||||
send_secret_string(1);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_DOT)) {
|
||||
send_secret_string(2);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_J)) {
|
||||
send_secret_string(3);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_K)) {
|
||||
send_secret_string(4);
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_SCLN, KC_L)) {
|
||||
send_secret_string(5);
|
||||
}
|
||||
if (leader_sequence_one_key(KC_C)) {
|
||||
tap_code16(C(KC_C));
|
||||
}
|
||||
// neovim: terminal escape
|
||||
if (leader_sequence_one_key(KC_QUOT)) {
|
||||
tap_code16(C(KC_BSLS));
|
||||
tap_code16(C(KC_N));
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_keymap(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
@ -436,67 +493,6 @@ void matrix_scan_keymap(void) {
|
||||
bspc_timer = 0;
|
||||
register_code(KC_BSPC);
|
||||
}
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY(KC_K) {
|
||||
layer_invert(_KP);
|
||||
}
|
||||
SEQ_ONE_KEY(KC_G) {
|
||||
layer_invert(_GAME);
|
||||
}
|
||||
SEQ_ONE_KEY(KC_KP_5) {
|
||||
layer_invert(_KP);
|
||||
}
|
||||
SEQ_ONE_KEY(KC_5) {
|
||||
layer_invert(_KP);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_1) {
|
||||
send_secret_string(0);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_2) {
|
||||
send_secret_string(1);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_3) {
|
||||
send_secret_string(2);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_4) {
|
||||
send_secret_string(3);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_5) {
|
||||
send_secret_string(4);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_6) {
|
||||
send_secret_string(5);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_M) {
|
||||
send_secret_string(0);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_COMM) {
|
||||
send_secret_string(1);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_DOT) {
|
||||
send_secret_string(2);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_J) {
|
||||
send_secret_string(3);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_K) {
|
||||
send_secret_string(4);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_SCLN, KC_L) {
|
||||
send_secret_string(5);
|
||||
}
|
||||
SEQ_ONE_KEY(KC_C) {
|
||||
tap_code16(C(KC_C));
|
||||
}
|
||||
// neovim: terminal escape
|
||||
SEQ_ONE_KEY(KC_QUOT) {
|
||||
tap_code16(C(KC_BSLS));
|
||||
tap_code16(C(KC_N));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool music_mask_user(uint16_t keycode) {
|
||||
|
@ -984,31 +984,26 @@ bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY(KC_F) {
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(KC_F)) {
|
||||
// Anything you can do in a macro.
|
||||
SEND_STRING("QMK is awesome.");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_D, KC_D) {
|
||||
if (leader_sequence_two_keys(KC_D, KC_D)) {
|
||||
SEND_STRING(SS_LCTL("a") SS_LCTL("c"));
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_D, KC_D, KC_S) {
|
||||
if (leader_sequence_three_keys(KC_D, KC_D, KC_S)) {
|
||||
SEND_STRING("https://start.duckduckgo.com\n");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_A, KC_S) {
|
||||
if (leader_sequence_two_keys(KC_A, KC_S)) {
|
||||
register_code(KC_LGUI);
|
||||
register_code(KC_S);
|
||||
unregister_code(KC_S);
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
if (muse_mode) {
|
||||
if (muse_counter == 0) {
|
||||
|
@ -240,7 +240,6 @@ uint16_t muse_tempo = 50;
|
||||
|
||||
// Used by Leader key chords
|
||||
bool did_leader_succeed;
|
||||
LEADER_EXTERNS();
|
||||
|
||||
// Tap-Dance stuffs, initializing functions that are coded further below
|
||||
td_state_t cur_dance(tap_dance_state_t* state);
|
||||
@ -1404,6 +1403,81 @@ void leader_start_user(void) {
|
||||
}
|
||||
// Called when either the leader sequence is completed, or the leader timeout is hit
|
||||
void leader_end_user(void) {
|
||||
did_leader_succeed = false;
|
||||
|
||||
if (leader_sequence_one_key(KC_E)) {
|
||||
SEND_STRING(SS_LCTL(SS_LSFT("t")));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_one_key(KC_C)) {
|
||||
SEND_STRING(SS_LGUI("r") SS_DELAY(250) "calc\n");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_one_key(KC_V)) {
|
||||
SEND_STRING(SS_LCTL("v"));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_two_keys(KC_E, KC_D)) {
|
||||
SEND_STRING(SS_LGUI("r") "cmd\n" SS_LCTL("c"));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_two_keys(KC_A, KC_C)) {
|
||||
SEND_STRING(SS_LCTL("a") SS_LCTL("c"));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_three_keys(KC_C, KC_A, KC_T)) {
|
||||
send_unicode_string("😸");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_three_keys(KC_B, KC_A, KC_T)) {
|
||||
send_unicode_string("🦇");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_three_keys(KC_D, KC_O, KC_G)) {
|
||||
send_unicode_string("🐶");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_five_keys(KC_S, KC_M, KC_I, KC_L, KC_E)) {
|
||||
send_unicode_string("🙂");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_four_keys(KC_H, KC_A, KC_P, KC_Y)) {
|
||||
send_unicode_string("🙂");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_five_keys(KC_H, KC_A, KC_P, KC_P, KC_Y)) {
|
||||
send_unicode_string("🙂");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_three_keys(KC_S, KC_A, KC_D)) {
|
||||
send_unicode_string("🙁");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_three_keys(KC_Y, KC_E, KC_S)) {
|
||||
send_unicode_string("👍");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_two_keys(KC_N, KC_O)) {
|
||||
send_unicode_string("👎");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_three_keys(KC_W, KC_O, KC_W)) {
|
||||
send_unicode_string("🤯");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_three_keys(KC_P, KC_O, KC_O)) {
|
||||
send_unicode_string("💩");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_four_keys(KC_P, KC_O, KC_O, KC_P)) {
|
||||
send_unicode_string("💩");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else if (leader_sequence_four_keys(KC_B, KC_O, KC_A, KC_T)) {
|
||||
send_unicode_string("⛵");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
if (did_leader_succeed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(leader_succeed);
|
||||
@ -1758,84 +1832,6 @@ void matrix_scan_user(void) {
|
||||
is_alt_tab_active = false;
|
||||
}
|
||||
}
|
||||
// Monitor and perform leader-key chords
|
||||
LEADER_DICTIONARY() {
|
||||
did_leader_succeed = leading = false;
|
||||
|
||||
SEQ_ONE_KEY(KC_E) {
|
||||
SEND_STRING(SS_LCTL(SS_LSFT("t")));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_ONE_KEY(KC_C) {
|
||||
SEND_STRING(SS_LGUI("r") SS_DELAY(250) "calc\n");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_ONE_KEY(KC_V) {
|
||||
SEND_STRING(SS_LCTL("v"));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_TWO_KEYS(KC_E, KC_D) {
|
||||
SEND_STRING(SS_LGUI("r") "cmd\n" SS_LCTL("c"));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_TWO_KEYS(KC_A, KC_C) {
|
||||
SEND_STRING(SS_LCTL("a") SS_LCTL("c"));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_THREE_KEYS(KC_C, KC_A, KC_T) {
|
||||
send_unicode_string("😸");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_THREE_KEYS(KC_B, KC_A, KC_T) {
|
||||
send_unicode_string("🦇");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_THREE_KEYS(KC_D, KC_O, KC_G) {
|
||||
send_unicode_string("🐶");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_FIVE_KEYS(KC_S, KC_M, KC_I, KC_L, KC_E) {
|
||||
send_unicode_string("🙂");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_FOUR_KEYS(KC_H, KC_A, KC_P, KC_Y) {
|
||||
send_unicode_string("🙂");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_FIVE_KEYS(KC_H, KC_A, KC_P, KC_P, KC_Y) {
|
||||
send_unicode_string("🙂");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_THREE_KEYS(KC_S, KC_A, KC_D) {
|
||||
send_unicode_string("🙁");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_THREE_KEYS(KC_Y, KC_E, KC_S) {
|
||||
send_unicode_string("👍");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_TWO_KEYS(KC_N, KC_O) {
|
||||
send_unicode_string("👎");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_THREE_KEYS(KC_W, KC_O, KC_W) {
|
||||
send_unicode_string("🤯");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_THREE_KEYS(KC_P, KC_O, KC_O) {
|
||||
send_unicode_string("💩");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_FOUR_KEYS(KC_P, KC_O, KC_O, KC_P) {
|
||||
send_unicode_string("💩");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
else SEQ_FOUR_KEYS(KC_B, KC_O, KC_A, KC_T) {
|
||||
send_unicode_string("⛵");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
leader_end();
|
||||
}
|
||||
// Run the wake-up RGB animation if performing wake-up
|
||||
if (do_wake_animation) {
|
||||
rgb_wakeup_sequence();
|
||||
|
@ -158,36 +158,24 @@ void keyboard_post_init_user(void) {
|
||||
}
|
||||
|
||||
bool leader_found;
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_found = false;
|
||||
SEQ_ONE_KEY(L_RESET) {
|
||||
leader_found = true;
|
||||
reset_keyboard();
|
||||
}
|
||||
else
|
||||
SEQ_ONE_KEY(KC_DEL) {
|
||||
leader_found = true;
|
||||
layer_clear();
|
||||
}
|
||||
else
|
||||
SEQ_ONE_KEY(LOWER) {
|
||||
leader_found = true;
|
||||
layer_on(_LOWER);
|
||||
}
|
||||
else
|
||||
SEQ_ONE_KEY(RAISE) {
|
||||
leader_found = true;
|
||||
layer_on(_RAISE);
|
||||
}
|
||||
leader_end();
|
||||
}
|
||||
}
|
||||
|
||||
void leader_end_user(void) {
|
||||
leader_found = false;
|
||||
|
||||
if (leader_sequence_one_key(L_RESET)) {
|
||||
leader_found = true;
|
||||
reset_keyboard();
|
||||
} else if (leader_sequence_one_key(KC_DEL)) {
|
||||
leader_found = true;
|
||||
layer_clear();
|
||||
} else if (leader_sequence_one_key(LOWER)) {
|
||||
leader_found = true;
|
||||
layer_on(_LOWER);
|
||||
} else if (leader_sequence_one_key(RAISE)) {
|
||||
leader_found = true;
|
||||
layer_on(_RAISE);
|
||||
}
|
||||
|
||||
// Plays sound on if leader sequence found.
|
||||
if (leader_found) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
@ -363,44 +363,35 @@ bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
return true;
|
||||
}
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
static inline void register_ctrl_sequence(uint16_t keycode) {
|
||||
tap_code16(RCTL(keycode));
|
||||
}
|
||||
|
||||
static inline void leader_bindings(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_three_keys(KC_A, KC_C, KC_K)) {
|
||||
SEND_STRING("Acked-by: Christian Brauner <brauner@kernel.org>");
|
||||
}
|
||||
|
||||
SEQ_THREE_KEYS(KC_A, KC_C, KC_K) {
|
||||
SEND_STRING("Acked-by: Christian Brauner <brauner@kernel.org>");
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_R, KC_V, KC_B)) {
|
||||
SEND_STRING("Reviewed-by: Christian Brauner <brauner@kernel.org>");
|
||||
}
|
||||
|
||||
SEQ_THREE_KEYS(KC_R, KC_V, KC_B) {
|
||||
SEND_STRING("Reviewed-by: Christian Brauner <brauner@kernel.org>");
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_S, KC_O, KC_B)) {
|
||||
SEND_STRING("Signed-off-by: Christian Brauner <brauner@kernel.org>");
|
||||
}
|
||||
|
||||
SEQ_THREE_KEYS(KC_S, KC_O, KC_B) {
|
||||
SEND_STRING("Signed-off-by: Christian Brauner <brauner@kernel.org>");
|
||||
}
|
||||
/* Support vim-style copy. */
|
||||
if (leader_sequence_one_key(KC_Y)) {
|
||||
tap_code16(C(S(KC_C)));
|
||||
}
|
||||
|
||||
/* Support vim-style copy. */
|
||||
SEQ_ONE_KEY(KC_Y) {
|
||||
tap_code16(C(S(KC_C)));
|
||||
}
|
||||
|
||||
/* Support vim-style paste. */
|
||||
SEQ_ONE_KEY(KC_P) {
|
||||
tap_code16(C(S(KC_V)));
|
||||
}
|
||||
/* Support vim-style paste. */
|
||||
if (leader_sequence_one_key(KC_P)) {
|
||||
tap_code16(C(S(KC_V)));
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
leader_bindings();
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
if (muse_mode) {
|
||||
if (muse_counter == 0) {
|
||||
|
@ -362,112 +362,6 @@ float leader_succeed_song[][2] = SONG(STARTUP_SOUND);
|
||||
//float leader_fail_song[][2] = SONG(GOODBYE_SOUND);
|
||||
float leader_fail_song[][2] = SONG(NO_SOUND);
|
||||
#endif
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
did_leader_succeed = leading = false;
|
||||
|
||||
// tap dance
|
||||
// sort by first key
|
||||
|
||||
SEQ_ONE_KEY(KC_C) {
|
||||
SEND_STRING(SS_TAP(X_CAPS));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY(KC_BSPC) {
|
||||
SEND_STRING(SS_TAP(X_DEL));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY(KC_D) {
|
||||
SEND_STRING("{}"SS_TAP(X_LEFT));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_D, KC_B) {
|
||||
SEND_STRING("Dear Brother");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_D, KC_B, KC_S) {
|
||||
SEND_STRING("Dear Brothers and Sister");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_D, KC_D) {
|
||||
SEND_STRING("{");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_D, KC_D, KC_D) {
|
||||
SEND_STRING("}");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_D, KC_S) {
|
||||
SEND_STRING("Dear Sister");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
// Html Tags
|
||||
SEQ_TWO_KEYS(KC_H, KC_T) {
|
||||
SEND_STRING("<></>"SS_TAP(X_LEFT));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
SEQ_TWO_KEYS(KC_I, KC_C) {
|
||||
SEND_STRING("In Christ,");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY(KC_J) {
|
||||
SEND_STRING("<>"SS_TAP(X_LEFT));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_J, KC_J) {
|
||||
SEND_STRING("<");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_J, KC_J, KC_J) {
|
||||
SEND_STRING(">");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
SEQ_TWO_KEYS(KC_T, KC_S) {
|
||||
SEND_STRING("Thanks!");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_T, KC_Y) {
|
||||
SEND_STRING("Thank you!");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY(KC_X) {
|
||||
SEND_STRING("()"SS_TAP(X_LEFT));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_X, KC_X) {
|
||||
SEND_STRING("(");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_X, KC_X, KC_X) {
|
||||
SEND_STRING(")");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY(KC_Z) {
|
||||
SEND_STRING("[]"SS_TAP(X_LEFT));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_Z, KC_Z) {
|
||||
SEND_STRING("[");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_Z, KC_Z, KC_Z) {
|
||||
SEND_STRING("]");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
leader_end();
|
||||
}
|
||||
}
|
||||
|
||||
void leader_start_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
@ -476,6 +370,105 @@ void leader_start_user(void) {
|
||||
}
|
||||
|
||||
void leader_end_user(void) {
|
||||
did_leader_succeed = false;
|
||||
|
||||
// tap dance
|
||||
// sort by first key
|
||||
|
||||
if (leader_sequence_one_key(KC_C)) {
|
||||
SEND_STRING(SS_TAP(X_CAPS));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
if (leader_sequence_one_key(KC_BSPC)) {
|
||||
SEND_STRING(SS_TAP(X_DEL));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
if (leader_sequence_one_key(KC_D)) {
|
||||
SEND_STRING("{}"SS_TAP(X_LEFT));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_D, KC_B)) {
|
||||
SEND_STRING("Dear Brother");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_D, KC_B, KC_S)) {
|
||||
SEND_STRING("Dear Brothers and Sister");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_D, KC_D)) {
|
||||
SEND_STRING("{");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_D, KC_D, KC_D)) {
|
||||
SEND_STRING("}");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_D, KC_S)) {
|
||||
SEND_STRING("Dear Sister");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
// Html Tags
|
||||
if (leader_sequence_two_keys(KC_H, KC_T)) {
|
||||
SEND_STRING("<></>"SS_TAP(X_LEFT));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
if (leader_sequence_two_keys(KC_I, KC_C)) {
|
||||
SEND_STRING("In Christ,");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
if (leader_sequence_one_key(KC_J)) {
|
||||
SEND_STRING("<>"SS_TAP(X_LEFT));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_J, KC_J)) {
|
||||
SEND_STRING("<");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_J, KC_J, KC_J)) {
|
||||
SEND_STRING(">");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
if (leader_sequence_two_keys(KC_T, KC_S)) {
|
||||
SEND_STRING("Thanks!");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_T, KC_Y)) {
|
||||
SEND_STRING("Thank you!");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
if (leader_sequence_one_key(KC_X)) {
|
||||
SEND_STRING("()"SS_TAP(X_LEFT));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_X, KC_X)) {
|
||||
SEND_STRING("(");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_X, KC_X, KC_X)) {
|
||||
SEND_STRING(")");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
if (leader_sequence_one_key(KC_Z)) {
|
||||
SEND_STRING("[]"SS_TAP(X_LEFT));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_two_keys(KC_Z, KC_Z)) {
|
||||
SEND_STRING("[");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
if (leader_sequence_three_keys(KC_Z, KC_Z, KC_Z)) {
|
||||
SEND_STRING("]");
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
|
||||
if (did_leader_succeed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(leader_succeed_song);
|
||||
|
@ -168,36 +168,24 @@ void keyboard_post_init_user(void) {
|
||||
}
|
||||
|
||||
bool leader_found;
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_found = false;
|
||||
SEQ_ONE_KEY(L_RESET) {
|
||||
leader_found = true;
|
||||
reset_keyboard();
|
||||
}
|
||||
else
|
||||
SEQ_ONE_KEY(KC_DEL) {
|
||||
leader_found = true;
|
||||
layer_clear();
|
||||
}
|
||||
else
|
||||
SEQ_ONE_KEY(LOWER) {
|
||||
leader_found = true;
|
||||
layer_on(_LOWER);
|
||||
}
|
||||
else
|
||||
SEQ_ONE_KEY(RAISE) {
|
||||
leader_found = true;
|
||||
layer_on(_RAISE);
|
||||
}
|
||||
leader_end();
|
||||
}
|
||||
}
|
||||
|
||||
void leader_end_user(void) {
|
||||
leader_found = false;
|
||||
|
||||
if (leader_sequence_one_key(L_RESET)) {
|
||||
leader_found = true;
|
||||
reset_keyboard();
|
||||
} else if (leader_sequence_one_key(KC_DEL)) {
|
||||
leader_found = true;
|
||||
layer_clear();
|
||||
} else if (leader_sequence_one_key(LOWER)) {
|
||||
leader_found = true;
|
||||
layer_on(_LOWER);
|
||||
} else if (leader_sequence_one_key(RAISE)) {
|
||||
leader_found = true;
|
||||
layer_on(_RAISE);
|
||||
}
|
||||
|
||||
// Plays sound on if leader sequence found.
|
||||
if (leader_found) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
@ -92,37 +92,47 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
// Cancel task CTRL+C
|
||||
SEQ_ONE_KEY(KC_C) { tap_code16(C(KC_C)); }
|
||||
// copy
|
||||
SEQ_ONE_KEY(KC_Y) { tap_code16(G(KC_C)); }
|
||||
// cut
|
||||
SEQ_ONE_KEY(KC_X) { tap_code16(G(KC_X)); }
|
||||
// paste
|
||||
SEQ_ONE_KEY(KC_P) { tap_code16(G(KC_V)); }
|
||||
// undo
|
||||
SEQ_ONE_KEY(KC_U) { tap_code16(G(KC_Z)); }
|
||||
// redo
|
||||
SEQ_ONE_KEY(KC_R) { tap_code16(S(G(KC_Z))); }
|
||||
// delete line
|
||||
SEQ_TWO_KEYS(KC_D, KC_D) {
|
||||
register_code(KC_LGUI);
|
||||
|
||||
tap_code(KC_RIGHT);
|
||||
|
||||
tap_code(KC_BACKSPACE);
|
||||
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
// go to the beginning of the string
|
||||
SEQ_ONE_KEY(KC_H) { tap_code16(G(KC_LEFT)); }
|
||||
// go to the end of the string
|
||||
SEQ_ONE_KEY(KC_L) { tap_code16(G(KC_RIGHT)); }
|
||||
void leader_end_user(void) {
|
||||
// Cancel task CTRL+C
|
||||
if (leader_sequence_one_key(KC_C)) {
|
||||
tap_code16(C(KC_C));
|
||||
}
|
||||
// copy
|
||||
if (leader_sequence_one_key(KC_Y)) {
|
||||
tap_code16(G(KC_C));
|
||||
}
|
||||
// cut
|
||||
if (leader_sequence_one_key(KC_X)) {
|
||||
tap_code16(G(KC_X));
|
||||
}
|
||||
// paste
|
||||
if (leader_sequence_one_key(KC_P)) {
|
||||
tap_code16(G(KC_V));
|
||||
}
|
||||
// undo
|
||||
if (leader_sequence_one_key(KC_U)) {
|
||||
tap_code16(G(KC_Z));
|
||||
}
|
||||
// redo
|
||||
if (leader_sequence_one_key(KC_R)) {
|
||||
tap_code16(S(G(KC_Z)));
|
||||
}
|
||||
// delete line
|
||||
if (leader_sequence_two_keys(KC_D, KC_D)) {
|
||||
register_code(KC_LGUI);
|
||||
|
||||
tap_code(KC_RIGHT);
|
||||
|
||||
tap_code(KC_BACKSPACE);
|
||||
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
// go to the beginning of the string
|
||||
if (leader_sequence_one_key(KC_H)) {
|
||||
tap_code16(G(KC_LEFT));
|
||||
}
|
||||
// go to the end of the string
|
||||
if (leader_sequence_one_key(KC_L)) {
|
||||
tap_code16(G(KC_RIGHT));
|
||||
}
|
||||
}
|
||||
|
@ -171,16 +171,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY(KC_F) { // Shift + Ctrl + F
|
||||
tap_code16(S(C(KC_F)));
|
||||
}
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_one_key(KC_F)) { // Shift + Ctrl + F
|
||||
tap_code16(S(C(KC_F)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user