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 f710120..d1a3c72 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -51,11 +51,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) {
@@ -71,48 +67,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
@@ -127,28 +86,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;
@@ -166,735 +109,574 @@ enum _vte_modifier_encoding_method {
 /* 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, "kB"},
-	{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, "ta"},
-	{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, "kI"},
-	{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, "kB"},
-	{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, "kh"},
-	{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, "kh"},
-	{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, "@7"},
-	{cursor_all, keypad_all, fkey_vt220, 0, _VTE_CAP_CSI "4~", -1, X_NULL},
-	{cursor_all, keypad_all, fkey_notvt220, 0, X_NULL, 0, "@7"},
-	{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, "kP"},
-	{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, "kN"},
-	{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, "ku"},
-	{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, "kd"},
-	{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, "kr"},
-	{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, "kl"},
-	{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, "@8"},
-	{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, "k1"},
-	{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, "k2"},
-	{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, "k3"},
-	{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, "k4"},
-	{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, "K4"},
-	{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, "kd"},
-	{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, "K5"},
-	{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, "kl"},
-	{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, "K2"},
-	{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, "kr"},
-	{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, "K1"},
-	{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, "ku"},
-	{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, "K3"},
-	{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, "k1"},
-	{cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, "F3"},
-	{cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, "k1"},
-	{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, "k2"},
-	{cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, "F4"},
-	{cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, "k2"},
-	{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, "k3"},
-	{cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, "F5"},
-	{cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, "k3"},
-	{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, "k4"},
-	{cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, "F6"},
-	{cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, "k4"},
-	{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, "k5"},
-	{cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, "F7"},
-	{cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, "k5"},
-	{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, "k6"},
-	{cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, "F8"},
-	{cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, "k6"},
-	{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, "k7"},
-	{cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, "F9"},
-	{cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, "k7"},
-	{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, "k8"},
-	{cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, "FA"},
-	{cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, "k8"},
-	{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, "k9"},
-	{cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, "FB"},
-	{cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, "k9"},
-	{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, "k;"},
-	{cursor_all, keypad_all, fkey_vt220, GDK_CONTROL_MASK, X_NULL, 0, "FC"},
-	{cursor_all, keypad_all, fkey_vt220, 0, X_NULL, 0, "k;"},
-	{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, "F1"},
-	{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, "F2"},
-	{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, "F3"},
-	{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, "F4"},
-	{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, "F5"},
-	{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, "F6"},
-	{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, "F7"},
-	{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, "F8"},
-	{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, "F9"},
-	{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, "FA"},
-	{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, "FB"},
-	{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, "FC"},
-	{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, "FD"},
-	{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, "FE"},
-	{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, "FF"},
-	{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, "FG"},
-	{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, "FH"},
-	{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, "FI"},
-	{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, "FJ"},
-	{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, "FK"},
-	{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, "FL"},
-	{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, "FM"},
-	{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, "FN"},
-	{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, "FO"},
-	{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, "FP"},
-	{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 {
@@ -1006,10 +788,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_termcap *termcap,
@@ -1022,7 +800,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;
 	char *cap, *tmp;
 	const char *termcap_special = NULL;
 	char ncurses_buffer[4096];
@@ -1033,11 +810,7 @@ _vte_keymap_map(guint keyval,
 	g_return_if_fail(special != 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;
@@ -1049,7 +822,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;
@@ -1060,30 +832,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].special[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) {
@@ -1101,27 +849,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].special[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) {
@@ -1134,10 +867,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);
@@ -1378,10 +1107,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)
@@ -1399,10 +1124,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 0f19aef..bbc5075 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -34,10 +34,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_termcap *termcap,
@@ -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 64476da..02e66d9 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -180,12 +180,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 e1f1e97..dd1591f 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -5142,10 +5142,6 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 		 * it to a literal or capability name. */
 		if (handled == FALSE && terminal->pvt->termcap != 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->termcap,
@@ -5231,10 +5227,6 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 								 &normal_length);
 			_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);
@@ -10740,10 +10732,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->termcap,
@@ -12676,13 +12664,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 f2fd84e..7d6ed8b 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -760,26 +760,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,
@@ -937,26 +917,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;
 	}
