adafruit / adafruit/Adafruit_CircuitPython_HID
USB Keyboard no longer sends keystrokes after windows machine go to sleep
- Dominant language
- Python
- Stars
- 464
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
Issue is occurring with a RPi Pico running the most up to date circuit python, and hid library. The issue does not occur on mac machines (haven't tested linux) A power cycle of the RPi resolves the issue, however, unplugging and replugging my macro pad every time my pc goes to sleep is getting a little annoying.
I'm not really sure why this happens. I imagine it has to do with how windows handles "sleep" mode, probably still powering the device in some way, and somehow this messes with the device recognition, whereas mac probably just powers off the usb device? I'm not entirely sure..
In order to replicate this it's pretty simple:
- Put circuitpython on a rpi pico
- Put keyboard code device
- Ensure the board works as expected
- Put windows machine to sleep
- Wake windows machine
- Notice keyboard no longer sends keypresses
It could very well be sending the key presses, but windows isn't recognizing them. I have no idea, and I haven't been able to see anything about it online.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported sequence with a Raspberry Pi Pico running CircuitPython HID keyboard code: verify operation before Windows sleeps, then check behavior after wake. Determine whether keypresses are still sent or Windows no longer recognizes the USB device; done means the keyboard resumes without power cycling, with behavior compared against macOS if possible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100