Bind Shift+Return CSI u sequence to Return

I often hit Shift-Return accidentally, which makes my terminal echo a
weird escape sequence. Traditionally, terminals interpret Shift-Return
as Return, so let's follow that behavior.  Analoguous to commit 1dc526884
(Bind Shift+Space CSI u sequence to Space, 2022-04-24).
This commit is contained in:
Johannes Altmanninger 2022-12-11 18:20:24 +01:00
parent 27739b9a47
commit 9c0680070d

View file

@ -192,9 +192,12 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod
bind --preset $argv \n execute bind --preset $argv \n execute
bind --preset $argv \r execute bind --preset $argv \r execute
# Control+Return behave like Return because it's easy to mistype after accepting an autosuggestion. # Make Control+Return behave like Return because it's easy to mistype after accepting an autosuggestion.
bind --preset $argv \e\[27\;5\;13~ execute # Sent with XTerm.vt100.formatOtherKeys: 0 bind --preset $argv \e\[27\;5\;13~ execute # Sent with XTerm.vt100.formatOtherKeys: 0
bind --preset $argv \e\[13\;5u execute # CSI u sequence, sent with XTerm.vt100.formatOtherKeys: 1 bind --preset $argv \e\[13\;5u execute # CSI u sequence, sent with XTerm.vt100.formatOtherKeys: 1
# Same for Shift+Return
bind --preset $argv \e\[27\;2\;13~ execute
bind --preset $argv \e\[13\;2u execute
end end
end end