diff --git a/src/keymap.c b/src/keymap.c
index c61d7d8..f710120 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -502,13 +502,12 @@ static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Insert[] = {
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_End[] = {
 	{cursor_all, keypad_default, fkey_all, 0, X_NULL, 0, "K4"},
-	{cursor_all, keypad_default, fkey_notvt220,
-	 0, _VTE_CAP_CSI "4~", -1, X_NULL},
+	{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_all, keypad_app, fkey_notvt220, 0, _VTE_CAP_CSI "4~", -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_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},
 };
 
@@ -564,13 +563,12 @@ static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Right[] = {
 
 static const struct _vte_keymap_entry _vte_keymap_GDK_KP_Home[] = {
 	{cursor_all, keypad_default, fkey_all, 0, X_NULL, 0, "K1"},
-	{cursor_all, keypad_default, fkey_notvt220,
-	 0, _VTE_CAP_CSI "1~", -1, X_NULL},
+	{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_all, keypad_app, fkey_notvt220, 0, _VTE_CAP_CSI "1~", -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_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},
 };
 
