1.0.3 • Published 5 years ago
react-usekeydown v1.0.3
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