rogerwang/node-webkit — pull request #1670 by FWeinb (2014-03-07 18:04:09+00:00)
Title: [mac] Native Keyboard Shortcuts

Added basic keyboard shortcut handeling to MenuItems on OS X.

Usage:
```js
new gui.MenuItem({
label: 'Test 1',
shortcut : '\u0008', // ⌘⌫
click: function() {
alert(this.label);
}
});
```

The `shortcut` option will be directly used as a `keyEquivalent` thus will allow everything described [here](https://developer.apple.com/library/mac/documentation/cocoa/Reference/ApplicationKit/Classes/NSMenuItem_Class/Reference/Reference.html#//apple_ref/occ/instm/NSMenuItem/setKeyEquivalent:):
>This method considers the case of the letter passed to determine if it has a Shift modifier added. That is, `[item setKeyEquivalent:@"w"]` sets the key equivalent to `⌘W`, while `[item setKeyEquivalent:@"W"]` is `⌘⇧W`.
[...]
If you want to specify the Backspace key as the key equivalent for a menu item, use a single character string with `NSBackspaceCharacter` (defined in NSText.h as 0x08) and for the Forward Delete key, use `NSDeleteCharacter` (defined in NSText.h as 0x7F). Note that these are not the same characters you get from an `NSEvent` key-down event when pressing those keys.

With this API is not possible to define a custom `KeyEquivalentModifierMask`.