diff --git a/keyboards/atreus/keymaps/default/oneshot.c b/keyboards/atreus/keymaps/default/oneshot.c index 33ec3895e2..071fa1faf0 100644 --- a/keyboards/atreus/keymaps/default/oneshot.c +++ b/keyboards/atreus/keymaps/default/oneshot.c @@ -37,6 +37,18 @@ void update_oneshot( *state = os_up_unqueued; unregister_code(mod); } + if (!is_oneshot_ignored_key(keycode)) { + switch (*state) { + case os_up_used: + unregister_code(mod); + break; + case os_up_queued: + *state = os_up_used; + break; + default: + break; + } + } } else { if (!is_oneshot_ignored_key(keycode)) { // On non-ignored keyup, consider the oneshot used. @@ -44,7 +56,7 @@ void update_oneshot( case os_down_unused: *state = os_down_used; break; - case os_up_queued: + case os_up_used: *state = os_up_unqueued; unregister_code(mod); break; diff --git a/keyboards/atreus/keymaps/default/oneshot.h b/keyboards/atreus/keymaps/default/oneshot.h index a6b8e17742..8a83addd9b 100644 --- a/keyboards/atreus/keymaps/default/oneshot.h +++ b/keyboards/atreus/keymaps/default/oneshot.h @@ -6,6 +6,7 @@ typedef enum { os_up_unqueued, os_up_queued, + os_up_used, os_down_unused, os_down_used, } oneshot_state;