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 <gedankenexperimenter@gmail.com>
pull/1184/head
Michael Richters 3 years ago
parent ab52a6761d
commit 919cb39ac9
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -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);
}

Loading…
Cancel
Save