Bug#446444: Wrong key definition in rxvt-unicode terminfo file
Hi,
I'm going through the list of open bugs in ncurses.
On 2007-10-13 06:20 +0200, John E. Davis wrote:
> Package: ncurses-base
> Version: 5.5-5
>
> The rxvt-unicode terminfo file indicates that the escape sequence is
> "ESC 2 $". This can be seen using `infocmp`:
>
> # Reconstructed via infocmp from file: /lib/terminfo/r/rxvt-unicode
> rxvt-unicode|rxvt-unicode terminal (X Window System),
> am, bce, bw, ccc, eo, km, mc5i, mir, msgr, npc, xenl, xon,
> [...]
> kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kIC=\E2$, kLFT=\E[d,
> ^^^^^^^^
> However, the rxvt-unicode source code file command.C says it should
> be "\E[2$". Here is the code:
>
> void
> rxvt_term::key_press (XKeyEvent &ev)
> {
> [...]
> switch (keysym)
> {
> /* normal XTerm key bindings */
> [...]
> case XK_Insert:
> strcpy (kbuf, "\033[2~");
> break;
> [...]
>
> /*
> * these modifications only affect the static keybuffer
> * pass Shift/Control indicators for function keys ending with `~'
> *
> * eg,
> * Prior = "ESC[5~"
> * Shift+Prior = "ESC[5$"
> * Ctrl+Prior = "ESC[5^"
> * Ctrl+Shift+Prior = "ESC[5@"
> * Meta adds an Escape prefix (with META8_OPTION, if meta == <escape>).
> */
> if (kbuf[0] == C0_ESC && kbuf[1] == '[' && kbuf[len - 1] == '~')
> kbuf[len - 1] = (shft ? (ctrl ? '@' : '$') : (ctrl ? '^' : '~'));
>
> The last bit of code turns the ~ into a $.
>
> The "bug" is also in the sid version of the file. I am using etch.
Actually, the rxvt-unicode terminfo file shipped in ncurses-base has
apparently not changed since it first appeared in 2005. The logs of bug
#270287 indicate that it was taken from an example file shipped in the
rxvt-unicode package. The current rxvt-unicode package in sid contains
an updated terminfo file in the doc/etc directory that however still has
this bug, AFAICS.
Regards,
Sven
Reply to: