OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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": "experimental.input.virtualKeyboard", | 7 "namespace": "experimental.input.virtualKeyboard", |
8 "nodoc": true, | 8 "nodoc": true, |
9 "types": [], | 9 "types": [], |
10 "functions": [ | 10 "functions": [ |
11 { | 11 { |
12 "name": "sendKeyboardEvent", | 12 "name": "insertText", |
13 "type": "function", | 13 "type": "function", |
14 "description": "Sends a keyboard event to Chrome.", | 14 "description": "Inserts text into the currently focused text field.", |
15 "parameters": [ | 15 "parameters": [ |
16 { "type": "object", | 16 { "name": "text", |
17 "name": "event", | 17 "type": "string", |
18 "properties": { | 18 "description": "The text that will be inserted." |
19 "type": { | |
20 "type": "string", | |
21 "description": "One of 'keyup' or 'keydown'." | |
22 }, | |
23 "keyIdentifier": { | |
24 "type": "string", | |
25 "description": "See http://www.w3.org/TR/2003/NOTE-DOM-Level-3-E
vents-20031107/keyset.html#KeySet-Set" | |
26 }, | |
27 "altKey": { | |
28 "type": "boolean", | |
29 "optional": true, | |
30 "description": "Whether or not the ALT key is pressed." | |
31 }, | |
32 "ctrlKey": { | |
33 "type": "boolean", | |
34 "optional": true, | |
35 "description": "Whether or not the CTRL key is pressed." | |
36 }, | |
37 "metaKey": { | |
38 "type": "boolean", | |
39 "optional": true, | |
40 "description": "Whether or not the META key is pressed." | |
41 }, | |
42 "shiftKey": { | |
43 "type": "boolean", | |
44 "optional": true, | |
45 "description": "Whether or not the SHIFT key is pressed." | |
46 } | |
47 }, | |
48 "description": "The keyboard event to be sent." | |
49 }, | 19 }, |
50 { "type": "function", | 20 { "type": "function", |
51 "name": "callback", | 21 "name": "callback", |
52 "optional": true, | 22 "optional": true, |
53 "description": "This function is called when the event processing is
completed.", | 23 "description": "Called when the insertion is completed.", |
54 "parameters": [] | 24 "parameters": [] |
55 } | 25 } |
56 ] | 26 ] |
57 } | 27 } |
58 ] | 28 ] |
59 } | 29 } |
60 ] | 30 ] |
OLD | NEW |