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] Escape not working when used in GlobalHotKeys #324

Open
UmangThapliyal opened this issue Aug 19, 2021 · 6 comments
Open

[BUG] Escape not working when used in GlobalHotKeys #324

UmangThapliyal opened this issue Aug 19, 2021 · 6 comments

Comments

@UmangThapliyal
Copy link

Describe the bug
In our application we are using GlobalHotKeys and when we try to use the keyHandler as esc it doesn't seem to trigger function

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

Expected behavior
It should trigger the escape function

Platform (please complete the following information):

  • Version of react-hotkeys : 2.0.0
  • Browser [e.g. chrome, safari] : chrome
  • OS: [e.g. iOS] : Ubuntu : 18

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

Include the smallest log that includes your issue:

Set logging to verbose (you'll need the development build if its possible):

const keyMap = {
    Escape: "esc",
  };

  // mapping shortcuts to functions
  const handlers = {
    Escape: onEscape,
  };
 <GlobalHotKeys keyMap={keyMap} handlers={handlers}>
      {children}
    </GlobalHotKeys>
@Nantris
Copy link

Nantris commented Nov 12, 2021

This is likely because react-hotkeys still believes ctrl or cmd are held down. I can't find the relevant issue for this right now, but this is a known issue.

@ibash
Copy link

ibash commented Jan 26, 2022

Is this the same thing? ibash@23c363b

@hypervillain
Copy link

@ibash Is your PR supposed to be merged at some point?

@ibash
Copy link

ibash commented Feb 15, 2023

No, this project is abandoned.

@Nantris
Copy link

Nantris commented Feb 15, 2023

I recommend using react-hotkeys-hook instead.

@hypervillain
Copy link

hypervillain commented Feb 17, 2023

Ha! Thank you both

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

4 participants