From 422d94fb46ad18e52f5385e416cd00cb7b4c2fc9 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 6 Feb 2022 19:36:44 +0100 Subject: wip: map key combos to custom text strings (including escapes) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With this, it is now possible to map key combos to custom escapes. The new bindings are defined in a new section, “text-bindings”, on the form “string=key combo”. The string can consist of printable characters, or \xNN style hex digits: [text-bindings] abcd = Control+a \x1b[A = Control+b Control+c Control+d # map ctrl+b/c/d to UP --- foot.ini | 3 +++ 1 file changed, 3 insertions(+) (limited to 'foot.ini') diff --git a/foot.ini b/foot.ini index 072613d0..9e6aa601 100644 --- a/foot.ini +++ b/foot.ini @@ -178,4 +178,7 @@ # select-word-whitespace=Control+BTN_LEFT-2 # select-row=BTN_LEFT-3 +[text-bindings] +# \x01=Mod4+a # Map Super+a -> Ctrl+a + # vim: ft=conf -- cgit v1.3 From 4e69c1d178d49bab9a1d9237ed21a3fb22100c0d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 9 Feb 2022 18:10:38 +0100 Subject: foot.ini: move [text-bindings] section, and update example Use Super+c -> Ctrl+c as example --- foot.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'foot.ini') diff --git a/foot.ini b/foot.ini index 9e6aa601..2ae09313 100644 --- a/foot.ini +++ b/foot.ini @@ -167,6 +167,9 @@ # cancel=Control+g Control+c Control+d Escape # toggle-url-visible=t +[text-bindings] +# \x03=Mod4+c # Map Super+c -> Ctrl+c + [mouse-bindings] # selection-override-modifiers=Shift # primary-paste=BTN_MIDDLE @@ -178,7 +181,4 @@ # select-word-whitespace=Control+BTN_LEFT-2 # select-row=BTN_LEFT-3 -[text-bindings] -# \x01=Mod4+a # Map Super+a -> Ctrl+a - # vim: ft=conf -- cgit v1.3