First, you need to determine whether your terminal sends different escape sequences for these key combinations. Applications running in terminals get characters as input, not keys. Function keys are encoded as control characters or as escape sequences beginning with the escape character (which you can write as \e
in a key binding).
To see the escape sequence sent by a key combination in a terminal, press Ctrl+V at a shell prompt, then press the key combination. For example, if I press Ctrl+V Ctrl+Left at a shell prompt, I see ^[O5D
. ^[
is the escape character, so I would need to bind \eO5D
in Mutt to make it react to Ctrl+Left:
bind editor \eO5D backward-word
Some terminals send the same escape sequence for the same key with different modifiers. If that's the case, you'll need to figure out how to change the terminal's behavior or switch to a different terminal.
:exec what-key
to get this information, but then could not figure out "what-key" to press to get out of thewhat-key
command, the key sequence to exit isCtrl-g
. – KDN Jan 28 '17 at 03:41what-key
just give me a letterA
,B
,C
orD
.I am not the only one : https://www.mail-archive.com/mutt-users@mutt.org/msg36985.html
– Bruno BEAUFILS Jun 03 '20 at 20:54