From b13aaba5292525cf96b91b06a57f8f65bc0e44bb Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Fri, 13 Nov 2020 18:35:37 -0600 Subject: [PATCH] Adapt Qukeys to active keys cache When Qukeys stops event processing from its `onKeyswitchEvent()` handler, it's because the event should be treated as non-existent (in most cases, it's merely delayed). This keeps the active keys cache from getting updated, as well as completely stopping event processing. Signed-off-by: Michael Richters --- src/kaleidoscope/plugin/Qukeys.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kaleidoscope/plugin/Qukeys.cpp b/src/kaleidoscope/plugin/Qukeys.cpp index 58b1d1e4..6ba25634 100644 --- a/src/kaleidoscope/plugin/Qukeys.cpp +++ b/src/kaleidoscope/plugin/Qukeys.cpp @@ -67,7 +67,7 @@ EventHandlerResult Qukeys::onKeyswitchEvent(Key& key, KeyAddr k, uint8_t key_sta } // Any event that gets added to the queue gets re-processed later, so we // need to abort processing now. - return EventHandlerResult::EVENT_CONSUMED; + return EventHandlerResult::ABORT; } // The key is being held. We need to determine if we should block it because @@ -84,7 +84,7 @@ EventHandlerResult Qukeys::onKeyswitchEvent(Key& key, KeyAddr k, uint8_t key_sta } // Otherwise, the first matching event was a key press, so we need to // suppress it for now. - return EventHandlerResult::EVENT_CONSUMED; + return EventHandlerResult::ABORT; } }