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

Add back modifier keys to pointer events #458

Open
jamesnakagawa opened this issue Sep 21, 2023 · 1 comment
Open

Add back modifier keys to pointer events #458

jamesnakagawa opened this issue Sep 21, 2023 · 1 comment

Comments

@jamesnakagawa
Copy link

jamesnakagawa commented Sep 21, 2023

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.

@yomotsu
Copy link
Owner

yomotsu commented Sep 21, 2023

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.

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

No branches or pull requests

2 participants