1 <h2 id="manifest">Manifest</h2>
2 <p>You must declare the "input" permission
3 in the <a href="manifest.html">extension manifest</a>
4 to use the input.ime API.
6 <pre data-filename="manifest.json">
8 "name": "My extension",
16 <h2 id="overview-examples">Examples</h2>
19 The following code creates an IME that converts typed letters to upper case.
25 chrome.input.ime.onFocus.addListener(function(context) {
26 context_id = context.contextID;
29 chrome.input.ime.onKeyEvent.addListener(
30 function(engineID, keyData) {
31 if (keyData.type == "keydown" && keyData.key.match(/^[a-z]$/)) {
32 chrome.input.ime.commitText({"contextID": context_id,
33 "text": keyData.key.toUpperCase()});
42 For an example of using this API, see the
44 href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/input.ime/basic/">basic input.ime sample</a>.
45 For other examples and for help in viewing the source code, see
46 <a href="samples.html">Samples</a>.