React hook for listening for when the Ctrl key is pressed
npm install use-ctrl-keyListen to Ctrl key events with React hooks.
- npm install use-ctrl-key or
- yarn add use-ctrl-key
``javascript
import useCtrlKey from 'use-ctrl-key';
function App() {
const ctrlKey = useCtrlKey();
return
The Ctrl key is {ctrlKey ? 'pressed' : 'not pressed'}.
;If you are a fan of this project, you may
become a sponsor
via GitHub's Sponsors Program.