Keymaster (keymaster.js) is a simple micro-library for defining and dispatching keyboard shortcuts with no dependencies on any other framework. Usage is so simple just include keymaster.min.js in your web app, by loading it as usual and write your shortcuts with modifiers like ⇧, shift, option, ⌥, alt, ctrl, control, command, and ⌘., for example;
Official URI : https://github.com/madrobby/keymaster
// define short of 'a' key('a', function(){ alert('you pressed a!') }); // returning false stops the event and prevents default browser events key('ctrl+r', function(){ alert('stopped reload!'); return false }); // multiple shortcuts that do the same thing key('⌘+r, ctrl+r', function(){ });
Official URI : https://github.com/madrobby/keymaster