Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The excellent article that Jon Z is referring to is no longer available, but I was able to fish the text-only version of it from the Google cache. I'm saving it here in case Google drops that as well in the future. Original post was by Mikael Ståldal so credit where credit is due.</p> <p>--</p> <p><strong>How to use mousewheel in GNU Screen</strong></p> <p>GNU Screen has support for scrollback, but by default you have to use awkward keys to use it. I would like to be able to use Shift-PageUp, Shift-PageDown and the mousewheel to scroll, just like you can do in xterm.</p> <p>It was not easy to configure Screen for this, and it involves cooperation with the terminal emulator. But I finally managed to achieve a solution which works pretty well. Add this to your ~/.Xresources file (you need to log out for this to take effect):</p> <pre><code>XTerm*saveLines: 0 XTerm*vt100.translations: #override \n\ Ctrl &lt;Btn4Down&gt;: string(0x1b) string("[25S") \n\ Lock Ctrl &lt;Btn4Down&gt;: string(0x1b) string("[25S") \n\ Lock @Num_Lock Ctrl &lt;Btn4Down&gt;: string(0x1b) string("[25S") \n\ @Num_Lock Ctrl &lt;Btn4Down&gt;: string(0x1b) string("[25S") \n\ &lt;Btn4Down&gt;: string(0x1b) string("[5S") \n\ Ctrl &lt;Btn5Down&gt;: string(0x1b) string("[25T") \n\ Lock Ctrl &lt;Btn5Down&gt;: string(0x1b) string("[25T") \n\ Lock @Num_Lock Ctrl &lt;Btn5Down&gt;: string(0x1b) string("[25T") \n\ @Num_Lock Ctrl &lt;Btn5Down&gt;: string(0x1b) string("[25T") \n\ &lt;Btn5Down&gt;: string(0x1b) string("[5T") \n\ Shift &lt;KeyPress&gt; Prior: string(0x1b) string("[25S") \n\ Shift &lt;KeyPress&gt; Next: string(0x1b) string("[25T") \n </code></pre> <p>Then add this to your ~/.screenrc file:</p> <pre><code>defscrollback 1000 # Scroll up bindkey -d "^[[5S" eval copy "stuff 5\025" bindkey -m "^[[5S" stuff 5\025 # Scroll down bindkey -d "^[[5T" eval copy "stuff 5\004" bindkey -m "^[[5T" stuff 5\004 # Scroll up more bindkey -d "^[[25S" eval copy "stuff \025" bindkey -m "^[[25S" stuff \025 # Scroll down more bindkey -d "^[[25T" eval copy "stuff \004" bindkey -m "^[[25T" stuff \004 </code></pre> <p>This works in xterm. I’m not sure if it works in other terminal emulators.</p> <p>Note that this disables the normal scrolling support in xterm, you will only be able to scroll when using Screen. You might want to start xterm like this to always use Screen:</p> <pre><code>xterm -e screen </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload