@biggerpixel/keykit
v2.0.1
Published
Manage keystokes with ease
Downloads
7
Readme
KeyKit
Manage Keystokes easier
import KeyKit, { NavigationKeys } from 'KeyKit';
const handleKeyDown = (key: KeyType, altKey: boolean) => {
switch (key) {
case KeyKit.ARROW_DOWN:
// Do something
break;
case NavigationKeys.ARROW_UP:
// Do something else
break;
case KeyKit.ENTER:
break;
default:
break;
}
};