Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quisido/use-ctrl-key
React hook for listening to when the Ctrl key is pressed
https://github.com/quisido/use-ctrl-key
Last synced: 13 days ago
JSON representation
React hook for listening to when the Ctrl key is pressed
- Host: GitHub
- URL: https://github.com/quisido/use-ctrl-key
- Owner: quisido
- License: mit
- Created: 2020-10-16T05:30:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-27T21:06:48.000Z (almost 4 years ago)
- Last Synced: 2025-01-05T22:33:43.473Z (about 2 months ago)
- Language: TypeScript
- Size: 41.4 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# useCtrlKey [](https://twitter.com/intent/tweet?text=Listen%20to%20Ctrl%20key%20events%20with%20React%20hooks&url=https://github.com/CharlesStover/use-ctrl-key&via=CharlesStover&hashtags=react,reactjs,javascript,typescript,webdev,webdevelopment) [](https://www.npmjs.com/package/use-ctrl-key) [](https://www.npmjs.com/package/use-ctrl-key) [](https://www.npmjs.com/package/use-ctrl-key) [](https://travis-ci.com/CharlesStover/use-ctrl-key/)
Listen to Ctrl key events with React hooks.
- [Install](#install)
- [Use](#use)
- [Sponsor](#sponsor)## Install
- `npm install use-ctrl-key` or
- `yarn add use-ctrl-key`## Use
```javascript
import useCtrlKey from 'use-ctrl-key';function App() {
const ctrlKey = useCtrlKey();
returnThe Ctrl key is {ctrlKey ? 'pressed' : 'not pressed'}.
;
}
```## Sponsor 💗
If you are a fan of this project, you may
[become a sponsor](https://github.com/sponsors/CharlesStover)
via GitHub's Sponsors Program.