Skip to content

Commit

Permalink
setting up alternative keys for nested tmux navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
sdondley authored and christoomey committed Jan 10, 2023
1 parent 9337b6d commit cdd66d6
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Expand Up @@ -273,7 +273,25 @@ bind -r C-l run "tmux select-pane -R"
bind -r C-\ run "tmux select-pane -l"
```
Another potential solution is to manually prevent the outermost tmux session
Another workaround is to configure tmux on the outer machine to send keys to
the inner tmux session:
```
bind-key -n 'M-h' 'send-keys c-h'
bind-key -n 'M-j' 'send-keys c-j'
bind-key -n 'M-k' 'send-keys c-k'
bind-key -n 'M-l' 'send-keys c-l'
```
Here we bind "meta" key (aka "alt" or "option" key) combinations for each of
the four directions and send those along to the innermost session via
`send-keys`. You use the normal `C-h,j,k,l` while in the outermost session and
the alternative bindings to navigate the innermost session. Note that if you
use the example above on a Mac, you may need to configure your terminal app to
get the option key to work like a normal meta key. Consult your terminal app's
manual for details.
A third possible solution is to manually prevent the outermost tmux session
from intercepting the navigation keystrokes by disabling the prefix table:
```
Expand Down

0 comments on commit cdd66d6

Please sign in to comment.