keymaster icon indicating copy to clipboard operation
keymaster copied to clipboard

Implement dynamic, pattern-matched keybindings

Open steveluscher opened this issue 10 years ago • 1 comments

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).

steveluscher avatar Oct 15 '13 22:10 steveluscher