Changes

Jump to: navigation, search

WebAPI/KeboardIME

1,793 bytes added, 16:19, 23 July 2013
Virtual Keyboard/IME API
= Virtual Keyboard/IME API =
__TOC__
* The VKB should be able to switch the focus onto the previous/next input field.
* The return key label of the VKB can be customized.
 
== Proposed Manifest of a 3rd-Party IME ==
3 special fields to distinguish and describe a 3rd-party IME:
* [Line 4] a "role" field with value "keyboard" declares it's a keyboard app. Homescreen app will ignore some role types when displaying app icons, and "keyboard" is one of them. (see {{bug|892397}})
* [Line 6-8] a "permissions" field that requests "keyboard" permission. All keyboard apps need this permission for sending input keys and updating the value of a input field.
* [Line 9-30] a "entry_points" field specifies supported layouts. Each layout is described in a key-value pair, where the key represents the layout name (will be shown up on Settings app with the app name), and the value describes details information of the layout, including launch path of the layout and supported input types. (See [[#Layout Matching Algorithm]])
 
1 {
2 "name": "MyKeyboard",
3 "description": "A 3rd Party Keyboard",
4 "role": "keyboard",
5 "launch_path": "/settings.html",
6 "permissions": {
7 "keyboard": {}
8 },
9 "entry_points": {
10 "English": {
11 "launch_path": "/index.html#en",
12 "description": "English layout",
13 "type": ["url", "number"]
14 },
15 "English (Dvorak)": {
16 "launch_path": "/index.html#en-Dvorak",
17 "description": "Dvorak layout",
18 "type": ["text", "url", "number"]
19 },
20 "Spanish": {
21 "launch_path": "/index.html#es",
22 "description": "Spanish layout",
23 "type": ["text", "number"]
24 },
25 "number": {
26 "launch_path": "/index.html#numberLayout",
27 "description": "Number layout",
28 "type": ["number"]
29 }
30 }
31 }
 
=== Layout Matching Algorithm ===
== Proposed API ==
Confirm
45
edits

Navigation menu