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 am using Screen with MinTTY at a bash prompt. Sometimes I want to activate scrollback and copy some stuff that was on the output. My first instinct is to scroll with the mouse, but all that happens is old bash commands start showing up (like when I press the up arrow). Is there a way to re-map the mouse wheel to:

  1. Go into scrollback mode, or
  2. If already in scrollback mode, start moving up in the scrollback window
share|improve this question

1 Answer 1

The easy thing to do is to stick the following into .screenrc:

termcapinfo xterm ti@:te@

That disables screen's use of mintty's alternate screen, but please note that old lines from all of screen's windows will get mixed up in the terminal's scrollback.

Screen maintains its own window-specific scrollback buffers though. Using mintty's "application mousewheel mode", and with the appropriate mappings in .screenrc, it should be possible to access those with the mousewheel, but I haven't tried that.

(Normally the mousewheel sends cursor keycodes, so that it works out of the box in things like "less", but in "application mousewheel mode" it sends separate codes. See the mintty manual for details.)

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.