Use Hotkeys
React wrapper around Hotkeys.js.
╭┈┈╮ ╭┈┈╮ ╭┈┈╮┆ ├┈┈..┈┈┈┈┈.┆ └┈╮┆ ├┈┈..┈┈┈┈┈..┈┈.┈┈..┈┈┈┈┈.┆ ┆┆ □ ┆┆ ┈┤┆ < ┆ -__┘┆ ┆ ┆┆__ ┈┈┤╰┈┈┴┈┈╯╰┈┈┈┈┈╯╰┈┈┈┈╯╰┈┈┴┈┈╯╰┈┈┈┈┈╯╰┈┈┈ ┆╰┈┈┈┈┈╯ ╰┈┈┈┈┈╯
Use Hotkeys - React hook that listen to keyboard events, defining and dispatching keyboard shortcuts.
Read about Hooks feature.
Installation
Note: React 16.8+ is required for Hooks.
With npm
npm i use-hotkeys
Or with yarn
yarn add use-hotkeys
Usage
import useHotkeys from 'use-hotkeys';
const Counter = const count setCount = React; ; return <div>count</div>;;