diff --git a/Layouts.md b/Layouts.md index 2c710b6..f0847b3 100644 --- a/Layouts.md +++ b/Layouts.md @@ -98,6 +98,8 @@ Each label can have the following properties: +* `codePoints`: when multiple code points should be entered; only available for `multi_text_key` described in the _[Key classes](https://github.com/Helium314/HeliBoard/wiki/Layouts#key-classes)_ section + * `labelFlags`: allows specific effects
@@ -120,12 +122,43 @@ Each label can have the following properties:
+
+
+Click to see an example with several label properties +
+ +```json +{ "label": "a", "type": "action", "width": 0.2, "popup": { "main": { "label": "!" }, "relevant": + [ +// The `b` character is displayed in the popup but this will open the settings. + { "label": "b|!code/-301" } + ] } +}, +// A space is added +{ "type": "placeholder", "width": 0.2 } +// This will write the characters "a", "b" and "c" while “%” is written on the key +{ "$": "multi_text_key", "codePoints": [97, 98, 99], "label": "%", "width": 0.2 } +``` + +
+ # Special labels Usually the label is what is displayed on the key. However, there are some special labels: * Currency keys * `$$$` will be replaced by the local currency, depending on your current layout language. If you define a key with `$$$` without defining popup keys, it will get the first 4 additional currencies (see below) as popup * `$$$1` - `$$$5` will be replaced by currencies available on long-pressing the currency key +

+
+ Click to see an example with currency key +
+ + ```json + { "label": "$$$", "type": "function", "width": 0.1 }, + { "label": "$$$3", "type": "normal", "width": 0.1 } + ``` + +
* Functional keys (incomplete list) * `alpha`: switch to alphabet keyboard (or main phone keyboard in case of phone layout) @@ -142,7 +175,7 @@ Usually the label is what is displayed on the key. However, there are some speci * `comma`: `,` key with special popups, will adapt to language-specific comma, or display `/` in URL fields and `@` in email fields * `space`: space key, with icon when using a number layout * `zwnj`: Zero-width non-joiner (automatically added next to space in alphabet layout for some languages) - * You can also use toolbar keys, e.g. `undo` + * You can also use toolbar keys, e.g. `{ "label": "undo", "type": "function" }`