Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 18.0Version 17.0 (current version)Version 16.0Version 15.0Version 14.0Version 13.0Version 12.0Version 11.0Version 10.0Version 2.0

On this page

KMManager.addKeyboard()

Summary

The addKeyboard() method adds a keyboard into the keyboards list.

Syntax

KMManager.addKeyboard(Context context, HashMap<String, String> keyboardInfo)

Parameters

context
The context.
keyboardInfo
A dictionary of keyboard information with keys and values defined as HashMap<String key, String value>.

Returns

Returns true if the keyboard was added successfully, false otherwise.

Description

Use this method to include a keyboard in the keyboards list so that it can be selected from the keyboards menu. If the keyboard with same keyboard ID and language ID exists, it updates the existing keyboard info.

Examples

Example: Using addKeyboard()

The following script illustrate the use of addKeyboard():

    // Add a custom keyboard
    HashMap<String, String> kbInfo = new HashMap<String, String>();
    kbInfo.put(KMManager.KMKey_KeyboardID, "tamil99m");
    kbInfo.put(KMManager.KMKey_LanguageID, "tam");
    kbInfo.put(KMManager.KMKey_KeyboardName, "Tamil 99M");
    kbInfo.put(KMManager.KMKey_LanguageName, "Tamil");
    kbInfo.put(KMManager.KMKey_KeyboardVersion, "1.1");
    kbInfo.put(KMManager.KMKey_Font, "aava1.ttf");
    KMManager.addKeyboard(this, kbInfo);

See also