Keyman Package Metadata files
- Used by:
- Keyman applications on all platforms except web.
- Description:
- The files
kmp.infandkmp.jsonare metadata for a Keyman package file. - Details:
-
When Keyman Developer compiles a Keyman package source file (.kps), it creates and automatically adds
kmp.infandkmp.jsoninto the Keyman Package file (.kmp).Keyman on all platforms now use
kmp.jsonto install the keyboards (.kmx) in the package.Older versions of Keyman Desktop for Windows use
kmp.inf, a parallel format of the package metadata. Note: the lexical model compiler does not addkmp.inf, and new functionality is not included. Future versions of Keyman Developer will stop supportingkmp.inf. - Package purposes:
-
A Keyman Package file can be used to distribute keyboards (most common), lexical models, or user interface localizations for Keyman Desktop.
KMP.JSON
The package object
The kmp.json file is a base object described as
system-
ObjectSystemobject. options-
ObjectAn
Optionsobject. startMenu-
ObjectStart Menuobject. info-
ObjectInfoobject. files-
ObjectArray of objects, each containing a name and description of each file in in the package
keyboards-
ObjectArray of
Keyboardobjects. lexicalModels-
ObjectArray of
LexicalModelobjects.
The System object
The System object is used by Keyman Desktop to install keyboards
keymanDeveloperVersion-
stringThe version of Keyman Developer used to create the package file. If undefined, use
'0.0.0.0' fileVersion,-
string
The Options object
The Options object is used by Keyman Desktop to install keyboards
readmeFile-
stringA reference to the HTML file in the package for the keyboard package readme, presented before the package is installed.
graphicFile-
stringA reference to an image file, .png or .jpeg recommended formats, associated with the keyboard package, and shown at package installation time.
welcomeFile-
stringA reference to the HTML file containing keyboard package documentation, available through the help interfaces in Keyman, and shown once after the package is successfully installed. In the past, this file was always called welcome.htm.
licenseFile-
stringA HTML file containing the package license.
The Start Menu object
The StartMenu object is used by Keyman Desktop to install windows
folder-
stringThe folder that Keyman Desktop will create
items-
ArrayAn array of Item objects
The Item Object
The Item object
name-
stringThe item name
filename-
stringThe filename of the item
location-
stringThe location for Keyman Desktop to place the item
The Info object
The Info object describes the Keyman package
name-
stringThe Keyman package name
version-
stringThe version number of the package in dotted number format. Defaults to
'1.0'if missing copyright-
stringoptionalCopyright information
author-
stringoptionalThe Keyman package author and email address
website-
stringoptionalDescription and URL for additional Keyboard package documentation
The Keyboard object
The Keyboard object describes an individual keyboard in the Keyman package. A package cannot contain both lexical models and keyboards.
name-
stringName of keyboard
id-
stringID of the keyboard, always matches the filename of the keyboard
rtl-
booleanoptionaltrueif the keyboard targets a right-to-left script.falseif absent. version-
stringversion number of the keyboard in dotted number format. Defaults to
'1.0'if missing languages-
ArrayAn array of
Languageobjects linked to the keyboard. displayFont-
stringoptionalThe filename of the font for input fields (and OSK, if
oskFontis not present). oskFont-
stringoptionalThe filename of the font for the OSK
examples-
ArrayAn array of
Exampleobjects linked to the keyboard.
The Language object
The Language object describes the language that can be typed with the keyboard
name-
stringThe name of the language
id-
string
The Example object
The Example object describes a keying sequence example text for the keyboard.
This can be the easiest way for a new user to start using a keyboard, and is
particularly helpful when the keyboard makes use of keying sequences that may
not be immediately obvious.
id-
stringThe BCP 47 language code for the example.
keys-
stringThe key sequence to type the example. The key sequence must list each key combination, separated by space. The actual text for each key is reasonably arbitrary, to allow you to provide examples for touch keyboards as well as desktop keyboards. There are three special kinds of key strings:
- Modifier keys may be specified with the
+character, e.g.shift+eorright-alt+k. Use lower case keys. The suggested standard modifiers are:shift,ctrl,alt,left-alt,right-alt,left-ctrl,right-ctrl, andoption(mac). - The space key itself may be specified with
space. - To avoid confusion with modifier keys, the + key can be specified
with
plus.
For example, the key sequence x, j, m, Shift+e, r may be specified as
x j m shift+e rorx j m E r. - Modifier keys may be specified with the
text-
stringThe expected output when the
keysare typed note-
stringA brief explanation of the example, e.g. "Name of language"
The LexicalModel object
The LexicalModel object describes an individual model in the Keyman package. A package cannot contain both lexical models and keyboards.
name-
stringName of model
id-
stringID of the model, always matches the filename of the model
rtl-
booleanoptionaltrueif the model targets a right-to-left script.falseif absent. version-
stringversion number of the model in dotted number format.
languages-
ArrayAn array of
Languageobjects linked to the model.


