summaryrefslogtreecommitdiff
path: root/keyboards/preonic/keymaps/yhaliaw/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/preonic/keymaps/yhaliaw/keymap.c')
-rw-r--r--keyboards/preonic/keymaps/yhaliaw/keymap.c44
1 files changed, 16 insertions, 28 deletions
diff --git a/keyboards/preonic/keymaps/yhaliaw/keymap.c b/keyboards/preonic/keymaps/yhaliaw/keymap.c
index b64aa7d745..7771199e9c 100644
--- a/keyboards/preonic/keymaps/yhaliaw/keymap.c
+++ b/keyboards/preonic/keymaps/yhaliaw/keymap.c
@@ -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