From 701e79d3dc136050a629d83328101e7698c591c6 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 17 Jun 2018 12:41:30 +0200 Subject: [PATCH] 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 --- src/Kaleidoscope/OneShot.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Kaleidoscope/OneShot.cpp b/src/Kaleidoscope/OneShot.cpp index 0da3ff93..9f1e5d9b 100644 --- a/src/Kaleidoscope/OneShot.cpp +++ b/src/Kaleidoscope/OneShot.cpp @@ -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)) {