Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 63417 - rxvt emits wrong esc-sequences for F1-F4, home & end
rxvt emits wrong esc-sequences for F1-F4, home & end
Product: Red Hat Public Beta
Classification: Retired
Component: rxvt (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Harald Hoyer
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-04-13 10:31 EDT by Hans de Goede
Modified: 2007-03-26 23:52 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-10-05 11:34:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Xresources file which fixes the "problem" (157 bytes, text/plain)
2002-10-05 11:13 EDT, Hans de Goede
no flags Details

  None (edit)
Description Hans de Goede 2002-04-13 10:31:22 EDT
Description of Problem:
rxvt emits the wrong esc seqeunces for F1-F4 (vt220 esc-sequences instead of
vt100-keypad esc-sequences), and for home and end. This breaks for example mc.

Key    Emitted sequence    Espected sequence
Home   ESC [ 7 ~           ESC [ 1 ~
End    ESC [ 8 ~           ESC [ 4 ~
F1     ESC [ 11 ~          ESC [ O P
F2     ESC [ 12 ~          ESC [ O Q
F3     ESC [ 13 ~          ESC [ O R
F4     ESC [ 14 ~          ESC [ O S

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1. start rxvt with a bash commandline
2. press CTRL=V
3. press a key, you get to see the ESC-sequence
4. do the same in xterm or gnome or kde terminal for the right sequences

Actual Results:
wrong esc-sequence

Expected Results:
right esc-sequence

Additional Information:
This is an old bug, with a known fix, but I can't find it probably because its
in bugzilla under the RH closed beta, I used to be a beta team member. And now
I'm not, so I can't see my own bugs, what irony :)
Comment 1 Harald Hoyer 2002-04-13 10:36:29 EDT
mc workx for me with: 
Emitted sequence: 
Home ESC [ 7 ~ 
End  ESC [ 8 ~ 
F1   ESC [ 11 ~ 
F2   ESC [ 12 ~ 
F3   ESC [ 13 ~ 
Comment 2 Hans de Goede 2002-04-14 08:08:37 EDT
You're rigth mc happens to work. I thought it wouldn't, I didn't actually try :)
But the esc-sequences are still wrong!
Try: "tput khome > log" on a commandline, running from xterm / rxvt. They'll
both put ESC [ 1 ~ in the logfile. Because thats what terminfo says it should be.

End for example is broken in joe. This is not about a specific application, this
is about the basics of terminals, what terminfo says and what the terminal emits
should be identical! That's the whole idea behind unix terminals.
Comment 3 Hans de Goede 2002-04-14 08:11:09 EDT
BTW, don't bother trying this with konsole, its broken in the new kde too. I'll
enter a seperate bug.
Comment 4 Hans de Goede 2002-05-06 01:32:36 EDT
Is anything going to actually happen with this bug, if this becames the new
default behaviour a lott of apps will break in one of the major terminals
shipped with RH, and RH travels back to the 5.x days on this aspect of usability.
Comment 5 Hans de Goede 2002-10-05 10:38:10 EDT
Still not fixed in 8.0. Bad, in the 7.0 / 7.1 times I and a few people at RedHat
spent a lott of time getting this right, and now the setup is broken again.

Lett me scream this:


gnome-terminal gets it right, xterm gets it right, rxvt & konsole are broken.
<sarcastic> Hmm not a bad score 2/4 ? </sarcastic>

Please fix this, not working keys like home and end are a MAJOR usabelity issue.
You've know idea hoe many of my linux using friends and students complain about
Comment 6 Hans de Goede 2002-10-05 11:12:28 EDT
I've been fiddling some more and I know understand why mc works. Rxvt used to
report itself as xterm ($TERM was set to xterm) now this is rxvt. So the rxvt
behaviour matches with termcap/info.

The last question I have is if it is wishfull for rxvt to report itself this way
since not all unix systems have an rxvt entry in their termcap. And this means
one more termcap/terminfo entry which needs very strict keeping up to date,
since it is actually used).

I'll leave this to you guys to decide.

I'll also attach a file which can be placed in /usr/X11R6/lib/X11/app-defaults
and which makes rxvt call itself xterm, and send the proper esc-sequences.

If you decide to go this way, don't forget to uppdate the international
app-default files for ja, chinese, etc.
Comment 7 Hans de Goede 2002-10-05 11:13:15 EDT
Created attachment 78905 [details]
Xresources file which fixes the "problem"
Comment 8 Michael Schwendt 2002-10-05 11:34:11 EDT
> Still not fixed in 8.0.

The rxvt package is no longer available in Red Hat Linux 8.0.
Comment 9 Hans de Goede 2002-10-05 16:54:41 EDT
In that case this bug might as well be closed, esp since is turns out not be a
bug since the termtype has changed too, and fot the rxvt termtype the current
behaviour is correct. I'll see if I've got the rights to close it.

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