diff --git a/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml index b27558d5..d1d90fb2 100644 --- a/config/alacritty/alacritty.toml +++ b/config/alacritty/alacritty.toml @@ -21,7 +21,8 @@ decorations = "None" bindings = [ { key = "Insert", mods = "Shift", action = "Paste" }, { key = "Insert", mods = "Control", action = "Copy" }, -{ key = "Return", mods = "Shift", chars = "\u001B\r" }, +# Send Shift+Return as CSI-u so TUIs can distinguish it from Return without treating it as Alt+Return. +{ key = "Return", mods = "Shift", chars = "\u001B[13;2u" }, # Legacy encoding sends Alt+Shift+Return the same as Alt+Return; send CSI-u so tmux can match M-S-Enter. { key = "Return", mods = "Alt|Shift", chars = "\u001B[13;4u" } ] diff --git a/config/foot/foot.ini b/config/foot/foot.ini index 66090b35..53bb0ca4 100644 --- a/config/foot/foot.ini +++ b/config/foot/foot.ini @@ -17,3 +17,9 @@ blink=no clipboard-copy=Control+Insert Control+Shift+c XF86Copy primary-paste=none clipboard-paste=Shift+Insert Control+Shift+v XF86Paste + +[text-bindings] +# Send Shift+Return as CSI-u so TUIs can distinguish it from Return. +\x1b[13;2u=Shift+Return +# Send Alt+Shift+Return as CSI-u so tmux can match M-S-Enter. +\x1b[13;4u=Mod1+Shift+Return diff --git a/config/ghostty/config b/config/ghostty/config index 03ded4b3..b121557b 100644 --- a/config/ghostty/config +++ b/config/ghostty/config @@ -25,6 +25,8 @@ shell-integration-features = no-cursor,ssh-env # Keyboard bindings keybind = shift+insert=paste_from_clipboard keybind = control+insert=copy_to_clipboard +# Send Shift+Enter as CSI-u so TUIs can distinguish it from Enter. +keybind = shift+enter=csi:13;2u # Legacy encoding sends Alt+Shift+Enter the same as Alt+Enter; send CSI-u so tmux can match M-S-Enter. keybind = alt+shift+enter=csi:13;4u keybind = super+control+shift+alt+arrow_down=resize_split:down,100 diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf index af2da6dc..48710ba6 100644 --- a/config/kitty/kitty.conf +++ b/config/kitty/kitty.conf @@ -13,6 +13,8 @@ confirm_os_window_close 0 # Keybindings map ctrl+insert copy_to_clipboard map shift+insert paste_from_clipboard +# Send Shift+Enter as CSI-u so TUIs can distinguish it from Enter. +map shift+enter send_text all \e[13;2u # Kitty legacy encoding sends Alt+Shift+Enter the same as Alt+Enter; send CSI-u so tmux can match M-S-Enter. map alt+shift+enter send_text all \e[13;4u