I've been using (prefixed) o
to zoom the current tmux pane, and Space
to zoom the neighboring pane:
bind o resize-pane -Z
bind Space if-shell -F '#{window_zoomed_flag}' 'last-pane' 'select-pane -t :.+; resize-pane -Z'
I want to change these to use Space
and Shift-Space
instead.
bind Space resize-pane -Z
bind S-Space if-shell -F '#{window_zoomed_flag}' 'last-pane' 'select-pane -t :.+; resize-pane -Z'
I restarted my tmux server and ran tmux list-keys
. The new bindings are listed, and the first binding works as expected, but I'm having trouble passing S-Space
through to tmux for the second binding.
Using iTerm (I'm on OSX) with its default settings, ⇧ShiftSpace ignores the ⇧Shift modifier, so when I type <prefix> S-Space
, tmux just receives <prefix> Space
.
I actually configure iTerm to send escape sequence ^[[32;2u
for ⇧ShiftSpace so I can use it for Vim key-mappings. With this setting active, typing <prefix> S-Space
in tmux inserts 32;2u
on the command line.
I tried to debug using cat -v
inside tmux:
^[[32;2u # S-Space
32;2u # <prefix> S-Space
Is there a different escape sequence that tmux would recognize as S-Space
, or some other way to make it work?
I read a bit about tmux's terminal-overrides
setting, but that sounds like it's only for control sequences. I use C-a
as my prefix key, if that's relevant.