use-special-keys
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

useSpecialKeys

Installation

npm -i use-special-keys

or

yarn add use-special-keys

Usage

import { useSpecialKeys } from 'use-special-keys';

const handleKeyDown = useSpecialKeys<HTMLInputElement>({
  Enter: event => console.log(event.currentTarget.value),
  Escape: event => console.log(event.currentTarget.value),
});

Package Sidebar

Install

npm i use-special-keys

Weekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

10.1 kB

Total Files

9

Last publish

Collaborators

  • writhe