use-shift-key
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

useShiftKey Tweet version minzipped size downloads build

Listen to Shift key events with a React hook.

Install

  • npm install use-shift-key or
  • yarn add use-shift-key

Use

import useShiftKey from 'use-shift-key';

function App() {
  const shiftKey = useShiftKey();
  return <p>The Shift key is {shiftKey ? 'pressed' : 'not pressed'}.</p>;
}

Sponsor 💗

If you are a fan of this project, you may become a sponsor via GitHub's Sponsors Program.

Readme

Keywords

none

Package Sidebar

Install

npm i use-shift-key

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

8.5 kB

Total Files

6

Last publish

Collaborators

  • charlesstover