You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a HID keyboard and the code stops (crash, end code or reload) while a key is pressed, the key will remain pressed until the board is fully reset, or the code happens to release_all() or something similar.
Is it possible to "empty" the HID output reports on code end ?
Such a script will hold the space key until the board is reset.
importatexitimporttimeimportusb_hidfromadafruit_hid.keyboardimportKeyboardfromadafruit_hid.keycodeimportKeycodekeyboard=Keyboard(usb_hid.devices)
atexit.register(keyboard.release_all)
keyboard.press(Keycode.SPACE)
time.sleep(1) # a few spaces will appear based on your OS's key repeat settings
The text was updated successfully, but these errors were encountered:
When using a HID keyboard and the code stops (crash, end code or reload) while a key is pressed, the key will remain pressed until the board is fully reset, or the code happens to release_all() or something similar.
Is it possible to "empty" the HID output reports on code end ?
Such a script will hold the space key until the board is reset.
Using atexit is a python solution.
The text was updated successfully, but these errors were encountered: