Comment 20 for bug 355883

Revision history for this message
Thomas Dickey (dickey-his) wrote :

Near the end of this section, there's a table showing the codes sent by xterm for different modifiers:

http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#PC-Style Function Keys
Back to the original report -

A "3" is sent for an "alt" key, a "5" for a control key.
That's not changed in upstream xterm, isn't likely to.
But the report says a "3" is sent with a control key.

However, gnome-terminal has changed several times.
None of this is documented except in bug reports.

For instance, at one point gnome-terminal set its keys based on a termcap entry.
That didn't work well since the termcap entry lacked information on the control/cursor-keys.
As I recall, they "fixed" the problem by hardcoding in some behavior.
But in doing so, they neglected to bother to make it compatible.

The (unresolved) problems with gnome-terminal are technically solvable.
For instance, xterm has an option (-kt tcap) which tells it to read the "termcap".
But if it is linked with ncurses, it reads the extended information that describes these keys.
(If the terminfo doesn't describe the key, xterm's free to use its builtin behavior of course).