keymaster
keymaster copied to clipboard
Implement dynamic, pattern-matched keybindings
It would be great to be able to define keybindings that match patterns, such as:
key('⌘+([0-9])', function(e, handler) { … });
or
key('⌘+(\d)', function(e, handler) { … });
or
key('⌘+shift+(.*)+(.*)', function(e, handler) { … });
…where handler.matches
is an array containing the key(s) that matched the pattern(s).