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