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
Describe the bug
in 2.0.0, an 'alt+shift' (or any combination containing it : 'alt+shift+q', 'ctrl+alt+shift+q', ...) is not caught if shift is pressed before alt:
ctrl+alt+shift+q: OK
ctrl+shift+alt+q: (not caught)
alt+ctrl+shift+q: OK
alt+shift+ctrl+q: OK
shift+alt+ctrl+q: (not caught)
shift+ctrl+alt+q: (not caught)
--> any combination where shift is pressed before alt doesn't seem to be caught
According to the logs below, when the alt key is pressed after shift, it is seen as 'meta', and thus not matched to existing sequences.
If I declare the sequence as 'shift+meta' instead, then the results are reversed:
alt+shift: (not caught)
shift+alt: OK
Expected behavior
Any order of key pressed in the combination should trigger the action ?
It works in latest 1.x
Platform:
Version of react-hotkeys : 2.0.0
Browser [e.g. chrome, safari]: Chrome 75
OS: Ubuntu 16
Are you willing and able to create a PR request to fix this issue?
Not knowledgeable enough
Include the smallest log that includes your issue:
Describe the bug
in 2.0.0, an 'alt+shift' (or any combination containing it : 'alt+shift+q', 'ctrl+alt+shift+q', ...) is not caught if shift is pressed before alt:
<GlobalHotKeys keyMap={{ test: 'shift+alt'}} handlers={{ test: () => console.log('OK') }} />
alt+shift: OK
shift+alt: (not caught)
<GlobalHotKeys keyMap={{ test: 'ctrl+alt+shift+q'}} handlers={{ test: () => console.log('OK') }} />
ctrl+alt+shift+q: OK
ctrl+shift+alt+q: (not caught)
alt+ctrl+shift+q: OK
alt+shift+ctrl+q: OK
shift+alt+ctrl+q: (not caught)
shift+ctrl+alt+q: (not caught)
--> any combination where shift is pressed before alt doesn't seem to be caught
According to the logs below, when the alt key is pressed after shift, it is seen as 'meta', and thus not matched to existing sequences.
If I declare the sequence as 'shift+meta' instead, then the results are reversed:
alt+shift: (not caught)
shift+alt: OK
Expected behavior
Any order of key pressed in the combination should trigger the action ?
It works in latest 1.x
Platform:
Are you willing and able to create a PR request to fix this issue?
Not knowledgeable enough
Include the smallest log that includes your issue:
Below is the log for a shift+alt keypress
What Configuration options are you using?
Nothing apart from
The text was updated successfully, but these errors were encountered: