You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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):
constkeystrokes=newKeystrokes({selfReleasingKeys: ['ctrl','meta','alt','tab',],keyRemap: {control: 'ctrl',os: 'meta',// For Firefox},});addEventListener('blur',()=>{// Prevent getting stuck in a key sequence after tabbing to a different window// @ts-expect-errorkeystrokes._tryReleaseSelfReleasingKeys();});
The text was updated successfully, but these errors were encountered:
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
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):
The text was updated successfully, but these errors were encountered: