Browse Source

docs: Add missing key codes

Cheng Zhao 9 years ago
parent
commit
b7a40f3097
2 changed files with 6 additions and 7 deletions
  1. 3 0
      docs/api/accelerator.md
  2. 3 7
      docs/api/web-contents.md

+ 3 - 0
docs/api/accelerator.md

@@ -23,6 +23,8 @@ The `Super` key is mapped to the `Windows` key on Windows and Linux and
 * `Control` (or `Ctrl` for short)
 * `CommandOrControl` (or `CmdOrCtrl` for short)
 * `Alt`
+* `Option`
+* `AltGr`
 * `Shift`
 * `Super`
 
@@ -44,3 +46,4 @@ The `Super` key is mapped to the `Windows` key on Windows and Linux and
 * `Escape` (or `Esc` for short)
 * `VolumeUp`, `VolumeDown` and `VolumeMute`
 * `MediaNextTrack`, `MediaPreviousTrack`, `MediaStop` and `MediaPlayPause`
+* `PrintScreen`

+ 3 - 7
docs/api/web-contents.md

@@ -764,13 +764,9 @@ Sends an input `event` to the page.
 
 For keyboard events, the `event` object also have following properties:
 
-* `keyCode` Char or String (**required**) - The character that will be sent
-  as the keyboard event. Can be a single UTF-8 character, or the name of the
-  key that generates the event. Accepted key names are `enter`, `backspace`,
-  `delete`, `tab`, `escape`, `control`, `alt`, `altgr` (Windows only), `shift`,
-  `end`, `home`, `insert`, `left`, `up`, `right`, `down`, `pageUp`, `pageDown`,
-  `printScreen`, `meta`, `cmd` (OSX only), `command` (OSX only), `option`
-  (OSX only)
+* `keyCode` String (**required**) - The character that will be sent
+  as the keyboard event. Should only use the valid key codes in
+  [Accelerator](accelerator.md).
 
 For mouse events, the `event` object also have following properties: