--- src/keymap.c.orig	Tue May 20 00:48:57 2003
+++ src/keymap.c	Fri Nov 28 10:26:33 2003
@@ -275,6 +275,8 @@
 
 static struct _vte_keymap_entry _vte_keymap_GDK_KP_Enter[] = {
 	{cursor_all, keypad_default, fkey_all, 0, NULL, 0, "@8"},
+	{cursor_all, keypad_app, fkey_all, VTE_NUMLOCK_MASK | GDK_CONTROL_MASK, "\n", 1, NULL},
+	{cursor_all, keypad_app, fkey_all, VTE_NUMLOCK_MASK, "\r", 1, NULL},
 	{cursor_all, keypad_app, fkey_all, 0, _VTE_CAP_SS3 "M", -1, NULL},
 	{cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\n", 1, NULL},
 	{cursor_all, keypad_all, fkey_all, 0, "\r", 1, NULL},
@@ -307,6 +309,7 @@
 
 static struct _vte_keymap_entry _vte_keymap_GDK_KP_Multiply[] = {
 	{cursor_all, keypad_default, fkey_all, 0, "*", 1, NULL},
+	{cursor_all, keypad_app, fkey_all, VTE_NUMLOCK_MASK, "*", 1, NULL},
 	{cursor_all, keypad_app, fkey_all, 0, _VTE_CAP_SS3 "j", -1, NULL},
 	{cursor_all, keypad_all, fkey_all, 0, NULL, 0, NULL},
 };
@@ -314,6 +317,8 @@
 static struct _vte_keymap_entry _vte_keymap_GDK_KP_Add[] = {
 	{cursor_all, keypad_default, fkey_notvt220, 0, "+", 1, NULL},
 	{cursor_all, keypad_default, fkey_vt220, 0, ",", 1, NULL},
+	{cursor_all, keypad_app, fkey_notvt220, VTE_NUMLOCK_MASK, "+", 1, NULL},
+	{cursor_all, keypad_app, fkey_vt220, VTE_NUMLOCK_MASK, ",", 1, NULL},
 	{cursor_all, keypad_app, fkey_notvt220, 0, _VTE_CAP_SS3 "k", -1, NULL},
 	{cursor_all, keypad_app, fkey_vt220, 0, _VTE_CAP_SS3 "l", -1, NULL},
 	{cursor_all, keypad_all, fkey_all, 0, NULL, 0, NULL},
@@ -327,6 +332,7 @@
 
 static struct _vte_keymap_entry _vte_keymap_GDK_KP_Subtract[] = {
 	{cursor_all, keypad_default, fkey_all, 0, "-", 1, NULL},
+	{cursor_all, keypad_app, fkey_all, VTE_NUMLOCK_MASK, "-", 1, NULL},
 	{cursor_all, keypad_app, fkey_all, 0, _VTE_CAP_SS3 "m", -1, NULL},
 	{cursor_all, keypad_all, fkey_all, 0, NULL, 0, NULL},
 };
@@ -340,6 +346,7 @@
 
 static struct _vte_keymap_entry _vte_keymap_GDK_KP_Divide[] = {
 	{cursor_all, keypad_default, fkey_all, 0, "/", 1, NULL},
+	{cursor_all, keypad_app, fkey_all, VTE_NUMLOCK_MASK, "/", 1, NULL},
 	{cursor_all, keypad_app, fkey_all, 0, _VTE_CAP_SS3 "o", -1, NULL},
 	{cursor_all, keypad_all, fkey_all, 0, NULL, 0, NULL},
 };
@@ -939,6 +946,9 @@
 		if (modifiers & VTE_META_MASK) {
 			fprintf(stderr, "Meta+");
 		}
+		if (modifiers & VTE_NUMLOCK_MASK) {
+			fprintf(stderr, "NumLock+");
+		}
 		if (modifiers & GDK_SHIFT_MASK) {
 			fprintf(stderr, "Shift+");
 		}
@@ -1004,7 +1014,7 @@
 		}
 		/* Check for coverage. This check is not exhaustive. */
 		fkey_mode = 0;
-		mods = GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK;
+		mods = GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK | VTE_NUMLOCK_MASK;
 		for (j = 0; entries[j].normal || entries[j].special; j++) {
 			if (entries[j].fkey_mode != fkey_all) {
 				fkey_mode |= entries[j].fkey_mode;
@@ -1061,7 +1071,7 @@
 	} else {
 		fkey_mode = fkey_default;
 	}
-	modifiers &= (GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK);
+	modifiers &= (GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK | VTE_NUMLOCK_MASK);
 
 	/* Search for the conditions. */
 	for (i = 0; entries[i].normal || entries[i].special; i++)
