From 8967dd9cfe51276d63ef8ff64e8fc76f80a6fa3d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 28 Jul 2022 18:09:16 +0200 Subject: input: add new Unicode input mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This mode is activated through the new key-bindings.unicode-input and search-bindings.unicode-input key bindings. When active, the user can “build” a Unicode codepoint by typing its hexadecimal value. Note that there’s no visual feedback in this mode. This is intentional. This mode is intended to be a fallback for users that don’t use an IME. Closes #1116 --- doc/foot.ini.5.scd | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'doc') diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index 2e62a41f..d3881274 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -791,6 +791,32 @@ e.g. *search-start=none*. Jump the next prompt (requires shell integration, see *foot*(1)). Default: _Control+Shift+x_. +*unicode-input* + Input a Unicode character by typing its codepoint in hexadecimal, + followed by *Enter* or *Space*. + + For example, to input the character _ö_ (LATIN SMALL LETTER O WITH + DIAERESIS, Unicode codepoint 0xf6), you would first activate this + key binding, then type: *f*, *6*, *Enter*. + + Another example: to input 😍 (SMILING FACE WITH HEART-SHAPED EYES, + Unicode codepoint 0x1f60d), activate this key binding, then type: + *1*, *f*, *6*, *0*, *d*, *Enter*. + + Recognized key bindings in Unicode input mode: + + - Enter, Space: commit the Unicode character, then exit this mode. + - Escape, Ctrl+c, Ctrl+d, Ctrl+g: abort input, then exit this mode. + - 0-9, a-f: append next digit to the Unicode's codepoint. + - Backspace: undo the last digit. + + Note that there is no visual feedback while in this mode. This is + by design; foot's Unicode input mode is considered to be a + fallback. The preferred way of entering Unicode characters, emojis + etc is by using an IME. + + Default: _none_. + # SECTION: search-bindings This section lets you override the default key bindings used in @@ -869,6 +895,10 @@ scrollback search mode. The syntax is exactly the same as the regular Paste from the _primary selection_ into the search buffer. Default: _Shift+Insert_. +*unicode-input* + Unicode input mode. See _key-bindings.unicode-input_ for + details. Default: _none_. + # SECTION: url-bindings This section lets you override the default key bindings used in URL -- cgit v1.3