Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quisido/use-shift-key
React hook for listening to shift key events
https://github.com/quisido/use-shift-key
Last synced: 12 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 (almost 4 years ago)
- Last Synced: 2025-01-15T09:03:27.927Z (about 1 month ago)
- Language: TypeScript
- Size: 43.7 MB
- Stars: 0
- Watchers: 3
- 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.