From eb00736ad14902023642faf96de708160394c05b Mon Sep 17 00:00:00 2001 From: Florian Beeres Date: Sun, 26 Apr 2020 11:40:46 +0200 Subject: [PATCH] Added info about unicode escape support for keybindings with `chars` --- Keyboard-mappings.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Keyboard-mappings.md b/Keyboard-mappings.md index 4e3f4b5..e0acd22 100644 --- a/Keyboard-mappings.md +++ b/Keyboard-mappings.md @@ -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`