Add back modifier keys to pointer events
jamesnakagawa opened this issue · comments
Is your feature request related to a problem? Please describe.
At my company, we are having an issue with using modifier keys like in the example given. The most common example is when the user cmd+tabs away from the window so that the window loses focus. In this case the keydown
event is registered but not keyup
, so when the user switches back to the window, the modifier key is still thought to be active. We also implemented a listener on window focus, but still ran into edge cases
Describe the solution you'd like
I would like if camera-controls handled modifier keys (alt, ctrl, and shift) in its pointer event handler similar to its previous behaviour.
Describe alternatives you've considered
Using keydown/keyup like in the example
Using window focus event in order to mitigate the downsides
Additional context
Thank you for this excellent library!
If I can offer to PR this change, I would be happy to.
Thanks for using camera-controls.
If I can offer to PR this change, I would be happy to.
PRs and issues are open to anyone. I would be happy to have PRs too.