Fix stickied OneShot clearing

When clearing a sticky, also cancel the OneShot state, and clear the pressed
bits too.

Thanks to @glasser for experimenting and coming up with the full fix.

Fixes #17.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/389/head
Gergely Nagy 7 years ago
parent c194f0135c
commit 4b6ca2fab3

@ -179,6 +179,8 @@ void OneShot::loopHook(bool is_post_clear) {
if (should_cancel_stickies_) {
is_cancelled = true;
clearSticky(i);
cancelOneShot(i);
clearPressed(i);
}
} else if (isOneShot(i) && !isPressed(i)) {
is_cancelled = true;

Loading…
Cancel
Save