From f24a2b612759a5609cd3d9de2f174cd1d8642ba2 Mon Sep 17 00:00:00 2001 From: Krister Svanlund Date: Fri, 19 Jan 2024 23:59:47 +0100 Subject: [PATCH] Added support for case where ONESHOT_TAP_TOGGLE is unset --- quantum/action.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quantum/action.c b/quantum/action.c index 84b42225d6e..456fa5fb848 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -665,18 +665,18 @@ void process_action(keyrecord_t *record, action_t action) { if (tap_count >= ONESHOT_TAP_TOGGLE) { reset_oneshot_layer(); set_oneshot_layer(action.layer_tap.val, ONESHOT_TOGGLED); - } else { - if (get_oneshot_layer() != action.layer_tap.val) { - layer_off(action.layer_tap.val); + } else if (get_oneshot_layer() != action.layer_tap.val) { + layer_off(action.layer_tap.val); } else { clear_oneshot_layer_state(ONESHOT_PRESSED); - } } } # else if (event.pressed) { layer_on(action.layer_tap.val); set_oneshot_layer(action.layer_tap.val, ONESHOT_START); + } else if (get_oneshot_layer() != action.layer_tap.val) { + layer_off(action.layer_tap.val); } else { clear_oneshot_layer_state(ONESHOT_PRESSED); if (tap_count > 1) {