KeySelector
Displays a sequence of combined key commands (ctrl
, shift
, alt
, or
win
and regular keys) for the potential use as a hot-key selector.
Installation
npm install key-selector
Usage
Browser
and in your code, use:
KeySelector;
...where input
is an HTML input element to which to add the key command listeners.
The input
's value will be equal to the commands separated by +
, such as:
- alt-7
- ctrl-s
- ctrl-alt-c
- shift-ctrl-k
- shift-alt-V
- shift-ctrl-alt-V
Other Common.js environments:
var KeySelector = ;KeySelector;
Todos
- More precisely detect and streamline a format for keys such as "enter"?