# Patch #10 for x3270 3.2.18.
# Corrects the trace display of KeyPress events that have unusual modifiers.
# Adds Default() action support for the ISO BackTab keysym which has come into
# fashion.
# Adds Default() action support for the EuroSign keysym.  This is more than a
# courtesy -- it is a workaround for the problem that Xt translation tables
# don't seem to recognize EuroSign.

--- x3270-3.2/actions.c	2001/12/26 20:53:08	1.40
+++ x3270-3.2/actions.c	2002/02/20 18:07:45
@@ -58,11 +58,11 @@
 	{ { "Shift" }, ShiftMask, False },
 	{ { (char *)NULL } /* Lock */, LockMask, False },
 	{ { "Ctrl" }, ControlMask, False },
-	{ { (char *)NULL }, Mod1Mask, False },
-	{ { (char *)NULL }, Mod2Mask, False },
-	{ { (char *)NULL }, Mod3Mask, False },
-	{ { (char *)NULL }, Mod4Mask, False },
-	{ { (char *)NULL }, Mod5Mask, False },
+	{ { CN }, Mod1Mask, False },
+	{ { CN }, Mod2Mask, False },
+	{ { CN }, Mod3Mask, False },
+	{ { CN }, Mod4Mask, False },
+	{ { CN }, Mod5Mask, False },
 	{ { "Button1" }, Button1Mask, False },
 	{ { "Button2" }, Button2Mask, False },
 	{ { "Button3" }, Button3Mask, False },
@@ -283,6 +283,11 @@
 {
 	XModifierKeymap *mm;
 	int i, j, k;
+	static char *default_modname[] = {
+	    CN, CN, "Ctrl",
+	    "Mod1", "Mod2", "Mod3", "Mod4", "Mod5",
+	    "Button1", "Button2", "Button3", "Button4", "Button5"
+	};
 
 	mm = XGetModifierMapping(display);
 
@@ -333,6 +338,11 @@
 			skeymask[i].name[k] = name;
 		}
 	}
+	for (i = 0; i < MODMAP_SIZE; i++) {
+		if (skeymask[i].name[0] == CN) {
+			skeymask[i].name[0] = default_modname[i];
+		}
+	}
 }
 
 #if defined(X3270_TRACE) /*[*/
@@ -380,8 +390,10 @@
 		(void) strcat(rs, skeymask[ix_ix[i]].name[ix[ix_ix[i]]]);
 		comma = " ";
 	}
+#if defined(VERBOSE_EVENTS) /*[*/
 	if (leftover)
 		(void) sprintf(strchr(rs, '\0'), "%s?%d", comma, state);
+#endif /*]*/
 
 	/*
 	 * Iterate to the next.
--- x3270-3.2/kybd.c	2002/01/23 15:22:57	1.39
+++ x3270-3.2/kybd.c	2002/02/20 18:10:20
@@ -3074,12 +3074,23 @@
 		    case XK_Tab:
 			action_internal(Tab_action, IA_DEFAULT, CN, CN);
 			break;
+#if defined(XK_ISO_Left_Tab) /*[*/
+		    case XK_ISO_Left_Tab:
+			action_internal(BackTab_action, IA_DEFAULT, CN, CN);
+			break;
+#endif /*]*/
 		    case XK_Clear:
 			action_internal(Clear_action, IA_DEFAULT, CN, CN);
 			break;
 		    case XK_Sys_Req:
 			action_internal(SysReq_action, IA_DEFAULT, CN, CN);
 			break;
+#if defined(XK_EuroSign) /*[*/
+		    case XK_EuroSign:
+			action_internal(Key_action, IA_DEFAULT, "currency",
+				CN);
+			break;
+#endif /*]*/
 
 #if defined(XK_3270_Duplicate) /*[*/
 		    /* Funky 3270 keysyms. */
