Bug 16 - home/end/backspace/del key under xterm/rxvt
Summary: home/end/backspace/del key under xterm/rxvt
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: distribution
Version: 5.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Preston Brown
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1998-11-09 21:08 UTC by richb
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 1999-03-25 19:40:28 UTC
Embargoed:


Attachments (Terms of Use)

Description richb 1998-11-09 21:08:25 UTC
I'm writing to try and address the issue of the
home/end/del/backspace keys in xterm and rxvt. Out of the
box these keys don't work correctly with RedHat Linux. It
turns out the issues are quite involved:

Here's a summary of my findings:

1/ The 'nxterm' shipped with RedHat seems to be a branch of
an old version of xterm that contains a bug wrt to the
home/end keys.

2/ The 'xterm' termcap/terminfo entries for home/end do not
match the actual codes generated by xterm.

3/ The 'xterm' termcap/terminfo entries for del/bs do not
match the actual codes generated by rxvt.

4/ The termcap/terminfo entries for 'xterm' contain
non-standard codes, which I believe is undesirable.

5/ Given that xterm and rxvt generate different codes for
these keys, it's necessary to either: a) use
app-default/Xterm or app-defaults/Rxvt to map one program's
keys onto the other, or b) Get rxvt to set TERM=rxvt rather
than TERM=xterm.

I believe that finding the best solution requires some
discussion. Could someone from RedHat please contact me so
I can offer my proposal.

Hoping you are listening...

Richard Browne.

Comment 1 Cristian Gafton 1998-12-03 21:23:59 UTC
1. what is the nature of the bug in nxterm ?

2. is there a patch available ?

3. is there a patch available ?

4. Which codes are non standard ?

5. 'rxvt' is not a "common" terminal name and it will interract badly
when Linux is used in in a mixed environment, with other unices
around. I'd rather make rxvt match the xterm keys, altough I am not
sure how many apps that already know about rxvt will be broken by
this...

Comment 2 richb 1998-12-08 13:21:59 UTC
1. According to the current xterm maintainer, Thomas E. Dickey
(dickey), older versions of xterm had an array indexing bug.
The home/end keys generated garbage. nxterm seems to be a fork of an
old xterm and therefore has this bug. In the case of the nxterm
binaries shipped with RedHat 5.1, home generates \E[^@ and end
generates \E[e.

Nobody has been able to tell me exactly what nxterm does. I suspect it
may be obsolete. Certainly color_xterm (another variant, possibly
related to nxterm) is obsolete since xterm itself has had color
capabilities for some time.

2. This bug was fixed in xterm for the XFree86 distribution in 1996.
The values xterm generates for home/end are \EOH and \EOF.

My proposal is this:

1. Accept that the 'correct' codes for home/end/backspace/del are
those generated by xterm: \EOH, \EOF, ^H, and \E[3~.

2. Anything that claims to be xterm compatible should generate the
same codes as xterm. I can't understand the rationale for rxvt setting
TERM=xterm and then generating different keycodes, it's crazy.

3. Reset the xterm termcap/terminfo entries to the 'correct' values.
The values being obtained from the XFree86 distribution, or from the
master terminfo sources currently maintained by Eric S Raymond.

4. Consider scrapping nxterm and color_xterm. What do they do? If they
must be kept, try app-defaults/NXTerm to get correct values. I'm
unsure if the array indexing bug can be worked around like this, I
haven't tried it.

5. Either:

a) Make rxvt set TERM=rxvt, then it can generate whatever codes it
likes, or

b) Use app-defaults/Rxvt to get it to generate xterm compatible codes.

I know many people prefer the TERM=rxvt solution, but I'm not sure I
want to comment. Either solution would work for me.

7. Finally, lose the default mapping that makes PgUp/PgDn scroll the
xterm window. It's a pain in the bum when using full screen apps such
as Midnight Commander. I have observed that this is particularly
confusing for new users.

If you would like me to do any further research I'd be happy to do so.

Comment 3 Preston Brown 1999-03-24 21:28:59 UTC
I'm working on this.

Comment 4 Preston Brown 1999-03-25 19:40:59 UTC
fixed in ncurses-4.2-17 and later.


Note You need to log in before you can comment on or make changes to this bug.