arduino-libraries / USBHost

USB Host Library for Arduino
http://arduino.cc/
115 stars 94 forks source link

Keyboard: Unable to get mod keys w/o tapping a regular key #29

Open richjamrosz opened 3 years ago

richjamrosz commented 3 years ago

I'm using 2 Seeed Xiao's communicating via Serial1, one of them programmed with the 'GetModifiers" example from arduino.cc, the other doing simple serial passthrough to Serial Monitor. The mod value only changes when a regular key is tapped ex. 'a'.

WIth the windows key being a mod key, it makes it impossible to tap that key to open the start menu. Also, in general, I would like to pass through modifiers as they are pressed and released, just like if the keyboard was hooked directly into a computer. Is there some method that does this already that I'm missing? Is it possible to get mod keys to fire the same as basic keys?

kakoijohn commented 3 years ago

Have you had any luck with this issue? I am having the exact same problem where GetModifiers only updates when a regular key is pressed. I need it to be able to detect just modifier changes in the cases where a modifier is combined with a mouse press.