Bug 16 - home/end/backspace/del key under xterm/rxvt
home/end/backspace/del key under xterm/rxvt
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: distribution (Show other bugs)
5.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Preston Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1998-11-09 16:08 EST by richb
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-03-25 14:40:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description richb 1998-11-09 16:08:25 EST
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 16:23:59 EST
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 08:21:59 EST
1. According to the current xterm maintainer, Thomas E. Dickey
(dickey@clark.net), 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 16:28:59 EST
I'm working on this.
Comment 4 Preston Brown 1999-03-25 14:40:59 EST
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.