Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 389 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 389 Bytes

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),
});