question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[4.0.0-3] `useHotkeys` with meta results in strange behaviour

See original GitHub issue
  useHotkeys("meta+k", () => {
    setOpen((state) => !state);
  });

This code works correctly only until first execution. After first execution, the callback is fired after meta key is pressed (not combination of meta+k).

It seems to be a case only for meta. ctrl+k works fine.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JohannesKlausscommented, Aug 19, 2022

Both issues should now be resolved with 4.0.0-4

1reaction
JohannesKlausscommented, Aug 15, 2022

Thank you for reporting the issue. I’ll have a look into it 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

reecelucas/react-use-hotkeys - GitHub
React hook for creating simple keyboard shortcuts. Contribute to reecelucas/react-use-hotkeys development by creating an account on GitHub.
Read more >
Disable/Enable Hotkeys
Toggle hotkeys with the enabled flag​. Using the enabled flag in the options object, we can dynamically tell useHotkeys if the hotkey should...
Read more >
react-hotkeys-hook - npm
A React hook for using keyboard shortcuts in components in a declarative way. Quick Start. The easiest way to use the hook. import...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found