Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

migrated from stackoverflow.com Jan 22 '11 at 10:36

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

2 Answers

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;*~
endif
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
    
wiki.archlinux.org/index.php/Zsh#Key_Bindings <--- 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
add comment

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 comment

Your Answer

 
discard

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