screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: configuring keys for copy mode scrolling


From: Phil! Gold
Subject: Re: configuring keys for copy mode scrolling
Date: Wed, 11 Jul 2012 14:06:42 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

* Christoph Anton Mitterer <address@hidden> [2012-07-10 21:08 +0200]:
> Is there an overall working way to making scrolling up/down working via
> the Shift+PgUp/PgDown, familiar to most users.

Not really, unfortunately.  The basic problem is twofold: first, terminal
emulators typically handle those keystrokes themselves; if you want screen
to see them (so you can go into screen's scrollback buffers), you'll have
to disable the terminal's handling of them, which will be different for
every terminal.  Second, there's no termcap definition for those keys, so
there's no generic way to tell screen "handle a Shift+PgUp keypress"; you
have to specify the characters the terminal sends, which will vary from
one to the next.

In case you use xterm, here's my xterm-specific config:

My .Xresources file contains:

    ! I use screen a lot, so its scrollback buffer is often more accurate than
    ! xterm's.  Thus, I pass through Shift-PgUp and Shift-PgDn to allow screen 
to
    ! use them.  I've hardcoded the escape sequences (rather than using 
insert())
    ! because I had to hardcode the sequences in my .screenrc (because there 
are no
    ! termcap codes for shifted PgUp and PgDn).
    XTerm.vt100.translations: #override \n\
        Shift <Key>Prior:string(0x1b) string("[5;2~") \n\
        Shift <Key>Next:string(0x1b) string("[6;2~")

and my .screenrc contains:

    # Make shift-PgUp and shift-PgDn work like they do in xterm.  (Note that 
this
    # requires xterm to be configured to pass those keys through, and not try to
    # act on them itself.)
    bindkey "^[[5;2~" eval "copy" "stuff ^u"
    bindkey -m "^[[5;2~" stuff ^u
    bindkey -m "^[[6;2~" stuff ^d



reply via email to

[Prev in Thread] Current Thread [Next in Thread]