From 4b6ca2fab3394693e299e5d23e8e03683f3b03e1 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 7 Dec 2017 11:11:00 +0100 Subject: [PATCH] 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 --- src/Kaleidoscope/OneShot.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Kaleidoscope/OneShot.cpp b/src/Kaleidoscope/OneShot.cpp index a67c2908..b73ebc20 100644 --- a/src/Kaleidoscope/OneShot.cpp +++ b/src/Kaleidoscope/OneShot.cpp @@ -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;