Added info about unicode escape support for keybindings with `chars`
parent
2b80bf8bab
commit
eb00736ad1
|
@ -19,13 +19,15 @@ We're interested in:
|
|||
- The value between the brackets of `Some`, which is the one to use in the key property of the mapping
|
||||
- The boolean properties in `ModifiersState`, which indicate which modifiers to add in the mods property of the mapping (these can be concatenated using the `|` character)
|
||||
|
||||
The value for the `chars` property of each entry in `key_bindings:` can be any text string and supports hexadecimal escapes:
|
||||
The value for the `chars` property of each entry in `key_bindings:` can be any text string and supports both hexadecimal (`\xNN`) and unicode (`\uNNNN`) escapes:
|
||||
|
||||
```yml
|
||||
# Insert the `[` character
|
||||
- { key: LBracket, mods: Alt, chars: "[" }
|
||||
# Send the Ctrl+C control using its hex value
|
||||
# Send the Ctrl+C control using its hex value...
|
||||
- { key: T, mods: Control|Shift, chars: "\x03" }
|
||||
# ... or using its unicode value
|
||||
- { key: T, mods: Control|Shift, chars: "\u0003" }
|
||||
```
|
||||
|
||||
### The `virtual_keycode` is `None`
|
||||
|
|
Loading…
Reference in New Issue