Red Hat Bugzilla – Bug 63417
rxvt emits wrong esc-sequences for F1-F4, home & end
Last modified: 2007-03-26 23:52:48 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
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 :)
mc workx for me with:
Home ESC [ 7 ~
End ESC [ 8 ~
F1 ESC [ 11 ~
F2 ESC [ 12 ~
F3 ESC [ 13 ~
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.
BTW, don't bother trying this with konsole, its broken in the new kde too. I'll
enter a seperate bug.
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.
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:
A TERMINAL SHOULD SEND THE KEY (ESC) SEQUENCES THAT TERMCAP/TERMINFO SAY IT WILL
SEND FOR A CERTAIN KEY.
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
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.
Created attachment 78905 [details]
Xresources file which fixes the "problem"
> Still not fixed in 8.0.
The rxvt package is no longer available in Red Hat Linux 8.0.
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.