react-usekeydown
v1.0.3
Published
1. `npm i react-usekeydown` / `yarn add react-usekeydown` 2. `import useKeyDown from "react-usekeydown";` 3. `const keys = useKeyDown();`
Downloads
6
Maintainers
Readme
hook that returns the value of all pressed keys.
how to use:
npm i react-usekeydown
/yarn add react-usekeydown
import useKeyDown from "react-usekeydown";
const keys = useKeyDown();
(or just copy paste src/usekeydown.js
)
keys
will be equal to an array with all the pressed keys.
or check here for a demo