$ cnpm install simple-hotkeys
If you want to bind hotkeys to dynamic adding element, please pass a selector as el
.
If the el
is null or doesn't exist, document
element would be used by default.
hotkeys = simple.hotkeys();
hotkeys.add("ctrl + b", function(e){
console.log("ctrl + b pressed");
}).add("ctrl + h"], function(e){
console.log("Help");
});
Copyright 2013 - present © cnpmjs.org