-
-
Notifications
You must be signed in to change notification settings - Fork 137
spec(developer): KMXPlus compiler 🙀 #7047
Copy link
Copy link
Closed
Labels
Milestone
Description
Introduction
The KMXPlus Compiler will be written in TypeScript. It reads a LDML keyboard .xml file, resolves imports, validates and lints the resulting data, and generates a .kmx file.
Dependencies
- spec(common): KMX+ binary format supporting LDML #7043
- feat(common): add constant for v16.0 🙀 #7044
- feat(common): add KMX header for KMX+ data #7045
.kmx format
- The generated .kmx file COMP_KEYBOARD structure will have the following values:
struct COMP_KEYBOARD {
KMX_DWORD dwIdentifier; // KXTS
KMX_DWORD dwFileVersion; // VERSION_160 or higher
KMX_DWORD dwCheckSum; // Valid whole-file checksum
KMX_DWORD KeyboardID; // 0
KMX_DWORD IsRegistered; // 1
KMX_DWORD version; // 0
KMX_DWORD cxStoreArray; // # of metadata stores
KMX_DWORD cxGroupArray; // 0
KMX_DWORD dpStoreArray; // offset to metadata stores
KMX_DWORD dpGroupArray; // 0
KMX_DWORD StartGroup[2]; // 0xFFFFFFFF, 0xFFFFFFFF
KMX_DWORD dwFlags; // 0x0020, KF_KMXPLUS
KMX_DWORD dwHotKey; // 0
KMX_DWORD dpBitmapOffset; // 0, (future enhancement: offset to bitmap from start of file)
KMX_DWORD dwBitmapSize; // 0, (future enhancement: bitmap size in bytes)
};
The following metadata stores are permitted:
TSS_NAME 7 // required, name of keyboard
TSS_VERSION 8 // required, string version number, "a.b", matches dwFileVersion header
TSS_COMPILEDVERSION 20 // optional, string version number of compiler version, "a.b.c.d"
TSS_KEYMANCOPYRIGHT 21 // optional, string "Created with Keyman Developer version a.b.c.d"
TSS_VKDICTIONARY 34 // optional, Dictionary of virtual key names, required for touch layouts only
TSS_KEYBOARDVERSION 36 // optional, &keyboardversion system store value
Assorted:
- Need to track link between ldml keyboard bcp 47 metadata and .kps when compiling
Older notes:
- will include the following standard metadata fields.
- A wrapper must be provided as a standalone command-line tool for test
- Steven noted that icu4x may have something useful in this regard
Reactions are currently unavailable