OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [ | 5 [ |
6 { | 6 { |
7 "namespace": "virtualKeyboardPrivate", | 7 "namespace": "virtualKeyboardPrivate", |
8 "platforms": ["chromeos"], | 8 "platforms": ["chromeos"], |
9 "description": "none", | 9 "description": "none", |
| 10 "types": [ |
| 11 { |
| 12 "id": "VirtualKeyboardEvent", |
| 13 "type": "object", |
| 14 "properties": { |
| 15 "type": {"type": "string", "description": "One of keyup or keydown.",
"enum": ["keyup", "keydown"]}, |
| 16 "charValue": {"type": "integer", "description": "Unicode value of the
key."}, |
| 17 "keyCode": {"type": "integer", "description": "Virtual key code, which
is independent of the keyboard layout or modifier state."}, |
| 18 "shiftKey": {"type": "boolean", "optional": true, "description": "Whet
her or not the SHIFT key is pressed."} |
| 19 } |
| 20 } |
| 21 ], |
10 "functions": [ | 22 "functions": [ |
11 { | 23 { |
12 "name": "insertText", | 24 "name": "insertText", |
13 "type": "function", | 25 "type": "function", |
14 "description": "Inserts text into the currently focused text field.", | 26 "description": "Inserts text into the currently focused text field.", |
15 "parameters": [ | 27 "parameters": [ |
16 { "name": "text", | 28 { "name": "text", |
17 "type": "string", | 29 "type": "string", |
18 "description": "The text that will be inserted." | 30 "description": "The text that will be inserted." |
19 }, | 31 }, |
(...skipping 18 matching lines...) Expand all Loading... |
38 "type": "integer", | 50 "type": "integer", |
39 "description": "Bitmask representing the state of the system modifie
r keys." | 51 "description": "Bitmask representing the state of the system modifie
r keys." |
40 }, | 52 }, |
41 { "type": "function", | 53 { "type": "function", |
42 "name": "callback", | 54 "name": "callback", |
43 "optional": true, | 55 "optional": true, |
44 "decription": "called when the swipe movement is completed.", | 56 "decription": "called when the swipe movement is completed.", |
45 "parameters": [] | 57 "parameters": [] |
46 } | 58 } |
47 ] | 59 ] |
| 60 }, |
| 61 { |
| 62 "name": "sendKeyEvent", |
| 63 "type": "function", |
| 64 "description": "Sends a fabricated key event to the focused input field.
", |
| 65 "parameters": [ |
| 66 { "name": "keyEvent", |
| 67 "$ref": "VirtualKeyboardEvent", |
| 68 "description": "" |
| 69 }, |
| 70 { "name": "callback", |
| 71 "type": "function", |
| 72 "optional": true, |
| 73 "description": "Called after processing the event.", |
| 74 "parameters": [] |
| 75 } |
| 76 ] |
48 } | 77 } |
49 ] | 78 ] |
50 } | 79 } |
51 ] | 80 ] |
OLD | NEW |