From bbf7a20b33de2d203518687cb5cd1aa85005ea27 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 13 Feb 2023 03:19:02 +1100 Subject: Refactor Leader key feature (#19632) Co-authored-by: Drashna Jaelre --- users/uqs/uqs.c | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) (limited to 'users/uqs') diff --git a/users/uqs/uqs.c b/users/uqs/uqs.c index bccab617ac..83733bbe2a 100644 --- a/users/uqs/uqs.c +++ b/users/uqs/uqs.c @@ -534,43 +534,36 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef LEADER_ENABLE -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leading = false; - leader_end(); - +void leader_end_user(void) { #ifdef UCIS_ENABLE - SEQ_ONE_KEY(KC_U) { - ucis_start(); + if (leader_sequence_one_key(KC_U)) { + ucis_start(); } #endif - SEQ_ONE_KEY(KC_H) { - send_unicode_string("ᕕ( ᐛ )ᕗ"); // happy + if (leader_sequence_one_key(KC_H)) { + send_unicode_string("ᕕ( ᐛ )ᕗ"); // happy } - SEQ_ONE_KEY(KC_D) { - send_unicode_string("ಠ_ಠ"); // disapproval + if (leader_sequence_one_key(KC_D)) { + send_unicode_string("ಠ_ಠ"); // disapproval } - SEQ_ONE_KEY(KC_L) { - send_unicode_string("( ͡° ͜ʖ ͡°)"); // lenny + if (leader_sequence_one_key(KC_L)) { + send_unicode_string("( ͡° ͜ʖ ͡°)"); // lenny } - SEQ_ONE_KEY(KC_S) { - send_unicode_string("¯\\_(ツ)_/¯"); // shrug + if (leader_sequence_one_key(KC_S)) { + send_unicode_string("¯\\_(ツ)_/¯"); // shrug } // tableflip (LEADER - TF) - SEQ_TWO_KEYS(KC_T, KC_F) { - //set_unicode_input_mode(UNICODE_MODE_LINUX); - //send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); - send_unicode_string("(╯°□°)╯︵ ┻━┻"); + if (leader_sequence_two_keys(KC_T, KC_F)) { + //set_unicode_input_mode(UNICODE_MODE_LINUX); + //send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); + send_unicode_string("(╯°□°)╯︵ ┻━┻"); } // untableflip - SEQ_THREE_KEYS(KC_U, KC_T, KC_F) { - //set_unicode_input_mode(UNICODE_MODE_LINUX); - //send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); - send_unicode_string("┬─┬ノ( º _ ºノ)"); + if (leader_sequence_three_keys(KC_U, KC_T, KC_F)) { + //set_unicode_input_mode(UNICODE_MODE_LINUX); + //send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); + send_unicode_string("┬─┬ノ( º _ ºノ)"); } - } } #endif -- cgit v1.2.3