GNOME Bugzilla – Bug 730137
Drop (or fix) nondefault fkey modes
Last modified: 2014-05-18 08:49:43 UTC
VTE supports 5 different fkey modes (the name comes from "function keys" but keypad etc. keys are also affected): default, sun (1051), hp (1052), legacy (1060), vt220 (1061). In XTerm these are subject to configure flags, some are disabled by default, plus it also supports termcap (1050) and sco (1053).
Konsole doesn't support these (although it lets you choose from some predefined keymaps and lets you create your own one). Putty, Terminology, St, Urxvt don't seem to support these either.
The modes are enabled by the corresponding DECSET escape sequences, e.g ^[[?1051h. XTerm also lets you select the mode in the Ctrl+leftclick menu, in VTE the only way is the escape sequence.
Since addressing bug 600659, VTE's default mode pretty accurately matches XTerm. VT220 is okay-ish, Legacy is so-so, HP and Sun are quite broken.
Supporting so many modes leads to terribly complicated, hard to maintain, untested entry tables in keymap.c, sometimes up to 12 entries for a single key.
We should remove support for these modes, or fix the escape sequences. I vote for removing them, since fixing would require tons of work and would have marginal usefulness. They've been broken for a long time and nobody complained.
See bug 600659 comment 74 and onwards for a script that prints the escape sequences, as well as a dump for current xterm and vte which you can easily compare to see the plenty of differences.
Created attachment 276546 [details] [review]
Drop fkey modes
Yes, let's drop these. If anyone relies on them, we'll get a bug report and can *then* look if fixing them is worth it, but them being broken already strongly indicates nobody is actually using them.
Merged to master.