diff --git a/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml index dcf34042..d1d90fb2 100644 --- a/config/alacritty/alacritty.toml +++ b/config/alacritty/alacritty.toml @@ -21,5 +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 9cbd91ec..ffb0cef1 100644 --- a/config/foot/foot.ini +++ b/config/foot/foot.ini @@ -17,3 +17,9 @@ blink=no clipboard-copy=Control+Insert primary-paste=none clipboard-paste=Shift+Insert + +[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 d53f5c32..b121557b 100644 --- a/config/ghostty/config +++ b/config/ghostty/config @@ -25,6 +25,10 @@ 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 keybind = super+control+shift+alt+arrow_up=resize_split:up,100 keybind = super+control+shift+alt+arrow_left=resize_split:left,100 diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf index 7d550d78..48710ba6 100644 --- a/config/kitty/kitty.conf +++ b/config/kitty/kitty.conf @@ -13,6 +13,10 @@ 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 # Allow remote access allow_remote_control yes diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index de772031..b5446eac 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -12,6 +12,10 @@ bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi y send -X copy-selection-and-cancel # Pane Controls +bind -n M-Enter split-window -v -c "#{pane_current_path}" +bind -n M-S-Enter split-window -h -c "#{pane_current_path}" +bind -n M-Escape kill-pane + bind h split-window -v -c "#{pane_current_path}" bind v split-window -h -c "#{pane_current_path}" bind x kill-pane @@ -72,6 +76,7 @@ setw -g aggressive-resize on set -g detach-on-destroy off set -g extended-keys on set -g extended-keys-format csi-u +set -g terminal-features[3] "xterm-kitty:extkeys" set -sg escape-time 10 # Status bar