diff --git a/src/Kaleidoscope/OneShot.cpp b/src/Kaleidoscope/OneShot.cpp index e2a92c0d..2519b60f 100644 --- a/src/Kaleidoscope/OneShot.cpp +++ b/src/Kaleidoscope/OneShot.cpp @@ -170,19 +170,23 @@ void OneShot::loopHook(bool is_post_clear) { if (hasTimedOut()) cancel(); + bool is_cancelled = false; + for (uint8_t i = 0; i < 32; i++) { if (should_cancel_) { if (isSticky(i)) { if (should_cancel_stickies_) { + is_cancelled = true; clearSticky(i); } } else if (isOneShot(i) && !isPressed(i)) { + is_cancelled = true; cancelOneShot(i); } } } - if (should_cancel_) { + if (is_cancelled) { should_cancel_ = false; should_cancel_stickies_ = false; }