Keyboard Properties
Most keyboards are generated automatically from the Keyman keyboard source by Keyman Developer and contain properties used by KeymanWeb during keyboard mapping. Keyboards implement mapping by invoking functions within KeymanWeb, but do not interact directly with the user interface. However, user interfaces may need to interact with custom developed keyboards if, for example, they use a "pick list" or have other IME-like behavior.
Each registered keyboard object defines some or all of the following exposed string properties:
Property name | Parameter in 'GetKeyboards' | Defined by | Description |
---|---|---|---|
KN | name | Keyboard (mandatory) | Visible name of keyboard |
KI | internalName | Keyboard (mandatory) | Internal, identifying name of keyboard (must be unique) |
KD | keyboardID | Keyboard ID | Globally unique ID (deprecated, assigned by Tavultesoft) |
KL | language | Stub script | Main supported language |
KLC | languageCode | Keyboard (optional) or stub script | Standard ISO code(s) for supported keyboard language(s) |
KC | country | Stub script | Name of country |
KCC | countryCode | Stub script | Abbreviation for country name |
KR | region | Stub script | Language region or continent |
KRC | regionCode | Stub script | Three-letter region code |
Keyboard objects may also define some or all of the following properties:
Property name | Type | Description |
---|---|---|
KV | JavaScript object | Visual keyboard object |
KH | html | Keyboard-specific help |
KS | number | Uses SMP (1) or only BMP (0 or omitted) Unicode encoding |
KDU | number | Include (1) or omit (0 or none) Latin letter labels to keys for phonetic layouts |
KVKL | JSON | Layout specification |
KFont | JavaScript object | Embedded font specification for mapped input elements and on-screen keyboard |
KOskFont | JavaScript object | Embedded font specification for on-screen keyboard |
For most keyboards which require an embedded font, the same font will be used for mapped elements and the on-screen keyboard, and only the KFont property wil be defined. The additional property KOskFont property would only be used where it may be helpful to use a different embedded font for the on-screen keyboard.
The KFont and KOskFont objects have the following members:
Member name | Type | Description | Example |
---|---|---|---|
family | string | Font-family name for embedded font | LatinWeb |
files | string or string array | Font file name or names | ['DejaVuSans.ttf','DejaVuSans.woff','DejaVuSans.eot'] |