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

Correct modifier keys from mouse events #1625

Open
jessegreenberg opened this issue Apr 1, 2024 · 1 comment
Open

Correct modifier keys from mouse events #1625

jessegreenberg opened this issue Apr 1, 2024 · 1 comment
Assignees

Comments

@jessegreenberg
Copy link
Contributor

KeystateTracker.correctModifierKeys helps correct the state of KeyStateTracker when modifier keys are released/pressed without the browser receiving an event. It currently fires for keyboard events but should also fire for mouse events that support shiftKey, altKey, ctrlKey and metaKey properties. Otherwise mouse + keyboard interaction could be buggy if the browser window loses focus while modifier keys are down.

@jessegreenberg
Copy link
Contributor Author

Additional notes:

A new function that corrects modifier keys needs to be very fast because it will run every mouse event. Refactor as much as possible, probably creating a new function just for mouse events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant