From 4c47ce118532974bf0b46bf7d8f202fc8beabfa2 Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Fri, 9 Apr 2021 15:00:13 -0500 Subject: [PATCH] Terminate event handling after calling `Layer.handleLayerKeyEvent()` There's no need to trigger a keyboard HID report after processing a layer change, so stop processing before calling `prepareKeyboardReport()` if `event.key` is a layer change `Key`. Signed-off-by: Michael Richters --- src/kaleidoscope/Runtime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kaleidoscope/Runtime.cpp b/src/kaleidoscope/Runtime.cpp index b8ab4f10..6d534cbe 100644 --- a/src/kaleidoscope/Runtime.cpp +++ b/src/kaleidoscope/Runtime.cpp @@ -178,7 +178,7 @@ Runtime_::handleKeyEvent(KeyEvent event) { // If it's a built-in Layer key, we handle it here, and skip sending report(s) if (event.key.isLayerKey()) { Layer.handleLayerKeyEvent(event); - //return; + return; } // The System Control HID report contains only one keycode, and gets sent