I don't know if one is wrong, IIRC there is a lot of room for interpretation here.
Try "printf \033[>4;2m;cat" outside tmux and you can see what they send when you press the keys (you won't be able to use ^C so you will need to close the terminal window). xterm sends \033[27;6;72~ for C-S-h, that is 'H' not 'h'. If the terminals are sending something different you will need to talk to their developers and see what they say. On Tue, 14 Oct 2025 at 12:09, Grégory Pakosz <[email protected]> wrote: > Hello, > > In https://groups.google.com/g/tmux-users/c/xL3C1ym79gs/m/CFXf9sk0BAAJ, I > asked what it takes to make Control + Shift bindings work with iTerm2 + > tmux. > > Nicholas answered that I need to bind C-S-H/C-S-L, and not C-S-h/C-S-l. > So in my tmux conf, I have: > > set extended-keys on > bind -r C-S-H swap-window -t -1 \; select-window -t -1 # swap current > window with the previous one > bind -r C-S-L swap-window -t +1 \; select-window -t +1 # swap current > window with the next one > > It works in iTerm2. > Today I noticed that if I want it to work with Ghostty, I need to use > C-S-h and C-S-l: > > set extended-keys on > bind -r C-S-h swap-window -t -1 \; select-window -t -1 # swap current > window with the previous one > bind -r C-S-l swap-window -t +1 \; select-window -t +1 # swap current > window with the next one > > Why is it the case? > Is one of the two terminal emulators wrong? > > Thank you! > > -- > You received this message because you are subscribed to the Google Groups > "tmux-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion, visit > https://groups.google.com/d/msgid/tmux-users/a6cfdad5-cfce-42ed-8a35-ce49487dadaan%40googlegroups.com > <https://groups.google.com/d/msgid/tmux-users/a6cfdad5-cfce-42ed-8a35-ce49487dadaan%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "tmux-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion, visit https://groups.google.com/d/msgid/tmux-users/CAEdLfcE90OPJ6T6cyL--0xB5fsPC%2BrgLBEX0O0HGhLUHXV-yXA%40mail.gmail.com.
