Wondering what’s next for npm?Check out our public roadmap! »

    react-hotkeyz

    1.0.4 • Public • Published

    ⌨ react-hotkeyz

    Build Status Coverage Status code style: prettier All Contributors PRs Welcome

    A component that enables registration of hotkeys per z-index.

    Before:

    A broken example

    With react-hotkeyz:

    A working example

    Install

    npm install --save react-hotkeyz
    

    Or if you prefer yarn:

    yarn add react-hotkeyz
    

    Quick Example:

    🤞

    import { useHotkeys, Hotkeys } from "react-hotkeyz";

    More examples on https://react-hotkeyz.netlify.com.

    Additional information

    1. Only listeners from current z-index are triggered
    2. Uses is-hotkey lib
    3. Only one key press listener is registered
    4. When there are no active callbacks, event listener is completely removed
    5. When trying to register the same shortcut on the same z-index, an error will be thrown
    6. 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!

    Install

    npm i react-hotkeyz

    DownloadsWeekly Downloads

    125

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    5.43 MB

    Total Files

    31

    Last publish

    Collaborators

    • avatar