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

Bug#505297: #505297 ncurses-base: Wrong terminfo for xterm keys up, down, end, home

On Sat, 5 Dec 2009, Jörg Sommer wrote:

Hello Thomas,

Thomas Dickey hat am Fri 04. Dec, 16:34 (-0500) geschrieben:
On Fri, 4 Dec 2009, Jörg Sommer wrote:

Thomas Dickey hat am Sat 28. Nov, 13:56 (-0500) geschrieben:
For more information,


But this doesn't explain the behaviour: the termcap contains for the
keys home, end and delete these entries:

The bug report was for "terminfo", not "termcap".

I didn't know they are different things. I've thought terminfo and
termcap are different interfaces to the same data.

So, what I'm talking about is the problem, that termcap for XTerm reports
for kh and @7 different values from those XTerm sends to the application.
Why they are different?

back to the faq - the reason why it looks inconsistent is because the terminal description for xterm (and other descriptions - not all) is written to initialize the terminal's keypad in application mode, rather than leaving it in normal mode. That's for both the numeric keypad and
the cursor keys.  However (where I assume you're looking), xterm changes
the home/end keys along with the cursor keys.

ncurses (and xterm) has an entry "xterm-noapp" that leaves it in normal
mode, e.g.,

comparing xterm to xterm-noapp.
    comparing booleans.
    comparing numbers.
    comparing strings.
        kcub1: '\EOD', '\E[D'.
        kcud1: '\EOB', '\E[B'.
        kcuf1: '\EOC', '\E[C'.
        kcuu1: '\EOA', '\E[A'.
        kend: '\EOF', '\E[F'.
        khome: '\EOH', '\E[H'.
        rmcup: '\E[?1049l', NULL.
        rmkx: '\E[?1l\E>', '\E>'.
        smcup: '\E[?1049h', NULL.
        smkx: '\E[?1h\E=', '\E='.

Thomas E. Dickey

Reply to: