grp@magpie.unify.uucp (Greg Pasquariello) (06/06/90)
I have run into a translation manager problem with event sequences, that _seems_ to be a bug. Given that I have a resource file with translations in it, the translation manager behaves differently in two situations where I would expect it to work the same way. Consider a resource file with the following lines... *Command*translations:#replace\n\ <Key>Escape,<Key>a: EscapeSeq()\n\ <Key>a: KeyPressed() This behaves as I would expect it to; pressing "a" invokes KeyPressed() while pressing "ESC-a" invokes EscapeSeq(). However, in the situation where *Command*translations:#replace\n\ <Key>Escape,<Key>a: EscapeSeq()\n\ <Key>: KeyPressed() pressing "a" does nothing while pressing "ESC-a" works correctly. Am I missing something here? I have poured over various books, manuals, etc, but cannot seem to determine if this is a bug or expected behavior. Following is the small test program I used to ascertain my problem. BTW: this seems to happen with both R3 and R4. ================<CUT HERE>================ #include <X11/Intrinsic.h> #include <X11/Box.h> #include <X11/Command.h> Arg wargs[10]; int n; static void EscapeSeq() { printf("Escape Sequence\n"); } static void KeyPressed() { printf("Key pressed\n"); } XtActionsRec actTab[] = { {"EscapeSeq", EscapeSeq }, {"KeyPressed", KeyPressed }, }; main(argc, argv) int argc; char **argv; { Widget toplevel; Widget field; Widget control; toplevel = XtInitialize(argv[0], "TestClass", NULL, 0, &argc, argv); XtAddActions(actTab, XtNumber(actTab)); n = 0; control = XtCreateManagedWidget("control", boxWidgetClass, toplevel, wargs, n); n = 0; field = XtCreateManagedWidget("field", commandWidgetClass, control, wargs, n); XtRealizeWidget(toplevel); XtMainLoop(); } -- ------------------------------------------------------------------------------- Greg Pasquariello (916) 920-9092 ...!uunet!unify!grp Unify Corporation