Date: Fri, 6 Feb 2015 04:25:25 -0500 From: Thomas Dickey <dickey@his.com> To: Matthias Apitz <guru@unixarea.de>, freebsd-questions@freebsd.org Subject: Re: key Shift+Prior not working for scroll-up in xterm but in urxvt Message-ID: <20150206092525.GA3070@aerie.jexium-island.net> In-Reply-To: <20150206081525.GA1828@c720-r276659> References: <20150206081525.GA1828@c720-r276659>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Fri, Feb 06, 2015 at 09:15:25AM +0100, Matthias Apitz wrote:
>
> Hello,
>
> This question is within -HEAD and ports as well from -HEAD:
>
> $ pkg info | egrep 'xorg-7|xterm|rxvt'
> rxvt-unicode-9.20 Clone of the terminal emulator rxvt modified to support Unicode
> xorg-7.7_1 X.Org complete distribution metaport
> xterm-312 Terminal emulator for the X Window System
>
> I run this 11C on a small netbook (Acer C720) which does not have physical
> keys for PG_UP/DOWN; that's why I use xmodmap to define
>
> Mode_switch + UP --> Prior
> Mdee_switch + Down --> Next
>
> xmodmap -e "keycode 98 = Up Up Prior"
> xmodmap -e "keycode 104 = Down Down Next"
>
> When I now do in the terminal urxvt holding down both Mode_switch and
> Shift, it scrolls fine with the Up and Down keys as expected: the
> terminal window is scrolled up and down.
>
> When I do the same, the key is delivered to the xterm itself and I can
> see them, for example, with 'od -c' as:
>
> $ od -c
> ^[[5;2~^[[5;2~
> ^[[6;2~^[[6;2~
> 0000000 033 [ 5 ; 2 ~ 033 [ 5 ; 2 ~ \n 033 [ 6
> 0000020 ; 2 ~ 033 [ 6 ; 2 ~ \n
> 0000032
>
> The 033 [ 5 ; 2 ~ for Up and the 033 [ 6 ; 2 ~ for down.
>
> Why this does not work in xterm?
That depends on what you want it to do (you did not say).
xterm differs from urxvt in this area, as noted in their respective manpages.
It uses the X Toolkit to translate keycodes with their modifiers into key
symbols. In the manpage, it shows this in the default translations resource
(which is likely relevant):
Shift <KeyPress> Prior:scroll-back(1,halfpage) \n\
Shift <KeyPress> Next:scroll-forw(1,halfpage) \n\
Small keyboards such as used on laptops may eliminate or recombine keys
in ways that make it awkward to type shift-pageup. You can (almost)
always work around those by configuring a customized translations
resource in your X settings. (rxvt/urxvt also has a way to work around
these problems, but is far less generalized).
--
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAlTUiIUACgkQcCNT4Pfkjtu/2gCbBvy+bpiew0+5dFN1Y4Jx+ZDl
WSoAn0WOTR4QCdBt5VBcfrQnXWK2pEaL
=DLma
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150206092525.GA3070>
