From 3da0ad457afe15ffa7cdaf17f0d2ba05183ebd07 Mon Sep 17 00:00:00 2001 From: iliana etaoin Date: Sun, 29 May 2022 21:47:35 -0700 Subject: [PATCH] PrefixLayer: clear only modifiers during prefix Signed-off-by: iliana etaoin --- .../src/kaleidoscope/plugin/PrefixLayer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/Kaleidoscope-PrefixLayer/src/kaleidoscope/plugin/PrefixLayer.cpp b/plugins/Kaleidoscope-PrefixLayer/src/kaleidoscope/plugin/PrefixLayer.cpp index 9c45014a..e6f22048 100644 --- a/plugins/Kaleidoscope-PrefixLayer/src/kaleidoscope/plugin/PrefixLayer.cpp +++ b/plugins/Kaleidoscope-PrefixLayer/src/kaleidoscope/plugin/PrefixLayer.cpp @@ -56,10 +56,8 @@ EventHandlerResult PrefixLayer::onKeyEvent(KeyEvent &event) { } EventHandlerResult PrefixLayer::onAddToReport(Key key) { - if (current_prefix_ != Key_NoKey) { - if (current_prefix_ != key) { - return EventHandlerResult::ABORT; - } + if (current_prefix_ != Key_NoKey && current_prefix_ != key && key.isKeyboardModifier()) { + return EventHandlerResult::ABORT; } return EventHandlerResult::OK;