Refactor Leader key feature (#19632)

Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
Ryan
2023-02-13 03:19:02 +11:00
committed by GitHub
parent d10350cd2c
commit bbf7a20b33
77 changed files with 2457 additions and 1968 deletions

View File

@@ -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);
}
}

View File

@@ -1 +0,0 @@
LEADER_EXTERNS();

View File

@@ -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);
}
}