From 919cb39ac910c506bc62b009ca5e413f3ac23fad Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Wed, 25 May 2022 11:03:36 -0500 Subject: [PATCH] Remove unnecessarily cautious guard against Turbo getting "stuck on" I think it's reasonable to assume that other plugins won't be bad actors and remove an active Turbo key from the live keys array unceremoniously, so this check is really unnecessary. Signed-off-by: Michael Richters --- .../Kaleidoscope-Turbo/src/kaleidoscope/plugin/Turbo.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/plugins/Kaleidoscope-Turbo/src/kaleidoscope/plugin/Turbo.cpp b/plugins/Kaleidoscope-Turbo/src/kaleidoscope/plugin/Turbo.cpp index bbf67331..96cc9970 100644 --- a/plugins/Kaleidoscope-Turbo/src/kaleidoscope/plugin/Turbo.cpp +++ b/plugins/Kaleidoscope-Turbo/src/kaleidoscope/plugin/Turbo.cpp @@ -129,16 +129,9 @@ EventHandlerResult Turbo::afterEachCycle() { // Send the empty report to register the release of all the held keys. Runtime.hid().keyboard().sendReport(); - // Just in case the Turbo key has been wiped from `live_keys[]` without - // `onKeyEvent()` being called with a toggle-off: - active_ = false; - // Go through the `live_keys[]` array and add any Keyboard HID keys to the // new report. for (Key key : live_keys.all()) { - if (key == Key_Turbo) { - active_ = true; - } if (key.isKeyboardKey()) { Runtime.addToReport(key); }