linux – How do I unbind C-j in tmux?


I like to use C-j to navigate down in tmux without a prefix, as I find it easier to navigate this way:

bind -n C-k selectp -U # switch to panel Up
bind -n C-j selectp -D # switch to panel Down
bind -n C-h selectp -L # switch to panel Left
bind -n C-l selectp -R # switch to panel Right

This works great in most circumstances, except when I am scrolling and want to move to a pane below without interrupting the “scroll mode” (sorry, don’t know what this is called). If I hit C-j it just interrupts the scrolling, then hitting C-j again takes me to the bottom window. Using prefix Down works fine and has the intended behaviour of moving me to the bottom pane while not interrupting the scroll.

I tried adding unbind C-j to my .tmux.conf but this didn’t seem to have any effect. Any ideas? Here is my .tmux.conf:

unbind C-j # doesn't do anything

bind -n C-k selectp -U # switch to panel Up
bind -n C-j selectp -D # switch to panel Down
bind -n C-h selectp -L # switch to panel Left
bind -n C-l selectp -R # switch to panel Right

unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix