mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-26 17:47:40 +00:00
kmc-convert provides tooling to convert between various common keyboard description file formats. Each conversion will be implemented in its single, separate module (and each module will done in its own PR) This PR will address the conversion **keylayout → kmn** Co-authored-by: Marc Durdin <marc@durdin.net>
24 lines
1.2 KiB
Markdown
24 lines
1.2 KiB
Markdown
|
|
# Keylayout
|
|
|
|
A keylayout file is a configuration file used macOS to define custom keyboard mappings, mapping physical key presses to specific characters or Unicode symbols. These XML-based files, created with Ukelele, allow users to create custom layouts for different languages or special haracters, such as mapping Option + Key combinations. With kmc-convert we can convert these keylayout files to .kmn files which can be used in Keyman keyboards.
|
|
For validating a .keylayout file a keylayout.schema.json is needed.
|
|
|
|
This is to get a **keylayout.schema.json**:
|
|
|
|
|
|
- We first need to have a `.XSD file` created from a `.keylayout file` (which is an xml-file type )
|
|
` e.g. resources\standards-data\keylayout\dtd\keylayout.xsd`
|
|
|
|
|
|
- Then we need to run `./create_keylayout_schema.sh` to obtain a `.schema.json` file
|
|
` e.g resources\standards-data\keylayout\create_keylayout_schema.sh`
|
|
|
|
|
|
- Then we need to run `build.sh configure` of `common/web/types/` which will create a `schema.validate.mjs` file
|
|
` e.g. common/web/types/build.sh configure`
|
|
|
|
|
|
- The .mjs can then be used via `SchemaValidators` to validate keylayout files
|
|
` e.g. SchemaValidators.default.keylayout(source)`
|
|
|