I stopped using my xterms' scrollback buffers a while ago, because when I
switched screen windows a lot the xterm's scrollback got very jumbled.
Still, I missed the convenience of just pressing Shift-PgUp to get to that
scrollback buffer.  I finally figured out a nice solution, which I'm
documenting here in case anyone else is interested.  I put the following
in my ~/.Xresources:

  XTerm.vt100.translations: #override \n\
      Shift <Key>Prior:string(0x1b) string("[5;2~") \n\
      Shift <Key>Next:string(0x1b) string("[6;2~")

That forces xterm to pass the keys through to apps running within.  I then
put this in my .screenrc:

  bindkey "^[[5;2~" eval "copy" "stuff ^b"
  bindkey -m "^[[5;2~" stuff ^b
  bindkey -m "^[[6;2~" stuff ^f

Outside copy mode, Shift-PgUp enters copy mode and does a page up.  Once
in copy mode, it merely does a page up.  A simple solution, once I
remembered bindkey's -m option.

-- 
...computer contrarian of the first order... / http://aperiodic.net/phil/
PGP: 026A27F2  print: D200 5BDB FC4B B24A 9248  9F7A 4322 2D22 026A 27F2
--- --
The dilithium cyrstals need to be rotated.
                       -- BOFH excuse #278
---- --- --


_______________________________________________
screen-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/screen-users

Reply via email to