Open jokkebk opened 2 years ago
Yes, it may be the problem with timing. I am suggesting to play with last parameter in this line: https://github.com/chegewara/EspTinyUSB/blob/master/src/device/hid/hidkeyboard.cpp#L16 and delay in this line (delay should be longer than the other param): https://github.com/chegewara/EspTinyUSB/blob/master/src/device/hid/hidkeyboard.cpp#L34
PS usually first line parameter should be 10, but i decided to make it 1 to let faster sending keys
I was trying to use EspTinyUSB library based device with a fresh Raspberry Pi OS install (64 bit, RaspPi4 HW) and turns out the sent keys get "stuck", i.e.
device.sendKey(HID_KEY_A);
results inaaaaaaaaaaaaaaaaaaaaaa...
instead of a single letter.Sample code to reproduce:
I assumed it might related to how Linux handles key repeat and release delays vs. Windows (and it could be), but what is strange, that using
HIDkeyboard
instead of a composite device works just fine. Could there be some difference that causes thesendPress
to fail with a composite device, orsendRelease
not succeeding?My knowledge of the raw HID reports is rusty & largely missing, but happy to investigate further, if there are any pointers what to check first (relying on single led and no serial ATM).