From 995df8148b4c3f66a897a588f32d582da6f28c3b Mon Sep 17 00:00:00 2001 From: Piers Cawley Date: Tue, 7 Nov 2017 15:17:13 +0000 Subject: [PATCH] Eliminate unnecessary `sendKeyboardReport` It seems that if we inject the release of the mapped modifier key before injecting the press of the alternate key, we avoid the need to call `hid::sendKeyboardReport`, which in turn fixes #7. Which is nice. Closes #7 --- src/Kaleidoscope/SpaceCadet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Kaleidoscope/SpaceCadet.cpp b/src/Kaleidoscope/SpaceCadet.cpp index 7fbd090a..072077a7 100644 --- a/src/Kaleidoscope/SpaceCadet.cpp +++ b/src/Kaleidoscope/SpaceCadet.cpp @@ -163,6 +163,7 @@ Key SpaceCadet::eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key //may want to even UNSET the originally pressed key (future //enhanacement?). This might also mean we don't need to return the //key that was pressed, though I haven't confirmed that. + handleKeyswitchEvent(mapped_key, row, col, INJECTED); handleKeyswitchEvent(alternate_key, row, col, IS_PRESSED | INJECTED); //Unflag the key so we don't try this again.