kevent
keyboard event handler
Usage:
const on = onkeypressctrlshift // But keypress is the default event so we can omit itonctrlshift // Most letter keys can be uppercase so we can omit shiftonctrl ondefaultctrl // It is possible to share base argumentsconst shortcut = defaultmetakeydown shortcutshortcut // For now you have only one option:const keydown keyup = // It is possible to use directly the keyCode if you wantkeydown13 consolekeyup13 console // Because 0-9 can be both the num row or keycodes// they are aliased from _0 to _9keyup // Shifted aliases are based on QWERTY layoutkeyup'!' console // Of course you can always expand tokeyupshift
All keys available are
A-Z
(lower and upper, from.charCodeAt
)0-9
(aliased to_0
and_9
)f1-f24
numpad0-numpad9
Read definition.js for the complete list.