Closed DarkLight1337 closed 1 year ago
Yes, I had added this back with KeyboardJS. I'm trying to decide if this should go in the browser bindings, or in the library; I'm trying to decide if this is a platform dependent behavior or a general one. I'll try to get a solution together in the next day or so. Thanks for raising the issue @DarkLight1337
Just put out a new release with this behavior added. Let me know if you have any issues.
I've played around a bit and it seems to work as intended. Thanks!
When I switch to a different window via keyboard (e.g. Alt+Tab), then return to the original window without using the keyboard (e.g. via clicking on it), the active key combo becomes stuck at the state before I left the window (e.g. at Alt), until I press and release the key again. This behaviour may confuse users into thinking that the key combos have stopped working.
It would be great if the active key combo automatically cancels when the window loses focus.
Here is a temporary solution that seems to work on keyboard shortcuts for tabbing out of the active window (I only tested on Windows though):