Re:Mousetrap: Keyboard shortcuts in Javascript
by craigc on Thursday July 05, 2012 @02:16PM
(#4204193)
Thanks! Command is bound to e.metaKey so whatever that works out to on PC, but you can specify multiple keys like in the next example, by passing an array.
[ Parent
| on HN ]
Re:Mousetrap: Keyboard shortcuts in Javascript
by mozillarewind on Friday July 06, 2012 @12:12PM
(#4208356)
You might consider trying an "accel" alias modifier, so that you don't have to specify both Ctrl and Cmd. That's what Mozilla does: https://developer.mozilla.org/en/XUL_Tutorial/Keyboard_Short...
If you really do want fine-grained control, for example, so that Cmd works on OS X, but it maps to something else entirely on other platforms, you can still use Ctrl and Cmd.