I love screen, but it drives me nuts that I have to stop typing input, hit CTRL+A [, and then find what I need.

Is there a way to make the scroll wheel function normally, rather than scrolling commands?

Also, is it possible to enable Shift+PageUp/PageDn?


2 Answers 2


I use these settings with urxvt in my ~/.screenrc:

termcapinfo rxvt-unicode ti@:te@
termcapinfo rxvt ti@:te@
termcapinfo rxvt 'hs:ts=\E]2;:fs=07:ds=\E]2;screen07'

Those allow for scrollbar and mouse wheel to do "the right thing™".

Note that this is dependent on terminal type, so will not work if your terminal is not of type rxvt. If it doesn't work, try replacing rxvt and rxvt-unicode with the appropriate terminal type (get this by running printf $TERM.)

  • 2
    +1. Using "xterm" instead of "rxvt" and "rxvt-unicode", Shift-PgUp/-PgDown work for me on gnome-terminal. But the mousewheel scrolls in the shell history. Jul 17, 2012 at 7:24
  • when using gnome-terminal, mousewheel scrolls normal, i.e. in scrollback. Jul 17, 2012 at 7:31
  • When I use screen in gnome-terminal. Don't worry about it... Jul 17, 2012 at 7:38
  • 1
    This also worked for me using xterm in place of rvxt*. Thanks!
    – Bryan Agee
    Jul 19, 2012 at 18:24
  • 2
    Could you explain what each of these command do, please?
    – Totor
    May 3, 2014 at 12:39

check your $TERM variable to see what terminal you are actually using. If its xterm (or xterm*) use add this to ~/.screenrc to allow mouse scrolling:

termcapinfo xterm* ti@:te@

or to be more complete:

termcapinfo xterm*|rxvt*|kterm*|Eterm* ti@:te@

absent modifying your ~/.screenrc, you can scroll with Ctrl-a ESC and then use up-down arrows. q to quit.

Note: you can also use your mouse to change focus between split windows via adding this to your ~/.screenrc

mousetrack on

Term Cap is a device independent terminal description library/database.

References/copies from:

Terminal: termcapinfo command not found



  • This is the answer for macos... at least it is for mojave with default preferences for terminal.
    – Seamus
    Jan 5, 2020 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .