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: 17 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 (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-27T21:22:06.000Z (over 3 years ago)
- Last Synced: 2024-10-13T11:21:56.096Z (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 [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](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) [![version](https://img.shields.io/npm/v/use-shift-key.svg)](https://www.npmjs.com/package/use-shift-key) [![minzipped size](https://img.shields.io/bundlephobia/minzip/use-shift-key.svg)](https://www.npmjs.com/package/use-shift-key) [![downloads](https://img.shields.io/npm/dt/use-shift-key.svg)](https://www.npmjs.com/package/use-shift-key) [![build](https://api.travis-ci.com/CharlesStover/use-shift-key.svg)](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.