use-shift-key
v1.0.1
Published
React hook for listening to shift key events
Downloads
2
Readme
useShiftKey
Listen to Shift key events with a React hook.
Install
npm install use-shift-key
oryarn add use-shift-key
Use
import useShiftKey from 'use-shift-key';
function App() {
const shiftKey = useShiftKey();
return <p>The Shift key is {shiftKey ? 'pressed' : 'not pressed'}.</p>;
}
Sponsor 💗
If you are a fan of this project, you may become a sponsor via GitHub's Sponsors Program.