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] key mapping with alt+... doesn't work because alt changes keyboard keys #269

Open
ChristoRibeiro opened this issue Feb 11, 2020 · 6 comments

Comments

@ChristoRibeiro
Copy link

ChristoRibeiro commented Feb 11, 2020

Describe the bug
I'm trying to add the shortcut alt+h but the real shortcut is actually alt+Ì. If I press alt then the key h become Ì. So I need to register alt+Ì to handle alt+h. I'm not sure if it's a bug or normal behavior.

How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys, etc)
GlobalHotKeys

Expected behavior
Add the key map alt+h.

Platform:

  • react-hotkeys: 2.0.0
  • Browser: Chrome 80.0.3987.87
  • OS: macOS 10.15.3
  • Keyboard: AZERTY

Are you willing and able to create a PR request to fix this issue?
No unfortunately

Include the smallest log that includes your issue:

HotKeys (GLOBAL-E1💚): New 'Alt' keydown event (that has NOT passed through React app).
inject.js:38244 HotKeys (GLOBAL-E1💚-C0🔺): No matching actions found for 'Alt' keydown.
inject.js:40393 HotKeys (GLOBAL-E2💙): New (simulated) 'Alt' keypress event (that has NOT passed through React app).
inject.js:40630 HotKeys (GLOBAL-E2💙): Ignored 'Alt' keypress because it doesn't have any keypress handlers.
inject.js:40393 HotKeys (GLOBAL-E3💛): New 'Ì' keydown event (that has NOT passed through React app).
inject.js:38244 HotKeys (GLOBAL-E3💛-C0🔺): No matching actions found for 'Alt+Ì' keydown.
inject.js:40393 HotKeys (GLOBAL-E4💜): New 'Ì' keypress event (that has NOT passed through React app).
inject.js:40630 HotKeys (GLOBAL-E4💜): Ignored 'Alt+Ì' keypress because it doesn't have any keypress handlers.
inject.js:40393 HotKeys (GLOBAL-E5🧡): New 'Ì' keyup event (that has NOT passed through React app).
inject.js:40630 HotKeys (GLOBAL-E5🧡): Ignored 'Alt+Ì' keyup because it doesn't have any keyup handlers.
inject.js:40393 HotKeys (GLOBAL-E6❤️): New 'Alt' keyup event (that has NOT passed through React app).
inject.js:40630 HotKeys (GLOBAL-E6❤️): Ignored 'Alt+Ì' keyup because it doesn't have any keyup handlers.
inject.js:40949 HotKeys: Window focused - clearing key history

What Configuration options are you using?
No option.

@ChristoRibeiro ChristoRibeiro changed the title [BUG] key map alt+h doesn't work because alt has changed my keyboard [BUG] key map alt+h doesn't work because alt changes my keyboard keys Feb 11, 2020
@ChristoRibeiro ChristoRibeiro changed the title [BUG] key map alt+h doesn't work because alt changes my keyboard keys [BUG] key mapping with alt+... doesn't work because alt changes keyboard keys Feb 11, 2020
@Stvad
Copy link

Stvad commented Mar 1, 2020

It works for me w.r.t. triggering the shortcut, but it also pastes in the special character as well =\

@ilias-t
Copy link

ilias-t commented Apr 10, 2020

I was able to repro this issue on Mac in Chrome on react-hotkeys 2.0.0.

@ilias-t
Copy link

ilias-t commented Apr 10, 2020

relates to #248, #215, & #232

@ilias-t
Copy link

ilias-t commented Apr 10, 2020

#232 (comment)

I'm afraid my advice in the short term is to avoid any key combinations with alt in them.

@ilias-t
Copy link

ilias-t commented May 27, 2020

@ChristoRibeiro why was this issue closed?

@ChristoRibeiro
Copy link
Author

ChristoRibeiro commented May 28, 2020

Oops wrong issue closed. Sorry!

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

3 participants