Skip to content

Commit

Permalink
release keys
Browse files Browse the repository at this point in the history
  • Loading branch information
tlyu committed Dec 3, 2023
1 parent 58870d6 commit 36c54df
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ void USBQuirks::toggleKeyboardProtocol() {
::LEDControl.setCrgbAt(key_addr, CRGB(0, 0, 255));
}
Runtime.device().syncLeds();
/*
* Release keys, because after detach, Windows 10 remembers keys that
* were pressed (from the MagicCombo that activated this function).
*/
Runtime.hid().keyboard().releaseAllKeys();
Runtime.hid().keyboard().sendReport();
delay(10);
Runtime.detachFromHost();
Runtime.hid().keyboard().setBootOnly(new_bootonly);
delay(1000);
Expand Down

0 comments on commit 36c54df

Please sign in to comment.