Make Accelerator a standalone JS type.

This makes menu and global-shortcut share the same code on accelerator.
This commit is contained in:
Cheng Zhao 2014-08-05 00:00:39 +08:00
parent 28b9df24a6
commit 6dc01945af
9 changed files with 114 additions and 65 deletions

View file

@ -12,17 +12,9 @@
`radio`
* `label` String
* `sublabel` String
* `accelerator` String - In the form of `Command+R`, `Ctrl+C`,
`Shift+Command+D`, `D`, etc.
* `accelerator` [Accelerator](accelerator.md)
* `enabled` Boolean
* `visible` Boolean
* `checked` Boolean
* `submenu` Menu - Should be specified for `submenu` type menu item, when
it's specified the `type: 'submenu'` can be omitted for the menu item
## Notes on accelerator
On Linux and Windows, the `Command` key would not have any effect, you can
use `CommandOrControl` which represents `Command` on OS X and `Control` on
Linux and Windows to define some accelerators, you can also use its short
alias `CmdOrCtrl`.