[vte] keymap: Drop fkey modes



commit 7383a5d9c23656f70f132a2f4b296fbed3e4c53d
Author: Egmont Koblinger <egmont gmail com>
Date:   Sun May 18 10:37:59 2014 +0200

    keymap: Drop fkey modes
    
    Drop broken fkey modes.
    
    For merge simpliciy, and since the terminfo code is going away soon,
    just switch the terminfo lookup to using termcap compat caps instead of
    terminfo caps.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730137

 src/dumpkeys.c    |   59 +----
 src/keymap.c      |  856 ++++++++++++++++++-----------------------------------
 src/keymap.h      |    8 -
 src/vte-private.h |    6 -
 src/vte.c         |   18 +-
 src/vteseq.c      |   40 ---
 6 files changed, 291 insertions(+), 696 deletions(-)
---
diff --git a/src/dumpkeys.c b/src/dumpkeys.c
index 07b57c6..6868931 100644
--- a/src/dumpkeys.c
+++ b/src/dumpkeys.c
@@ -43,17 +43,11 @@
 #define MODE_APPLICATION_KEYPAD                ESC "="
 #define MODE_NORMAL_KEYPAD             ESC ">"
 #define MODE_APPLICATION_CURSOR_KEYS   1
-#define MODE_SUN_FUNCTION_KEYS         1051
-#define MODE_HP_FUNCTION_KEYS          1052
-#define MODE_XTERM_FUNCTION_KEYS       1060
-#define MODE_VT220_FUNCTION_KEYS       1061
 #define MODE_ALTERNATE_SCREEN          1047
 
 enum {
        normal = 0, application = 1
 } keypad_mode = normal, cursor_mode = normal;
-gboolean sun_fkeys = FALSE, hp_fkeys = FALSE,
-        xterm_fkeys = FALSE, vt220_fkeys = FALSE;
 struct termios original;
 
 /* Output the DEC private mode set sequence. */
@@ -96,30 +90,6 @@ print_help(void)
        } else {
                g_print("NORMAL\r\n");
        }
-       g_print(ESC "[K" "C - SUN    ");
-       if (sun_fkeys) {
-               g_print("TRUE\r\n");
-       } else {
-               g_print("FALSE\r\n");
-       }
-       g_print(ESC "[K" "D - HP     ");
-       if (hp_fkeys) {
-               g_print("TRUE\r\n");
-       } else {
-               g_print("FALSE\r\n");
-       }
-       g_print(ESC "[K" "E - XTERM  ");
-       if (xterm_fkeys) {
-               g_print("TRUE\r\n");
-       } else {
-               g_print("FALSE\r\n");
-       }
-       g_print(ESC "[K" "F - VT220  ");
-       if (vt220_fkeys) {
-               g_print("TRUE\r\n");
-       } else {
-               g_print("FALSE\r\n");
-       }
        g_print(ESC "[K" "R - RESET\r\n");
        g_print(ESC "[K" "Q - QUIT\r\n");
 }
@@ -137,8 +107,8 @@ reset_scrolling_region(void)
 static void
 set_scrolling_region(void)
 {
-       g_print(ESC "[10;24r");
-       g_print(ESC "[9;1H");
+       g_print(ESC "[6;24r");
+       g_print(ESC "[5;1H");
 }
 
 /* Save the current location of the cursor in the terminal's memory. */
@@ -161,10 +131,6 @@ reset(void)
 {
        g_print(MODE_NORMAL_KEYPAD);
        decset(MODE_APPLICATION_CURSOR_KEYS, FALSE);
-       decset(MODE_SUN_FUNCTION_KEYS, FALSE);
-       decset(MODE_HP_FUNCTION_KEYS, FALSE);
-       decset(MODE_XTERM_FUNCTION_KEYS, FALSE);
-       decset(MODE_VT220_FUNCTION_KEYS, FALSE);
        reset_scrolling_region();
        restore_cursor();
 }
@@ -250,30 +216,9 @@ main(int argc, char **argv)
                        decset(MODE_APPLICATION_CURSOR_KEYS,
                               cursor_mode == application);
                        break;
-               case 'C':
-               case 'c':
-                       sun_fkeys = !sun_fkeys;
-                       decset(MODE_SUN_FUNCTION_KEYS, sun_fkeys);
-                       break;
-               case 'D':
-               case 'd':
-                       hp_fkeys = !hp_fkeys;
-                       decset(MODE_HP_FUNCTION_KEYS, hp_fkeys);
-                       break;
-               case 'E':
-               case 'e':
-                       xterm_fkeys = !xterm_fkeys;
-                       decset(MODE_XTERM_FUNCTION_KEYS, xterm_fkeys);
-                       break;
-               case 'F':
-               case 'f':
-                       vt220_fkeys = !vt220_fkeys;
-                       decset(MODE_VT220_FUNCTION_KEYS, vt220_fkeys);
-                       break;
                case 'R':
                case 'r':
                        keypad_mode = cursor_mode = normal;
-                       sun_fkeys = hp_fkeys = xterm_fkeys = vt220_fkeys = FALSE;
                        reset();
                        break;
                case 'Q':
diff --git a/src/keymap.c b/src/keymap.c
index f7cfe33..1089c7a 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -31,11 +31,7 @@
 #ifdef VTE_DEBUG
 static void
 _vte_keysym_print(guint keyval,
-               GdkModifierType modifiers,
-               gboolean sun_mode,
-               gboolean hp_mode,
-               gboolean legacy_mode,
-               gboolean vt220_mode)
+               GdkModifierType modifiers)
 {
        g_printerr("Mapping ");
        if (modifiers & GDK_CONTROL_MASK) {
@@ -51,48 +47,11 @@ _vte_keysym_print(guint keyval,
                g_printerr("Shift+");
        }
        g_printerr("%s" , gdk_keyval_name(keyval));
-       if (sun_mode|hp_mode|legacy_mode|vt220_mode) {
-               gboolean first = TRUE;
-               g_printerr("(");
-               if (sun_mode) {
-                       if (!first) {
-                               g_printerr(",");
-                       }
-                       first = FALSE;
-                       g_printerr("Sun");
-               }
-               if (hp_mode) {
-                       if (!first) {
-                               g_printerr(",");
-                       }
-                       first = FALSE;
-                       g_printerr("HP");
-               }
-               if (legacy_mode) {
-                       if (!first) {
-                               g_printerr(",");
-                       }
-                       first = FALSE;
-                       g_printerr("Legacy");
-               }
-               if (vt220_mode) {
-                       if (!first) {
-                               g_printerr(",");
-                       }
-                       first = FALSE;
-                       g_printerr("VT220");
-               }
-               g_printerr(")");
-       }
 }
 #else
 static void
 _vte_keysym_print(guint keyval,
-               GdkModifierType modifiers,
-               gboolean sun_mode,
-               gboolean hp_mode,
-               gboolean legacy_mode,
-               gboolean vt220_mode)
+               GdkModifierType modifiers)
 {
 }
 #endif
