mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-12-24 23:18:56 +01:00
doc: Clarify the possible key values
This commit is contained in:
parent
2cb5e67d1f
commit
a2eea76e70
@ -97,14 +97,12 @@ Normally, a key's width is 1.0 unit. Unexpected Keyboard occupies the full width
|
||||
### Extra legend
|
||||
* `indication`: An optional extra legend to show under the main label. For example, `<key key0="2" indication="ABC" />` displays ABC at the bottom of the 2 key, as on a pinpad or some telephones. If the key also defines a downward swipe with `s` or `key8`, the legends overlap.
|
||||
|
||||
## Possible key values
|
||||
The properties that define the effects of tapping or swiping a key may be one of the built-in strings documented on [this page](Possible-key-values.md). For example, `se="cut"` says that a southeast swipe produces the "cut" key (Ctrl-C).
|
||||
### Possible key values
|
||||
|
||||
Some of those strings begin with `loc `. These are place-holders; the tap or swipe does nothing unless enabled through the "Add keys to keyboard" option in the Settings menu, or implicitly enabled by the language the device is set to use. For example, `ne="loc accent_aigu"` says that a northeast swipe produces the acute accent combinatorial key—if enabled.
|
||||
The possible key values are described in [this page](Possible-key-values.md).
|
||||
|
||||
If the string defining a tap or a swipe is anything other than one of the built-in strings, the defined string is output *verbatim.* This is what most of the taps and swipes on a typical keyboard do. So `key0="a"` simply outputs the letter a.
|
||||
|
||||
The string can output multiple characters, but cannot combine the built-in strings to specify a sequence of keystrokes.
|
||||
In a layout, a key value can also start with the `loc` prefix. These are place-holders, the tap or swipe does nothing unless enabled through the "Add keys to keyboard" option in the Settings menu, or implicitly enabled by the language the device is set to use.
|
||||
For example, `ne="loc accent_aigu"` says that a northeast swipe produces the acute accent combinatorial key—if enabled.
|
||||
|
||||
## Modmap
|
||||
The `<modmap>`...`</modmap>` pair encloses custom mappings for modifier keys. The modmap is placed inside the `<keyboard>`...`</keyboard>` pair, but outside any row. A layout can have at most one modmap.
|
||||
|
@ -1,6 +1,9 @@
|
||||
# Key values
|
||||
|
||||
This is an exhaustive list of special values accepted for the `key0` through `key8` or `nw` through `se` attributes on a key. Any string that does not exactly match these will be printed verbatim.
|
||||
This is an exhaustive list of special values accepted for the `key0` through `key8` or `nw` through `se` attributes on a key.
|
||||
|
||||
Any string that does not exactly match these will be printed verbatim.
|
||||
A key can output multiple characters, but cannot combine multiple built-in key values.
|
||||
|
||||
## Escape codes
|
||||
Value | Escape code for
|
||||
|
Loading…
Reference in New Issue
Block a user