aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-02-09 17:11:14 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-02-16 22:02:27 +0000
commitbd9041fdb560078d20a142a9ed27b56af903e351 (patch)
tree96d6ab4a1c0aa744d78728605e037038f6646acb
parentfoot.ini: move [text-bindings] section, and update example (diff)
doc: foot.ini: document the new [text-bindings] section
-rw-r--r--doc/foot.ini.5.scd31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd
index 7701cc69..7763a8b3 100644
--- a/doc/foot.ini.5.scd
+++ b/doc/foot.ini.5.scd
@@ -855,6 +855,37 @@ Be careful; do not use single-letter keys that are also used in
Default: _t_.
+# SECTION: text-bindings
+
+This section lets you remap key combinations to custom escape
+sequences.
+
+The format is _text=combo1...comboN_. That is, the string to emit may
+have one or more key combinations, space separated. Each combination
+is on the form _mod1+mod2+key_. The names of the modifiers and the key
+*must* be valid XKB key names.
+
+The text string specifies the characters, or bytes, to emit when the
+associated key combination(s) are pressed. There are two ways to
+specify a character:
+
+- Normal, printable characters are written as-is: *abcdef*.
+- Bytes (e.g. ESC) are written as two-digit hexadecimal numbers, with
+ a *\\x* prefix: *\\x1b*.
+
+Example: you would like to remap _Super+k_ to the _Up_ key.
+
+The escape sequence for the Up key is _ESC [ A_ (without the
+spaces). Thus, we need to specify this in foot.ini (*Mod4* is the XKB
+name for the Super/logo key):
+
+*\\x1b[A = Mod4+k*
+
+Another example: to remap _Super+c_ to _Control+c_:
+
+*\\x03 = Mod4+c*
+
+
# SECTION: mouse-bindings
This section lets you override the default mouse bindings.