@@ -107,28 +66,12 @@ enum _vte_keypad_mode {
        keypad_app =            1 << 1
 };
 
-enum _vte_fkey_mode {
-       fkey_default =  1 << 0,
-       fkey_sun =      1 << 1,
-       fkey_hp =       1 << 2,
-       fkey_legacy =   1 << 3,
-       fkey_vt220 =    1 << 4
-};
-
 #define cursor_all     (cursor_default | cursor_app)
 #define keypad_all     (keypad_default | keypad_app)
-#define fkey_all       (fkey_default | fkey_sun | fkey_hp | fkey_legacy | fkey_vt220)
-#define fkey_notvt220  (fkey_default | fkey_sun | fkey_hp | fkey_legacy)
-#define fkey_notsun    (fkey_default | fkey_hp | fkey_legacy | fkey_vt220)
-#define fkey_nothp     (fkey_default | fkey_sun | fkey_legacy | fkey_vt220)
-#define fkey_notsunvt  (fkey_default | fkey_hp | fkey_legacy)
-#define fkey_notsunhp  (fkey_default | fkey_legacy | fkey_vt220)
-#define fkey_nothpvt   (fkey_default | fkey_sun | fkey_legacy)
 
 struct _vte_keymap_entry {
        enum _vte_cursor_mode cursor_mode;
        enum _vte_keypad_mode keypad_mode;
-       enum _vte_fkey_mode fkey_mode;
        GdkModifierType mod_mask;
        const char normal[8];
        gssize normal_length;
@@ -143,738 +86,576 @@ enum _vte_modifier_encoding_method {
        MODIFIER_ENCODING_LONG,
 };
 
-/* Normal keys unaffected by modes. */
 static const struct _vte_keymap_entry _vte_keymap_GDK_space[] = {
        /* Control+Meta+space = ESC+NUL */
-       {cursor_all, keypad_all, fkey_all,
-        GDK_CONTROL_MASK | VTE_META_MASK, _VTE_CAP_ESC "\0", 2, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK | VTE_META_MASK, _VTE_CAP_ESC "\0", 2, X_NULL},
        /* Meta+space = ESC+" " */
-       {cursor_all, keypad_all, fkey_all,
-        VTE_META_MASK, _VTE_CAP_ESC " ", 2, X_NULL},
+       {cursor_all, keypad_all, VTE_META_MASK, _VTE_CAP_ESC " ", 2, X_NULL},
        /* Control+space = NUL */
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\0", 1, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\0", 1, X_NULL},
        /* Regular space. */
-       {cursor_all, keypad_all, fkey_all, 0, " ", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, " ", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_Tab[] = {
        /* Shift+Tab = Back-Tab */
-       {cursor_all, keypad_all, fkey_all,
-        GDK_SHIFT_MASK, X_NULL, 0, VTE_TERMINFO_CAP_KEY_BTAB},
-       {cursor_all, keypad_all, fkey_all,
-        GDK_SHIFT_MASK, _VTE_CAP_CSI "Z", -1, X_NULL},
+       {cursor_all, keypad_all, GDK_SHIFT_MASK, X_NULL, 0, "kB"},
+       {cursor_all, keypad_all, GDK_SHIFT_MASK, _VTE_CAP_CSI "Z", -1, X_NULL},
        /* Alt+Tab = Esc+Tab */
-       {cursor_all, keypad_all, fkey_all,
-        VTE_META_MASK, _VTE_CAP_ESC "\t", -1, X_NULL},
+       {cursor_all, keypad_all, VTE_META_MASK, _VTE_CAP_ESC "\t", -1, X_NULL},
        /* Regular tab. */
-       {cursor_all, keypad_all, fkey_all,
-        0, X_NULL, 0, VTE_TERMINFO_CAP_TAB /* not a KEY_ cap ‽ */},
-       {cursor_all, keypad_all, fkey_all, 0, "\t", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "ta"},
+       {cursor_all, keypad_all, 0, "\t", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_Return[] = {
-       {cursor_all, keypad_all, fkey_all,
-        VTE_META_MASK, _VTE_CAP_ESC "\n", 2, X_NULL},
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\n", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, "\r", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, VTE_META_MASK, _VTE_CAP_ESC "\n", 2, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\n", 1, X_NULL},
+       {cursor_all, keypad_all, 0, "\r", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_Escape[] = {
-       {cursor_all, keypad_all, fkey_all,
-        VTE_META_MASK, _VTE_CAP_ESC _VTE_CAP_ESC, 2, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, _VTE_CAP_ESC, 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, VTE_META_MASK, _VTE_CAP_ESC _VTE_CAP_ESC, 2, X_NULL},
+       {cursor_all, keypad_all, 0, _VTE_CAP_ESC, 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_Insert[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_IC},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "Q", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "2z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_notsunhp, 0, _VTE_CAP_CSI "2~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "kI"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "2~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_ISO_Left_Tab[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_BTAB},
-       {cursor_all, keypad_all, fkey_all, 0, _VTE_CAP_CSI "Z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "kB"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "Z", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_slash[] = {
-       {cursor_all, keypad_all, fkey_all,
-        VTE_META_MASK, _VTE_CAP_ESC "/", 2, X_NULL},
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\037", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, "/", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, VTE_META_MASK, _VTE_CAP_ESC "/", 2, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\037", 1, X_NULL},
+       {cursor_all, keypad_all, 0, "/", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_question[] = {
-       {cursor_all, keypad_all, fkey_all,
-        VTE_META_MASK, _VTE_CAP_ESC "?", 2, X_NULL},
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\177", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, "?", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, VTE_META_MASK, _VTE_CAP_ESC "?", 2, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\177", 1, X_NULL},
+       {cursor_all, keypad_all, 0, "?", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 /* Various numeric keys enter control characters. */
 static const struct _vte_keymap_entry _vte_keymap_GDK_2[] = {
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\0", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\0", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 static const struct _vte_keymap_entry _vte_keymap_GDK_3[] = {
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\033", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\033", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 static const struct _vte_keymap_entry _vte_keymap_GDK_4[] = {
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\034", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\034", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 static const struct _vte_keymap_entry _vte_keymap_GDK_5[] = {
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\035", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\035", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 static const struct _vte_keymap_entry _vte_keymap_GDK_6[] = {
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\036", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\036", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 static const struct _vte_keymap_entry _vte_keymap_GDK_7[] = {
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\037", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\037", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 static const struct _vte_keymap_entry _vte_keymap_GDK_8[] = {
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\177", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\177", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 static const struct _vte_keymap_entry _vte_keymap_GDK_Minus[] = {
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\037", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\037", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 /* Home and End are strange cases because their sequences vary wildly from
  * system to system, or mine's just broken.  But anyway. */
 static const struct _vte_keymap_entry _vte_keymap_GDK_Home[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_HOME},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_CSI "1~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "h", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_nothpvt, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_HOME},
-       {cursor_default, keypad_all, fkey_default, 0, _VTE_CAP_CSI "H", -1, X_NULL},
-       {cursor_app, keypad_all, fkey_default, 0, _VTE_CAP_SS3 "H", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "kh"},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "H", -1, X_NULL},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "H", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_End[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_END},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_CSI "4~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_END},
-       {cursor_default, keypad_all, fkey_default, 0, _VTE_CAP_CSI "F", -1, X_NULL},
-       {cursor_app, keypad_all, fkey_default, 0, _VTE_CAP_SS3 "F", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "@7"},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "F", -1, X_NULL},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "F", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_Page_Up[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_PPAGE},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "T", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_notsunhp, 0, _VTE_CAP_CSI "5~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "5z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "kP"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "5~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_Page_Down[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_NPAGE},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "S", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_notsunhp, 0, _VTE_CAP_CSI "6~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "6z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "kN"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "6~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 /* Keys affected by the cursor key mode. */
 static const struct _vte_keymap_entry _vte_keymap_GDK_Up[] = {
-       {cursor_default, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_UP},
-       {cursor_default, keypad_all, fkey_nothp, 0, _VTE_CAP_CSI "A", -1, X_NULL},
-       {cursor_default, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "A", -1, X_NULL},
-       {cursor_app, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "A", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_default, keypad_all, 0, X_NULL, 0, "ku"},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "A", -1, X_NULL},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "A", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_Down[] = {
-       {cursor_default, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_DOWN},
-       {cursor_default, keypad_all, fkey_nothp, 0, _VTE_CAP_CSI "B", -1, X_NULL},
-       {cursor_default, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "B", -1, X_NULL},
-       {cursor_app, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "B", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_default, keypad_all, 0, X_NULL, 0, "kd"},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "B", -1, X_NULL},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "B", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_Right[] = {
-       {cursor_default, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_RIGHT},
-       {cursor_default, keypad_all, fkey_nothp, 0, _VTE_CAP_CSI "C", -1, X_NULL},
-       {cursor_default, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "C", -1, X_NULL},
-       {cursor_app, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "C", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_default, keypad_all, 0, X_NULL, 0, "kr"},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "C", -1, X_NULL},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "C", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_Left[] = {
-       {cursor_default, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_LEFT},
-       {cursor_default, keypad_all, fkey_nothp, 0, _VTE_CAP_CSI "D", -1, X_NULL},
-       {cursor_default, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "D", -1, X_NULL},
-       {cursor_app, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "D", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_default, keypad_all, 0, X_NULL, 0, "kl"},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "D", -1, X_NULL},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "D", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 /* Keys (potentially) affected by the keypad key mode. */
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Space[] = {
-       {cursor_all, keypad_default, fkey_all, 0, " ", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_all, 0, _VTE_CAP_SS3 " ", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, " ", 1, X_NULL},
+       {cursor_all, keypad_app, 0, _VTE_CAP_SS3 " ", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Tab[] = {
-       {cursor_all, keypad_default, fkey_all, 0, "\t", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_all, 0, _VTE_CAP_SS3 "I", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, "\t", 1, X_NULL},
+       {cursor_all, keypad_app, 0, _VTE_CAP_SS3 "I", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Enter[] = {
-       {cursor_all, keypad_default, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_ENTER},
-       {cursor_all, keypad_app, fkey_all, VTE_NUMLOCK_MASK | GDK_CONTROL_MASK, "\n", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_all, VTE_NUMLOCK_MASK, "\r", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_all, 0, _VTE_CAP_SS3 "M", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\n", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, "\r", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, X_NULL, 0, "@8"},
+       {cursor_all, keypad_app, VTE_NUMLOCK_MASK | GDK_CONTROL_MASK, "\n", 1, X_NULL},
+       {cursor_all, keypad_app, VTE_NUMLOCK_MASK, "\r", 1, X_NULL},
+       {cursor_all, keypad_app, 0, _VTE_CAP_SS3 "M", -1, X_NULL},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, "\n", 1, X_NULL},
+       {cursor_all, keypad_all, 0, "\r", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_F1[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F1},
-       {cursor_all, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "P", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k1"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_SS3 "P", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_F2[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F2},
-       {cursor_all, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "Q", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k2"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_SS3 "Q", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_F3[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F3},
-       {cursor_all, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "R", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k3"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_SS3 "R", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_F4[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F4},
-       {cursor_all, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "S", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k4"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_SS3 "S", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Multiply[] = {
-       {cursor_all, keypad_default, fkey_all, 0, "*", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_all, VTE_NUMLOCK_MASK, "*", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_all, 0, _VTE_CAP_SS3 "j", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, "*", 1, X_NULL},
+       {cursor_all, keypad_app, VTE_NUMLOCK_MASK, "*", 1, X_NULL},
+       {cursor_all, keypad_app, 0, _VTE_CAP_SS3 "j", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Add[] = {
-       {cursor_all, keypad_default, fkey_notvt220, 0, "+", 1, X_NULL},
-       {cursor_all, keypad_default, fkey_vt220, 0, ",", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_notvt220, VTE_NUMLOCK_MASK, "+", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_vt220, VTE_NUMLOCK_MASK, ",", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_notvt220, 0, _VTE_CAP_SS3 "k", -1, X_NULL},
-       {cursor_all, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "l", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, "+", 1, X_NULL},
+       {cursor_all, keypad_app, VTE_NUMLOCK_MASK, "+", 1, X_NULL},
+       {cursor_all, keypad_app, 0, _VTE_CAP_SS3 "k", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Separator[] = {
-       {cursor_all, keypad_default, fkey_all, 0, ",", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_all, 0, _VTE_CAP_SS3 "l", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, ",", 1, X_NULL},
+       {cursor_all, keypad_app, 0, _VTE_CAP_SS3 "l", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Subtract[] = {
-       {cursor_all, keypad_default, fkey_all, 0, "-", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_all, VTE_NUMLOCK_MASK, "-", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_all, 0, _VTE_CAP_SS3 "m", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, "-", 1, X_NULL},
+       {cursor_all, keypad_app, VTE_NUMLOCK_MASK, "-", 1, X_NULL},
+       {cursor_all, keypad_app, 0, _VTE_CAP_SS3 "m", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Decimal_Delete[] = {
-       {cursor_all, keypad_default, fkey_default, 0, ".", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_notsun, 0, _VTE_CAP_SS3 "3~", -1, X_NULL},
-       {cursor_all, keypad_app, fkey_sun, 0, _VTE_CAP_SS3 "3~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, ".", 1, X_NULL},
+       {cursor_all, keypad_app, 0, _VTE_CAP_SS3 "3~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Divide[] = {
-       {cursor_all, keypad_default, fkey_all, 0, "/", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_all, VTE_NUMLOCK_MASK, "/", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_all, 0, _VTE_CAP_SS3 "o", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, "/", 1, X_NULL},
+       {cursor_all, keypad_app, VTE_NUMLOCK_MASK, "/", 1, X_NULL},
+       {cursor_all, keypad_app, 0, _VTE_CAP_SS3 "o", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 /* GDK already separates keypad "0" from keypad "Insert", so the only time
  * we'll see this key is when NumLock is on, and that means that we're in
  * "default" mode. */
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_0[] = {
-       {cursor_all, keypad_all, fkey_all, 0, "0", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, "0", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_1[] = {
-       {cursor_all, keypad_all, fkey_all, 0, "1", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, "1", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_2[] = {
-       {cursor_all, keypad_all, fkey_all, 0, "2", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, "2", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_3[] = {
-       {cursor_all, keypad_all, fkey_all, 0, "3", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, "3", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_4[] = {
-       {cursor_all, keypad_all, fkey_all, 0, "4", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, "4", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_5[] = {
-       {cursor_all, keypad_all, fkey_all, 0, "5", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, "5", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_6[] = {
-       {cursor_all, keypad_all, fkey_all, 0, "6", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, "6", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_7[] = {
-       {cursor_all, keypad_all, fkey_all, 0, "7", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, "7", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_8[] = {
-       {cursor_all, keypad_all, fkey_all, 0, "8", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, "8", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_9[] = {
-       {cursor_all, keypad_all, fkey_all, 0, "9", 1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, "9", 1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 /* These are the same keys as above, but without numlock.  If there's a
  * capability associated with the key, then we send that, unless we're in
  * application mode. */
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Insert[] = {
-       {cursor_all, keypad_default, fkey_notsunvt,
-        0, _VTE_CAP_CSI "2~", -1, X_NULL},
-       {cursor_all, keypad_default, fkey_sun, 0, _VTE_CAP_CSI "2z", -1, X_NULL},
-       {cursor_all, keypad_default, fkey_vt220, 0, "0", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_notvt220, 0, _VTE_CAP_CSI "2~", -1, X_NULL},
-       {cursor_all, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "p", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "2~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_End[] = {
-       {cursor_all, keypad_default, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_C1},
-       {cursor_default, keypad_default, fkey_notvt220, 0, _VTE_CAP_CSI "F", -1, X_NULL},
-       {cursor_app, keypad_default, fkey_notvt220, 0, _VTE_CAP_SS3 "F", -1, X_NULL},
-       {cursor_all, keypad_default, fkey_vt220, 0, "1", 1, X_NULL},
-       {cursor_default, keypad_app, fkey_notvt220, 0, _VTE_CAP_CSI "F", -1, X_NULL},
-       {cursor_app, keypad_app, fkey_notvt220, 0, _VTE_CAP_SS3 "F", -1, X_NULL},
-       {cursor_all, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "q", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, X_NULL, 0, "K4"},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "F", -1, X_NULL},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "F", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Down[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_DOWN},
-       {cursor_app, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "B", -1, X_NULL},
-       {cursor_default, keypad_all, fkey_notvt220,
-        0, _VTE_CAP_CSI "B", -1, X_NULL},
-       {cursor_default, keypad_default, fkey_vt220, 0, "2", 1, X_NULL},
-       {cursor_default, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "r", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "kd"},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "B", -1, X_NULL},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "B", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Page_Down[] = {
-       {cursor_all, keypad_default, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_C3},
-       {cursor_all, keypad_default, fkey_notsunvt,
-        0, _VTE_CAP_CSI "6~", -1, X_NULL},
-       {cursor_all, keypad_default, fkey_sun, 0, _VTE_CAP_CSI "6z", -1, X_NULL},
-       {cursor_all, keypad_default, fkey_vt220, 0, "3", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_notvt220, 0, _VTE_CAP_CSI "6~", -1, X_NULL},
-       {cursor_all, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "s", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, X_NULL, 0, "K5"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "6~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Left[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_LEFT},
-       {cursor_app, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "D", -1, X_NULL},
-       {cursor_default, keypad_all, fkey_notvt220,
-        0, _VTE_CAP_CSI "D", -1, X_NULL},
-       {cursor_default, keypad_default, fkey_vt220, 0, "4", 1, X_NULL},
-       {cursor_default, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "t", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "kl"},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "D", -1, X_NULL},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "D", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Begin[] = {
-       {cursor_all, keypad_default, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_B2 /* FIXMEchpe: not KEY_A1 
!? */},
-       {cursor_app, keypad_all, fkey_notvt220, 0, _VTE_CAP_SS3 "E", -1, X_NULL},
-       {cursor_default, keypad_all, fkey_notvt220, 0, _VTE_CAP_CSI "E", -1, X_NULL},
-       {cursor_all, keypad_default, fkey_vt220, 0, "5", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "u", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, X_NULL, 0, "K2"},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "E", -1, X_NULL},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "E", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Right[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_RIGHT},
-       {cursor_app, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "C", -1, X_NULL},
-       {cursor_default, keypad_all, fkey_notvt220,
-        0, _VTE_CAP_CSI "C", -1, X_NULL},
-       {cursor_default, keypad_default, fkey_vt220, 0, "6", 1, X_NULL},
-       {cursor_default, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "v", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "kr"},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "C", -1, X_NULL},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "C", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Home[] = {
-       {cursor_all, keypad_default, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_A1},
-       {cursor_default, keypad_default, fkey_notvt220, 0, _VTE_CAP_CSI "H", -1, X_NULL},
-       {cursor_app, keypad_default, fkey_notvt220, 0, _VTE_CAP_SS3 "H", -1, X_NULL},
-       {cursor_all, keypad_default, fkey_vt220, 0, "7", 1, X_NULL},
-       {cursor_default, keypad_app, fkey_notvt220, 0, _VTE_CAP_CSI "H", -1, X_NULL},
-       {cursor_app, keypad_app, fkey_notvt220, 0, _VTE_CAP_SS3 "H", -1, X_NULL},
-       {cursor_all, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "w", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, X_NULL, 0, "K1"},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "H", -1, X_NULL},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "H", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Up[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_UP},
-       {cursor_app, keypad_all, fkey_all, 0, _VTE_CAP_SS3 "A", -1, X_NULL},
-       {cursor_default, keypad_all, fkey_notvt220,
-        0, _VTE_CAP_CSI "A", -1, X_NULL},
-       {cursor_default, keypad_default, fkey_vt220, 0, "8", 1, X_NULL},
-       {cursor_default, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "x", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "ku"},
+       {cursor_app, keypad_all, 0, _VTE_CAP_SS3 "A", -1, X_NULL},
+       {cursor_default, keypad_all, 0, _VTE_CAP_CSI "A", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Page_Up[] = {
-       {cursor_all, keypad_default, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_A3},
-       {cursor_all, keypad_default, fkey_notvt220,
-        0, _VTE_CAP_CSI "5~", -1, X_NULL},
-       {cursor_all, keypad_default, fkey_vt220, 0, "9", 1, X_NULL},
-       {cursor_all, keypad_app, fkey_notvt220, 0, _VTE_CAP_CSI "5~", -1, X_NULL},
-       {cursor_all, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "y", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_default, 0, X_NULL, 0, "K3"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "5~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 
 /* Keys affected by the function key mode. */
 static const struct _vte_keymap_entry _vte_keymap_GDK_F1[] = {
-       {cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F1},
-       {cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F13},
-       {cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F1},
-       {cursor_all, keypad_all, fkey_default, GDK_CONTROL_MASK, _VTE_CAP_CSI "P", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, GDK_SHIFT_MASK, _VTE_CAP_CSI "P", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, VTE_META_MASK, _VTE_CAP_CSI "P", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_SS3 "P", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "224z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "p", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "11~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220,
-        GDK_CONTROL_MASK, _VTE_CAP_CSI "23~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_SS3 "P", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k1"},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, _VTE_CAP_CSI "P", -1, X_NULL},
+       {cursor_all, keypad_all, GDK_SHIFT_MASK, _VTE_CAP_CSI "P", -1, X_NULL},
+       {cursor_all, keypad_all, VTE_META_MASK, _VTE_CAP_CSI "P", -1, X_NULL},
+       {cursor_all, keypad_all, 0, _VTE_CAP_SS3 "P", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F2[] = {
-       {cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F2},
-       {cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F14},
-       {cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F2},
-       {cursor_all, keypad_all, fkey_default, GDK_CONTROL_MASK, _VTE_CAP_CSI "Q", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, GDK_SHIFT_MASK, _VTE_CAP_CSI "Q", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, VTE_META_MASK, _VTE_CAP_CSI "Q", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_SS3 "Q", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "225z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "q", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "12~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220,
-        GDK_CONTROL_MASK, _VTE_CAP_CSI "24~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_SS3 "Q", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k2"},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, _VTE_CAP_CSI "Q", -1, X_NULL},
+       {cursor_all, keypad_all, GDK_SHIFT_MASK, _VTE_CAP_CSI "Q", -1, X_NULL},
+       {cursor_all, keypad_all, VTE_META_MASK, _VTE_CAP_CSI "Q", -1, X_NULL},
+       {cursor_all, keypad_all, 0, _VTE_CAP_SS3 "Q", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F3[] = {
-       {cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F3},
-       {cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F15},
-       {cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F3},
-       {cursor_all, keypad_all, fkey_default, GDK_CONTROL_MASK, _VTE_CAP_CSI "R", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, GDK_SHIFT_MASK, _VTE_CAP_CSI "R", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, VTE_META_MASK, _VTE_CAP_CSI "R", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_SS3 "R", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "226z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "r", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "13~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220,
-        GDK_CONTROL_MASK, _VTE_CAP_CSI "25~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_SS3 "R", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k3"},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, _VTE_CAP_CSI "R", -1, X_NULL},
+       {cursor_all, keypad_all, GDK_SHIFT_MASK, _VTE_CAP_CSI "R", -1, X_NULL},
+       {cursor_all, keypad_all, VTE_META_MASK, _VTE_CAP_CSI "R", -1, X_NULL},
+       {cursor_all, keypad_all, 0, _VTE_CAP_SS3 "R", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F4[] = {
-       {cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F4},
-       {cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F16},
-       {cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F4},
-       {cursor_all, keypad_all, fkey_default, GDK_CONTROL_MASK, _VTE_CAP_CSI "S", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, GDK_SHIFT_MASK, _VTE_CAP_CSI "S", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, VTE_META_MASK, _VTE_CAP_CSI "S", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_SS3 "S", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "227z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "s", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "14~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220,
-        GDK_CONTROL_MASK, _VTE_CAP_CSI "26~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_SS3 "S", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k4"},
+       {cursor_all, keypad_all, GDK_CONTROL_MASK, _VTE_CAP_CSI "S", -1, X_NULL},
+       {cursor_all, keypad_all, GDK_SHIFT_MASK, _VTE_CAP_CSI "S", -1, X_NULL},
+       {cursor_all, keypad_all, VTE_META_MASK, _VTE_CAP_CSI "S", -1, X_NULL},
+       {cursor_all, keypad_all, 0, _VTE_CAP_SS3 "S", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F5[] = {
-       {cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F5},
-       {cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F17},
-       {cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F5},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_CSI "15~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "228z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "t", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "15~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220,
-        GDK_CONTROL_MASK, _VTE_CAP_CSI "28~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_CSI "15~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k5"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "15~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F6[] = {
-       {cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F6},
-       {cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F18},
-       {cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F6},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_CSI "17~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "229z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "u", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "17~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220,
-        GDK_CONTROL_MASK, _VTE_CAP_CSI "29~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_CSI "17~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k6"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "17~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F7[] = {
-       {cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F7},
-       {cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F19},
-       {cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F7},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_CSI "18~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "230z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "v", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "18~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220,
-        GDK_CONTROL_MASK, _VTE_CAP_CSI "31~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_CSI "18~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k7"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "18~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F8[] = {
-       {cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F8},
-       {cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F20},
-       {cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F8},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_CSI "19~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "231z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_ESC "w", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "19~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220,
-        GDK_CONTROL_MASK, _VTE_CAP_CSI "32~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_CSI "19~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k8"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "19~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F9[] = {
-       {cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F9},
-       {cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F21},
-       {cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F9},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_CSI "20~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "232z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_CSI "20~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "20~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220,
-        GDK_CONTROL_MASK, _VTE_CAP_CSI "33~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_CSI "20~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k9"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "20~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F10[] = {
-       {cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F10},
-       {cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F22},
-       {cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F10},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_CSI "21~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "233z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_CSI "21~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "21~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220,
-        GDK_CONTROL_MASK, _VTE_CAP_CSI "34~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_CSI "21~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "k;"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "21~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F11[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F11},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_CSI "23~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "192z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_CSI "23~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "23~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_CSI "23~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "F1"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "23~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F12[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F12},
-       {cursor_all, keypad_all, fkey_default, 0, _VTE_CAP_CSI "24~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "193z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_hp, 0, _VTE_CAP_CSI "24~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_legacy, 0, _VTE_CAP_CSI "24~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_CSI "24~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "F2"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "24~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F13[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F13},
-       {cursor_all, keypad_all, fkey_notsun, 0, _VTE_CAP_CSI "25~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "194z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "F3"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "25~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F14[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F14},
-       {cursor_all, keypad_all, fkey_notsun, 0, _VTE_CAP_CSI "26~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "195z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "F4"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "26~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F15[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F15},
-       {cursor_all, keypad_all, fkey_notsun, 0, _VTE_CAP_CSI "28~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "196z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "F5"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "28~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F16[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F16},
-       {cursor_all, keypad_all, fkey_notsun, 0, _VTE_CAP_CSI "29~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "197z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "F6"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "29~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F17[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F17},
-       {cursor_all, keypad_all, fkey_notsun, 0, _VTE_CAP_CSI "31~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "198z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "F7"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "31~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F18[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F18},
-       {cursor_all, keypad_all, fkey_notsun, 0, _VTE_CAP_CSI "32~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "199z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "F8"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "32~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F19[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F19},
-       {cursor_all, keypad_all, fkey_notsun, 0, _VTE_CAP_CSI "33~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "200z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "F9"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "33~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F20[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F20},
-       {cursor_all, keypad_all, fkey_notsun, 0, _VTE_CAP_CSI "34~", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_sun, 0, _VTE_CAP_CSI "201z", -1, X_NULL},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FA"},
+       {cursor_all, keypad_all, 0, _VTE_CAP_CSI "34~", -1, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F21[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F21},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FB"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F22[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F22},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FC"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F23[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F23},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FD"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F24[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F24},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FE"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F25[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F25},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FF"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F26[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F26},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FG"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F27[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F27},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FH"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F28[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F28},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FI"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F29[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F29},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FJ"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F30[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F30},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FK"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F31[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F31},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FL"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F32[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F32},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FM"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F33[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F33},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FN"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F34[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F34},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FO"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_F35[] = {
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, VTE_TERMINFO_CAP_KEY_F35},
-       {cursor_all, keypad_all, fkey_all, 0, X_NULL, 0, X_NULL},
+       {cursor_all, keypad_all, 0, X_NULL, 0, "FP"},
+       {cursor_all, keypad_all, 0, X_NULL, 0, X_NULL},
 };
 
 static const struct _vte_keymap_group {
@@ -986,10 +767,6 @@ static const struct _vte_keymap_group {
 void
 _vte_keymap_map(guint keyval,
                GdkModifierType modifiers,
-               gboolean sun_mode,
-               gboolean hp_mode,
-               gboolean legacy_mode,
-               gboolean vt220_mode,
                gboolean app_cursor_keys,
                gboolean app_keypad_keys,
                struct _vte_terminfo *terminfo,
@@ -1001,7 +778,6 @@ _vte_keymap_map(guint keyval,
        const struct _vte_keymap_entry *entries;
        enum _vte_cursor_mode cursor_mode;
        enum _vte_keypad_mode keypad_mode;
-       enum _vte_fkey_mode fkey_mode;
        const char *cap = NULL, *ti;
 
        g_return_if_fail(normal != NULL);
@@ -1009,11 +785,7 @@ _vte_keymap_map(guint keyval,
        g_return_if_fail(terminfo_cap != NULL);
 
        _VTE_DEBUG_IF(VTE_DEBUG_KEYBOARD) 
-               _vte_keysym_print(keyval, modifiers,
-                               sun_mode,
-                               hp_mode,
-                               legacy_mode,
-                               vt220_mode);
+               _vte_keysym_print(keyval, modifiers);
 
        /* Start from scratch. */
        *normal = NULL;
@@ -1025,7 +797,6 @@ _vte_keymap_map(guint keyval,
        for (i = 0; i < G_N_ELEMENTS(_vte_keymap); i++) {
 #ifdef VTE_DEBUG
                int j;
-               GdkModifierType mods;
                /* Check for NULL strings with non-zero length, and
                 * vice-versa. */
                entries = _vte_keymap[i].entries;
@@ -1036,30 +807,6 @@ _vte_keymap_map(guint keyval,
                                g_assert(!entries[j].normal[0]);
                        }
                }
-               /* Check for coverage. This check is not exhaustive. */
-               fkey_mode = 0;
-               mods = GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK | VTE_NUMLOCK_MASK;
-               for (j = 0; entries[j].normal_length || entries[j].cap[0]; j++) {
-                       if (entries[j].fkey_mode != fkey_all) {
-                               fkey_mode |= entries[j].fkey_mode;
-                       }
-                       mods &= entries[j].mod_mask;
-               }
-               switch (_vte_keymap[i].keyval) {
-               case GDK_KEY_2:
-               case GDK_KEY_3:
-               case GDK_KEY_4:
-               case GDK_KEY_5:
-               case GDK_KEY_6:
-               case GDK_KEY_7:
-               case GDK_KEY_8:
-                       /* Known non-full-coverage cases. */
-                       break;
-               default:
-                       /* Everything else we double-check. */
-                       g_assert((fkey_mode == 0) || (fkey_mode == fkey_all));
-                       break;
-               }
                entries = NULL;
 #endif
                if (_vte_keymap[i].keyval == keyval) {
@@ -1077,27 +824,12 @@ _vte_keymap_map(guint keyval,
        /* Build mode masks. */
        cursor_mode = app_cursor_keys ? cursor_app : cursor_default;
        keypad_mode = app_keypad_keys ? keypad_app : keypad_default;
-       if (sun_mode) {
-               fkey_mode = fkey_sun;
-       } else
-       if (hp_mode) {
-               fkey_mode = fkey_hp;
-       } else
-       if (legacy_mode) {
-               fkey_mode = fkey_legacy;
-       } else
-       if (vt220_mode) {
-               fkey_mode = fkey_vt220;
-       } else {
-               fkey_mode = fkey_default;
-       }
        modifiers &= (GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK | VTE_NUMLOCK_MASK);
 
        /* Search for the conditions. */
        for (i = 0; entries[i].normal_length || entries[i].cap[0]; i++)
        if ((entries[i].cursor_mode & cursor_mode) &&
-           (entries[i].keypad_mode & keypad_mode) &&
-           (entries[i].fkey_mode & fkey_mode))
+           (entries[i].keypad_mode & keypad_mode))
        if ((modifiers & entries[i].mod_mask) == entries[i].mod_mask) {
                if (entries[i].normal_length) {
                        if (entries[i].normal_length != -1) {
@@ -1110,10 +842,6 @@ _vte_keymap_map(guint keyval,
                        }
                        _vte_keymap_key_add_key_modifiers(keyval,
                                                          modifiers,
-                                                         sun_mode,
-                                                         hp_mode,
-                                                         legacy_mode,
-                                                         vt220_mode,
                                                          cursor_mode & cursor_app,
                                                          normal,
                                                          normal_length);
@@ -1134,7 +862,7 @@ _vte_keymap_map(guint keyval,
        }
 
         if (cap != NULL &&
-            (ti = _vte_terminfo_get_string_by_cap(terminfo, entries[i].cap, FALSE))) {
+            (ti = _vte_terminfo_get_string_by_cap(terminfo, entries[i].cap, TRUE))) {
                 *terminfo_cap = cap;
                 /* Save the special string. */
 
@@ -1302,10 +1030,6 @@ is_cursor_key(guint keyval)
 void
 _vte_keymap_key_add_key_modifiers(guint keyval,
                                  GdkModifierType modifiers,
-                                 gboolean sun_mode,
-                                 gboolean hp_mode,
-                                 gboolean legacy_mode,
-                                 gboolean vt220_mode,
                                  gboolean cursor_app_mode,
                                  char **normal,
                                  gssize *normal_length)
@@ -1323,10 +1047,6 @@ _vte_keymap_key_add_key_modifiers(guint keyval,
        if (modifier_encoding_method == MODIFIER_ENCODING_NONE) {
                return;
        }
-       if (sun_mode || hp_mode || vt220_mode) {
-               /* no modifiers for you! */
-               return;
-       }
 
        switch (modifiers & significant_modifiers) {
        case 0:
diff --git a/src/keymap.h b/src/keymap.h
index bd57f98..910a5dc 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -35,10 +35,6 @@ G_BEGIN_DECLS
  * a literal string or a capability name. */
 void _vte_keymap_map(guint keyval,
                     GdkModifierType modifiers,
-                    gboolean sun_mode,
-                    gboolean hp_mode,
-                    gboolean legacy_mode,
-                    gboolean vt220_mode,
                     gboolean app_cursor_keys,
                     gboolean app_keypad_keys,
                     struct _vte_terminfo *terminfo,
@@ -52,10 +48,6 @@ gboolean _vte_keymap_key_is_modifier(guint keyval);
 /* Add modifiers to the sequence if they're needed. */
 void _vte_keymap_key_add_key_modifiers(guint keyval,
                                       GdkModifierType modifiers,
-                                      gboolean sun_mode,
-                                      gboolean hp_mode,
-                                      gboolean legacy_mode,
-                                      gboolean vt220_mode,
                                       gboolean app_cursor_keys,
                                       char **normal,
                                       gssize *normal_length);
diff --git a/src/vte-private.h b/src/vte-private.h
index dd9eaba..fd03230 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -179,12 +179,6 @@ struct _VteTerminalPrivate {
        } flags;
        int keypad_mode, cursor_mode;   /* these would be VteKeymodes, but we
                                           need to guarantee its type */
-       gboolean sun_fkey_mode;
-       gboolean hp_fkey_mode;
-       gboolean legacy_fkey_mode;
-       gboolean vt220_fkey_mode;
-       int fkey;                       /* this would be a VteFKey, but we
-                                          need to guarantee its type */
        GHashTable *dec_saved;
        int default_column_count, default_row_count;    /* default sizes */
 
diff --git a/src/vte.c b/src/vte.c
index 7db5cf1..14545ab 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -5140,10 +5140,6 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
                 * it to a literal or capability name. */
                if (handled == FALSE && terminal->pvt->terminfo != NULL) {
                        _vte_keymap_map(keyval, modifiers,
-                                       terminal->pvt->sun_fkey_mode,
-                                       terminal->pvt->hp_fkey_mode,
-                                       terminal->pvt->legacy_fkey_mode,
-                                       terminal->pvt->vt220_fkey_mode,
                                        terminal->pvt->cursor_mode == VTE_KEYMODE_APPLICATION,
                                        terminal->pvt->keypad_mode == VTE_KEYMODE_APPLICATION,
                                        terminal->pvt->terminfo,
@@ -5223,10 +5219,6 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
                         normal_length = strlen(normal);
                        _vte_keymap_key_add_key_modifiers(keyval,
                                                          modifiers,
-                                                         terminal->pvt->sun_fkey_mode,
-                                                         terminal->pvt->hp_fkey_mode,
-                                                         terminal->pvt->legacy_fkey_mode,
-                                                         terminal->pvt->vt220_fkey_mode,
                                                          terminal->pvt->cursor_mode == 
VTE_KEYMODE_APPLICATION,
                                                          &normal,
                                                          &normal_length);
@@ -10724,10 +10716,6 @@ vte_terminal_scroll(GtkWidget *widget, GdkEventScroll *event)
                _vte_keymap_map (
                                cnt > 0 ? GDK_KEY_Down : GDK_KEY_Up,
                                terminal->pvt->modifiers,
-                               terminal->pvt->sun_fkey_mode,
-                               terminal->pvt->hp_fkey_mode,
-                               terminal->pvt->legacy_fkey_mode,
-                               terminal->pvt->vt220_fkey_mode,
                                terminal->pvt->cursor_mode == VTE_KEYMODE_APPLICATION,
                                terminal->pvt->keypad_mode == VTE_KEYMODE_APPLICATION,
                                terminal->pvt->terminfo,
@@ -12658,13 +12646,9 @@ vte_terminal_reset(VteTerminal *terminal,
                                                        terminal);
        _vte_iso2022_state_set_codeset(pvt->iso2022,
                                       pvt->encoding);
-       /* Reset keypad/cursor/function key modes. */
+       /* Reset keypad/cursor key modes. */
        pvt->keypad_mode = VTE_KEYMODE_NORMAL;
        pvt->cursor_mode = VTE_KEYMODE_NORMAL;
-       pvt->sun_fkey_mode = FALSE;
-       pvt->hp_fkey_mode = FALSE;
-       pvt->legacy_fkey_mode = FALSE;
-       pvt->vt220_fkey_mode = FALSE;
        /* Enable meta-sends-escape. */
        pvt->meta_sends_escape = TRUE;
        /* Disable margin bell. */
diff --git a/src/vteseq.c b/src/vteseq.c
index 7fc8b28..e80a7de 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -757,26 +757,6 @@ vte_sequence_handler_decset_internal(VteTerminal *terminal,
                 PRIV_OFFSET(alternate_screen),
                 vte_sequence_handler_rc,
                 vte_sequence_handler_sc,},
-               /* 1051: Sun function key mode. */
-               {1051, PRIV_OFFSET(sun_fkey_mode), 0, 0,
-                FALSE,
-                TRUE,
-                NULL, NULL},
-               /* 1052: HP function key mode. */
-               {1052, PRIV_OFFSET(hp_fkey_mode), 0, 0,
-                FALSE,
-                TRUE,
-                NULL, NULL},
-               /* 1060: Legacy function key mode. */
-               {1060, PRIV_OFFSET(legacy_fkey_mode), 0, 0,
-                FALSE,
-                TRUE,
-                NULL, NULL},
-               /* 1061: VT220 function key mode. */
-               {1061, PRIV_OFFSET(vt220_fkey_mode), 0, 0,
-                FALSE,
-                TRUE,
-                NULL, NULL},
                /* 2004: Bracketed paste mode. */
                {2004, PRIV_OFFSET(bracketed_paste_mode), 0, 0,
                 FALSE,
@@ -934,26 +914,6 @@ vte_sequence_handler_decset_internal(VteTerminal *terminal,
                                "Entering application keypad mode.\n" :
                                "Leaving application keypad mode.\n");
                break;
-       case 1051:
-               _vte_debug_print(VTE_DEBUG_KEYBOARD, set ?
-                               "Entering Sun fkey mode.\n" :
-                               "Leaving Sun fkey mode.\n");
-               break;
-       case 1052:
-               _vte_debug_print(VTE_DEBUG_KEYBOARD, set ?
-                               "Entering HP fkey mode.\n" :
-                               "Leaving HP fkey mode.\n");
-               break;
-       case 1060:
-               _vte_debug_print(VTE_DEBUG_KEYBOARD, set ?
-                               "Entering Legacy fkey mode.\n" :
-                               "Leaving Legacy fkey mode.\n");
-               break;
-       case 1061:
-               _vte_debug_print(VTE_DEBUG_KEYBOARD, set ?
-                               "Entering VT220 fkey mode.\n" :
-                               "Leaving VT220 fkey mode.\n");
-               break;
        default:
                break;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]