Clear should_cancel_ when canceling stickiness with a third tap

If we do not clear `should_cancel_` there, it remains set indefinitely (until it
gets unset for some other reason, like interrupting a non-sticky OneShot). If it
is set, we can't enter sticky mode.

So clear it when canceling stickiness with a third tap, just like we clear it in
`afterEachCycle`.

Fixes #34.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/389/head
Gergely Nagy 6 years ago
parent b683383e22
commit 701e79d3dc

@ -130,6 +130,7 @@ EventHandlerResult OneShot::onKeyswitchEvent(Key &mapped_key, byte row, byte col
saveAsPrevious(mapped_key);
clearSticky(idx);
cancelOneShot(idx);
should_cancel_ = false;
}
} else {
if (keyToggledOff(keyState)) {

Loading…
Cancel
Save