[BUG] Pressing Ctrl+ALT+[A number] keep the key in the combination until focus out.
Describe the bug Consider the CodeSandbox for reproduction.
Pressing CTRL+ALT+[Any number], keep the pressed characters as combination until focus out.
My keyboard configuration is Canadian French, the problem doesn't occur if you need to press Shift+2 to create a @.
How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc) HotKeys
Expected behavior In my opinion, pressing CTRL+ALT+[Any number] should be interpreted as a unique key and not as a combination for other keys.
Platform (please complete the following information):
- Version of react-hotkeys 2.000
- Browser : Edge and Chrome
- OS: Win 10
Are you willing and able to create a PR request to fix this issue? Yes, with guidance.
Include the smallest log that includes your issue:
I used logLevel : Debug. LogLevel can be set in the codeSandbox for further info.
Pressing "a" then "@" and finally "Enter" will produce the log below.
HotKeys (F5๐-C1โญ๏ธ-P0๐บ:) Focused. HotKeys (F5๐-E61๐-C1โญ๏ธ-P0๐บ:) New 'a' keydown event. HotKeys (F5๐-E61๐-C0๐บ) No matching actions found for 'a' keydown. HotKeys (F5๐-E62๐-C1โญ๏ธ-P0๐บ:) New 'a' keypress event. HotKeys (F5๐-E63๐-C1โญ๏ธ-P0๐บ:) New 'a' keyup event. HotKeys (F5๐-E64๐-C1โญ๏ธ-P0๐บ:) New 'Control' keydown event. HotKeys (F5๐-E64๐-C0๐บ) No matching actions found for 'Control' keydown. HotKeys (F5๐-E66โค๏ธ-C1โญ๏ธ-P0๐บ:) New (simulated) 'Control' keypress event. HotKeys (F5๐-E67๐-C1โญ๏ธ-P0๐บ:) New 'Alt' keydown event. HotKeys (F5๐-E67๐-C0๐บ) No matching actions found for 'Alt+Control' keydown. HotKeys (F5๐-E69๐-C1โญ๏ธ-P0๐บ:) New (simulated) 'Alt' keypress event. HotKeys (F5๐-E70๐-C1โญ๏ธ-P0๐บ:) New '@' keydown event. HotKeys (F5๐-E70๐-C0๐บ) No matching actions found for '@+Alt+Control' keydown. HotKeys (F5๐-E71๐งก-C1โญ๏ธ-P0๐บ:) New '@' keypress event. HotKeys (F5๐-E72โค๏ธ-C1โญ๏ธ-P0๐บ:) New '2' keyup event. HotKeys (F5๐-E73๐-C1โญ๏ธ-P0๐บ:) New 'Alt' keyup event. HotKeys (F5๐-E74๐-C1โญ๏ธ-P0๐บ:) New 'Control' keyup event. HotKeys (F5๐-E75๐-C1โญ๏ธ-P0๐บ:) New 'b' keydown event. HotKeys (F5๐-E75๐-C0๐บ) No matching actions found for '@+b' keydown. HotKeys (F5๐-E76๐-C1โญ๏ธ-P0๐บ:) New 'b' keypress event. HotKeys (F5๐-E77๐งก-C1โญ๏ธ-P0๐บ:) New 'b' keyup event. HotKeys (F5๐-E78โค๏ธ-C1โญ๏ธ-P0๐บ:) New 'Enter' keydown event. HotKeys (F5๐-E78โค๏ธ-C0๐บ) No matching actions found for '@+Enter' keydown. <=== Here is the problem. HotKeys (F5๐-E80๐-C1โญ๏ธ-P0๐บ:) New (simulated) 'Enter' keypress event. HotKeys (F5๐-E80๐-C1โญ๏ธ-P0๐บ:) Ignored 'Enter' keypress as it was not expected, and has already been simulated. HotKeys (F5๐-E80๐-Cnull๐บ) Stopping further event propagation.
Here is another version with multiple CTRL+ALT+[1 to 6] HotKeys (F7๐-E156โค๏ธ-C0๐บ) No matching actions found for '@+Enter+ยข+ยฃ+ยค+ยฆ+ยฌ' keydown.
What Configuration options are you using? None