Listens hotkeys events in browser.
npm i hot-key
How to use?
const HotKey = const config = // target node domNode: document // delay after which pressing becomes non-active delay: 1000 // maximum number of combinations symbols: 3 // combinations rules rules: name: 'ctrl+z' codes: 17 90 name: 'ctrl+shift+z' codes: 17 16 90 name: 'cmd+z' codes: 91 90 name: 'cmd+shift+z' codes: 91 16 90 // create objectconst hotKey = config // assign eventshotKey hotKey // or like thishotKey // also you can extend rules on the fly like this:hotKey // start listen keyup and keydown eventshotKeystart // stop listen eventshotKey