My goal is to use C-k as my tmux prefix on my local machine, but when I'm on a tmux session that itself contains an ssh session into a machine that is hosting a tmux session, I'd like to press C-kj (or C-k C-j, or whatever) to get the prefix across to the remote tmux session.
Per the .tmux.conf linked to from here: https://stackoverflow.com/a/9630367
And the explanation here: https://stackoverflow.com/a/8530024
I've set the following:
# prefix and send-prefix settings.
unbind C-b
set -g prefix C-k
bind-key -n C-j send-prefix
It seems so simple, but somehow the above isn't working for me. C-k works great on single tmux sessions, but C-k C-j doesn't get through the prefix to the remote one. I'm clearly missing something simple.
local tmux is on Ubuntu and is version 1.6
Remote tmux is usually on RedHat and is version 1.6.
Note: Without any of these settings, C-b C-b sends the prefix to the remote machine as expected. But I'd really prefer C-k and C-k C-j.
My entire config (for both the local and remote machines):
# prefix and send-prefix settings.
unbind C-b
set -g prefix C-k
bind-key -n C-j send-prefix
# Set scrollback buffer n lines.
set -g history-limit 5000
# Listen for activity on all windows.
set -g bell-action any
set -g status-bg blue
set -g status-fg white
set -g status-left '#[fg=yellow]#H'
set-window-option -g window-status-current-bg magenta
# Set vi mode bindings.
setw -g mode-keys vi