bug-ncurses
[Top][All Lists]
Advanced

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

Re: bug in xterm definition in terminfo.src


From: Thomas Dickey
Subject: Re: bug in xterm definition in terminfo.src
Date: Sun, 3 Nov 2002 20:58:28 -0500
User-agent: Mutt/1.3.27i

On Mon, Nov 04, 2002 at 01:26:01AM +0100, Leonard den Ottolander wrote:
Content-Description: Mail message body
> Hi,
> 
>  I noticed there is an error in the xterm definition in terminfo.src provided 
> with ncurses. It seems keys kb2 (KEY_B2) and ka3 (KEY_A3) are swapped. You 
> can 
> test this behaviour by compiling (gcc -Wall -D_GNU_SOURCE -lncurses keys.c -o 
> keys) and running the attached test program. Disable numlock and press shift-
> keypad-9 and -5. When setting TERM=vt320 instead of TERM=xterm the keys 
> translate fine.
>  This is a Red Hat Linux 7.3 system with ncurses(-devel)-5.2-26. Since this 
> terminfo file is somewhat outdated I downloaded the latest from 
> http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.3.tar.gz . (The version provided 
> on http://tuxedo.org/~esr/terminfo/termtypes.master.gz is outdated.) The 
> quoted parts are the same for both files.
> 
> #     Version 10.2.1
> #     $Date: 2000/09/24 02:29:16 $
> #     terminfo syntax
> 
> and
> 
> #     Version 10.2.1
> #     $Date: 2002/10/05 18:40:53 $
> #     terminfo syntax
> 
> vt320|vt300|dec vt320 7 bit terminal,
>       ka1=\EOw, ka3=\EOy, kb2=\EOu, kbs=\177, kc1=\EOq, kc3=\EOs,
> 
> xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System),
>       ka1=\EOw, ka3=\EOu, kb2=\EOy, kbeg=\EOE, kbs=^H, kc1=\EOq,
>       kc3=\EOs, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
> 
> xterm-8bit|xterm terminal emulator 8-bit controls (X Window System),
>       ka1=\217w, ka3=\217u, kb2=\217y, kbeg=\217E, kbs=^H,
>       kc1=\217q, kc3=\217s, kcbt=\233Z, kcub1=\217D, kcud1=\217B,
> 
>  In my opinion the values for ka3 and kb2 for the xterm-xf86-v32 definition 
> should be swapped. I expect the same to be true for xterm-8bit, although this 

You appear to be correct (it's fixed in xterm-xfree86, which is current,
but overlooked in xterm-8bit).

> is not necessarily so. When setting TERM=xterm-8bit ncurses doesn't translate 
> any of these keys so I cannot check this last hypothesis.

That's done by running xterm with the terminal identification set to 200, e.g..,

        xterm -tn xterm-8bit -ti 200 -xrm "*sunKeyboard:true"


portion of vt100 keypad we're mapping

+-----------+-----------+----------+
|    7      |     8     |     9    |
+-----------+-----------+----------+
|    4      |     5     |     6    |
+-----------+-----------+----------+
|    1      |     2     |     3    |
+-----------+-----------+----------+

from man wgetch

       Keypad is arranged like this:

                         +-----+------+-------+
                         | A1  |  up  |  A3   |
                         +-----+------+-------+
                         |left |  B2  | right |
                         +-----+------+-------+
                         | C1  | down |  C3   |
                         +-----+------+-------+

vt100 keypad sends application mode (with \EO prefixing each):

+-----------+-----------+----------+
|    w      |     x     |     y    |
+-----------+-----------+----------+
|    t      |     u     |     v    |
+-----------+-----------+----------+
|    q      |     r     |     s    |
+-----------+-----------+----------+

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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