Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(developer): add some docs for language examples in kmp.json #12805

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions developer/docs/help/reference/file-types/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ The `Keyboard` object describes an individual keyboard in the Keyman package. A

The filename of the font for the OSK

`examples`

: `Array`

An array of [`Example`](#obj-example) objects linked to the keyboard.

### The Language object

The `Language` object describes the language that can be typed with the keyboard
Expand All @@ -259,6 +265,51 @@ The `Language` object describes the language that can be typed with the keyboard

[BCP 47 language code](../bcp-47)

### 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`

: `string`

The BCP 47 language code for the example.

`keys`

: `string`

The 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+e` or
`right-alt+k`. Use lower case keys. The suggested standard modifiers are:
`shift`, `ctrl`, `alt`, `left-alt`, `right-alt`, `left-ctrl`, `right-ctrl`,
and `option` (mac).
* The <kbd>space</kbd> key itself may be specified with `space`.
* To avoid confusion with modifier keys, the <kbd>+</kbd> key can be specified
with `plus`.

For example, the key sequence <kbd>x</kbd>, <kbd>j</kbd>, <kbd>m</kbd>,
<kbd>Shift</kbd>+<kbd>e</kbd>, <kbd>r</kbd> may be specified as
`x j m shift+e r` or `x j m E r`.

`text`

: `string`

The expected output when the `keys` are typed

`note`

: `string`

A 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.
Expand Down
Loading