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

1.0.1 • Public • Published

useCtrlKey Tweet version minzipped size downloads build

Listen to Ctrl key events with React hooks.

Install

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

Use

import useCtrlKey from 'use-ctrl-key';

function App() {
  const ctrlKey = useCtrlKey();
  return <p>The Ctrl key is {ctrlKey ? 'pressed' : 'not pressed'}.</p>;
}

Sponsor 💗

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

Dependencies (0)

    Dev Dependencies (25)

    Package Sidebar

    Install

    npm i use-ctrl-key

    Weekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    8.45 kB

    Total Files

    6

    Last publish

    Collaborators

    • charlesstover