From: Heilig Benedek Date: Mon, 16 Nov 2015 03:22:37 +0000 (+0100) Subject: Added documentation for the changes in KeyboardEvent and added missing mouseMove... X-Git-Tag: v0.35.1~31^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=5fff06d2c29c9b1ecf3b169033c472895e03de45;p=electron.git Added documentation for the changes in KeyboardEvent and added missing mouseMove event type --- diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 917e0670..50d39ac9 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -584,7 +584,7 @@ Disable device emulation enabled by `webContents.enableDeviceEmulation`. * `event` Object * `type` String (**required**) - The type of the event, can be `mouseDown`, `mouseUp`, `mouseEnter`, `mouseLeave`, `contextMenu`, `mouseWheel`, - `keyDown`, `keyUp`, `char`. + `mouseMove`, `keyDown`, `keyUp`, `char`. * `modifiers` Array - An array of modifiers of the event, can include `shift`, `control`, `alt`, `meta`, `isKeypad`, `isAutoRepeat`, `leftButtonDown`, `middleButtonDown`, `rightButtonDown`, `capsLock`, @@ -593,9 +593,14 @@ Disable device emulation enabled by `webContents.enableDeviceEmulation`. Sends an input `event` to the page. For keyboard events, the `event` object also have following properties: +(only one of `keyCode` and `keyIdentifier` is required) -* `keyCode` String (**required**) - A single character that will be sent as +* `keyCode` Char (**required**) - A single character that will be sent as keyboard event. Can be any UTF-8 character. +* `keyIdentifier` String (**required**) - A text representation of the character + that will be sent as keyboard event, can be `Enter`, `Backspace`, `Delete`, + `Tab`, `Escape`, `Control`, `Alt`, `Shift`, `End`, `Home`, `Insert`, `Left`, + `Up`, `Right`, `Down`, `PageUp`, `PageDown`, `PrintScreen` For mouse events, the `event` object also have following properties: