Decode formatOtherKeys=0 format (XTerm default) too

Part of #10663
This commit is contained in:
Johannes Altmanninger 2024-08-11 10:32:51 +02:00
parent 2b40c6364e
commit d32825ba57
2 changed files with 5 additions and 2 deletions

View file

@ -116,7 +116,6 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod
bind --preset $argv ">" self-insert expand-abbr
bind --preset $argv "<" self-insert expand-abbr
bind --preset $argv shift-enter "commandline -i \n" expand-abbr
$legacy_bind --preset $argv \e\[27\;2\;13~ "commandline -i \n" expand-abbr # Sent with XTerm.vt100.formatOtherKeys: 0
bind --preset $argv alt-enter "commandline -i \n" expand-abbr
bind --preset $argv ")" self-insert expand-abbr # Closing a command substitution.
bind --preset $argv ctrl-space 'test -n "$(commandline)" && commandline -i " "'
@ -129,6 +128,5 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod
bind --preset $argv ctrl-m execute
# Make Control+Return behave like Return because it's easy to mistype after accepting an autosuggestion.
bind --preset $argv ctrl-enter execute
$legacy_bind --preset $argv \e\[27\;5\;13~ execute # Sent with XTerm.vt100.formatOtherKeys: 0
end
end

View file

@ -916,6 +916,11 @@ pub trait InputEventQueuer {
25 | 26 => {
shift(char::from_u32(u32::from(function_key(3)) + params[0][0] - 25).unwrap())
} // rxvt style
27 => {
let key =
canonicalize_keyed_control_char(char::from_u32(params[2][0]).unwrap());
masked_key(key, None)
}
28 | 29 => {
shift(char::from_u32(u32::from(function_key(5)) + params[0][0] - 28).unwrap())
} // rxvt style