Skip to content

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

@UmangThapliyal

Description

@UmangThapliyal

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions