Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with TMUX key bindings. When I'm working on a terminal pane, if I press ctrl+pgup, it should scroll the screen one page up, as a normal terminal, but it doesn't.

Also, while using VIM, I have mapped to do some actions, but this key combination is not called.

Any TMUX expert there?.

share|improve this question

migrated from Jan 22 '11 at 10:36

This question came from our site for professional and enthusiast programmers.

use the tmux command setw -g xterm-keys on

you may also need to add this to your ~/.vimrc

if &term == "screen"
    set t_kN=^[[6;*~
    set t_kP=^[[5;*~
share|improve this answer
Thanks again sleepynate, but it does not work. In VIM, when I press ctrl+pgup, instead of moving to previous tab, the text is changed to Upper Case. Also, in the zsh shell, when I press ctrl+pgup, a "~5" is shown. – Leonardo M. ramé Sep 24 '10 at 19:53
I must add, in my ~/.zshrc I have "bindkey -e" – Leonardo M. ramé Sep 24 '10 at 20:15 <--- and you have all of these set? – sleepynate Sep 24 '10 at 22:12
Sleepynate, I added them to my .zshrc, but gave up on TMUX, I replaced it by Terminator. – Leonardo M. ramé Sep 28 '10 at 17:46

Be sure that your shell and terminal are sending the appropriate escape sequences to one-another to indicate non-alphanumeric keys. For example, I use tmux with zsh in urxvt. I had quite a few problems with keys acting inappropriately (like enter insert mode and adding [3~) until I made sure my shell was communicating the appropriate key-bindings with:

# .zshrc
bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
bindkey '\e[6~' down-line-or-search
bindkey '\e[5~' up-line-or-search
bindkey '\e[3~' delete-char

If this is your problem, yours are not likely to be the same, but you should be able to find resources specific to your shell and terminal emulator.

share|improve this answer
I too use zsh, with gnome-terminal, and I also have those key bindings. Without tmux the terminal works correctly, that's why I think my problem should be solved by modifying my .tmux.conf (but I don't know how). – Leonardo M. ramé Sep 23 '10 at 15:52
oh interesting. I'll have to keep thinking :) – sleepynate Sep 23 '10 at 19:05

Add the following keybindings to your .zlogin:

bindkey '\e[3~' delete-char  
bindkey '^r' history-beginning-search-backward  
bindkey '^g' history-beginning-search-forward  
bindkey -s '^l' '^qcls\n'
share|improve this answer
can you explain us what it does, i see a potential answer. – Francisco Tapia Aug 26 '15 at 19:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.