Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5210)

Unified Diff: chrome/common/extensions/api/virtual_keyboard_private.json

Issue 20145004: Switch from text insertion to key press and release events on the virtual k… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code cleanup. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/virtual_keyboard_private.json
diff --git a/chrome/common/extensions/api/virtual_keyboard_private.json b/chrome/common/extensions/api/virtual_keyboard_private.json
index 92b6bceaecb5563cdcc365fe934341c773fc9ed2..12024fd24353a17bd54f2779fbd0024e42d3826b 100644
--- a/chrome/common/extensions/api/virtual_keyboard_private.json
+++ b/chrome/common/extensions/api/virtual_keyboard_private.json
@@ -7,6 +7,18 @@
"namespace": "virtualKeyboardPrivate",
"platforms": ["chromeos"],
"description": "none",
+ "types": [
+ {
+ "id": "VirtualKeyboardEvent",
+ "type": "object",
+ "properties": {
+ "type": {"type": "string", "description": "One of keyup or keydown.", "enum": ["keyup", "keydown"]},
+ "charValue": {"type": "integer", "description": "Unicode value of the key."},
+ "keyCode": {"type": "integer", "description": "Virtual key code, which is independent of the keyboard layout or modifier state."},
+ "shiftKey": {"type": "boolean", "optional": true, "description": "Whether or not the SHIFT key is pressed."}
Matt Perry 2013/09/03 22:33:33 nit: add "Defaults to false." (I'm assuming)
+ }
+ }
+ ],
"functions": [
{
"name": "insertText",
@@ -45,6 +57,23 @@
"parameters": []
}
]
+ },
+ {
+ "name": "sendKeyEvent",
+ "type": "function",
+ "description": "Sends a fabricated key event to the focused input field.",
+ "parameters": [
+ { "name": "keyEvent",
+ "$ref": "VirtualKeyboardEvent",
+ "description": ""
+ },
+ { "name": "callback",
+ "type": "function",
+ "optional": true,
+ "description": "Called after processing the event.",
+ "parameters": []
+ }
+ ]
}
]
}

Powered by Google App Engine
This is Rietveld 408576698