⌨ react-hotkeyz
A component that enables registration of hotkeys per z-index.
Before:
With react-hotkeyz
:
Install
npm install --save react-hotkeyz
Or if you prefer yarn:
yarn add react-hotkeyz
Quick Example:
🤞
;
More examples on https://react-hotkeyz.netlify.com.
Additional information
- Only listeners from current z-index are triggered
- Uses
is-hotkey
lib - Only one key press listener is registered
- When there are no active callbacks, event listener is completely removed
- When trying to register the same shortcut on the same z-index, an error will be thrown
- Can be used as a hook or a HOC
Contributors
Thanks goes to these wonderful people (emoji key):
Adrian Smijulj 💻 📖 💡 👀 ⚠️ |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!