Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifier keys are set incorrectly on ::press() when _keyReport.keys is full. #5

Open
ZDBioHazard opened this issue Jun 9, 2016 · 0 comments
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@ZDBioHazard
Copy link

If Keyboard.press() is called with a key that implies a modifier, when _keyReport.keys[] is full, the modifier bit will still be set on _keyReport.modifiers, but sendReport() 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.

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants