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

[BUG] Pressing Ctrl+ALT+[A number] keep the key in the combination until focus out. #323

Closed
e-gauthier opened this issue Aug 17, 2021 · 0 comments

Comments

@e-gauthier
Copy link

e-gauthier commented Aug 17, 2021

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

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

1 participant