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?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
I use these settings with urxvt in my ~/.screenrc:
termcapinfo rxvt-unicode <a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="becad7fe">[email protected]</a>:<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="05716045">[email protected]</a> termcapinfo rxvt <a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="99edf0d9">[email protected]</a>:<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b0c4d5f0">[email protected]</a> 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.)
Method 2
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* <a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0c78654c">[email protected]</a>:<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8afeefca">[email protected]</a>
or to be more complete:
termcapinfo xterm*|rxvt*|kterm*|Eterm* <a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7e0a173e">[email protected]</a>:<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6f1b0a2f">[email protected]</a>
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
https://en.wikipedia.org/wiki/Termcap
https://superuser.com/questions/629004/gnu-screen-change-focus-in-split-windows-with-mouse
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0