Confirmed users
478
edits
No edit summary |
|||
Line 1: | Line 1: | ||
Hello! The goal of this document is to allow people to add keyboard layout of their own language/script on the '''v1 Gaia Keyboard app'''. | Hello! The goal of this document is to allow people to add keyboard layout of their own language/script on the '''v1.2 Gaia Keyboard app'''. | ||
== Status of the Gaia Keyboard app & system architecture == | == Status of the Gaia Keyboard app & system architecture == | ||
As of Oct 2013, two major features have been recently implemented in Firefox OS. | |||
* A build flag exist to turn on/off keyboard/spellcheck dictionary to include in the build, in the default Gaia Keyboard app (see {{Bug|884752}}). | |||
* An OS-level feature that allow users to install 3rd-party keyboard apps from marketplace. See {{Bug|816869}}. | |||
To come up with a new keyboard layout, you could either put a layout file in Gaia, build the keyboard app with a build config, or come up with your own keyboard app and install it to the phone. | |||
== How-tos: make a keyboard app == | |||
You might want to use the built-in keyboard as a template, or fork it. The basic ideas are | |||
* In the manifest, declare yourself as a keyboard in the <code>role</code> property. | |||
* Make sure you have the <code>keyboard</code> permission. | |||
After that, after installation and activation, your keyboard will show up on the bottom half of the screen whenever the user is focused to a input field. | |||
* Use the old, classic <code>window.resize</code> to update the area of your app should occupy. | |||
* Use the new, shiny <code>navigator.mozInputMethod</code> API to mutate the content of the input given, see [[WebAPI/KeboardIME|API page]] for detail. | |||
(some sample code and/or a small template app will help here) | |||
== How-tos: add your layout to your in the Gaia keyboard app == | |||
=== | See [https://github.com/mozilla-b2g/gaia/blob/master/apps/keyboard/CONFIGURE apps/keyboard/CONFIGURE] for detail. Depend on the language, you might want to add a dictionary, or include an interactive IME (for Asian languages). | ||
=== Spell check / word suggestion dictionary === | |||
(TBA) | |||
=== Asian IME === | |||
==== Introduction ==== | ==== Introduction ==== |