Updated Keyboard mappings (markdown)

Christian Duerr 2024-08-10 09:53:49 +00:00
parent 381e53c89e
commit 951ac7994e
1 changed files with 5 additions and 7 deletions

@ -25,15 +25,13 @@ 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 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 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 both hexadecimal (`\xNN`) and unicode (`\uNNNN`) escapes: The value for the `chars` property of each entry in `key_bindings:` can be any text string and supports unicode (`\uNNNN`) escapes:
```yml ```yml
# Insert the `[` character # Insert the `[` character
- { key: LBracket, mods: Alt, chars: "[" } - { key = "LBracket", mods = "Alt", chars = "[" }
# Send the Ctrl+C control using its hex value... # Send the Ctrl+C control using its unicode value
- { key: T, mods: Control|Shift, chars: "\x03" } - { key = "T", mods = "Control|Shift", chars = "\u0003" }
# ... or using its unicode value
- { key: T, mods: Control|Shift, chars: "\u0003" }
``` ```
### The `virtual_keycode` is `None` ### The `virtual_keycode` is `None`
@ -43,5 +41,5 @@ If Alacritty is not able to find the correct keycode for the pressed key, it mig
The scancode is also printed in the output of `--print-events` and can be used directly in the `key` field of a mapping: The scancode is also printed in the output of `--print-events` and can be used directly in the `key` field of a mapping:
```yml ```yml
- { key: 33, mods: Alt, chars: "[" } - { key = 33, mods = "Alt", chars = "[" }
``` ```