https://github.com/quisido/use-shift-key
React hook for listening to shift key events
https://github.com/quisido/use-shift-key
Last synced: 15 days ago
JSON representation
React hook for listening to shift key events
- Host: GitHub
- URL: https://github.com/quisido/use-shift-key
- Owner: quisido
- License: mit
- Created: 2020-10-16T07:02:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-27T21:22:06.000Z (about 4 years ago)
- Last Synced: 2025-03-15T12:46:32.030Z (4 months ago)
- Language: TypeScript
- Size: 43.7 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# useShiftKey [](https://twitter.com/intent/tweet?text=Listen%20to%20Shift%20key%20events%20with%20a%20React%20hook.&url=https://github.com/CharlesStover/use-shift-key&via=CharlesStover&hashtags=react,reactjs,javascript,typescript,webdev,webdevelopment) [](https://www.npmjs.com/package/use-shift-key) [](https://www.npmjs.com/package/use-shift-key) [](https://www.npmjs.com/package/use-shift-key) [](https://travis-ci.com/CharlesStover/use-shift-key/)
Listen to Shift key events with a React hook.
- [Install](#install)
- [Use](#use)
- [Sponsor](#sponsor)## Install
- `npm install use-shift-key` or
- `yarn add use-shift-key`## Use
```javascript
import useShiftKey from 'use-shift-key';function App() {
const shiftKey = useShiftKey();
returnThe Shift key is {shiftKey ? '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.