Modifier keys are set incorrectly on ::press() when _keyReport.keys is full. #5
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
If
Keyboard.press()
is called with akey
that implies a modifier, when_keyReport.keys[]
is full, the modifier bit will still be set on_keyReport.modifiers
, butsendReport()
never gets called for that key, leaving the modifier pressed but not reported until the next possible::press()
, which may or may not be after a::release()
that clears the modifier.Also, if you
::press()
two capital letters and::release()
one, the modifier will be cleared even though the second key is still pressed. Maybe there should be some documentation discouraging the use of::press()
with shifted keys? You shouldn't need them outside of string printing, which you should be using::write()
for anyway.I was hoping I would have a chance to fix it so it doesn't set the modifier unless the key can be pressed, but I may not have time for a little while.
The text was updated successfully, but these errors were encountered: