per@erix.ericsson.se (Per Hedeland) (07/17/89)
Please excuse me if this has come up before, or I just don't understand how translations works (but in either case tell me about it:-). I tried to add some translations to the Text Widget, in particular I wanted sequences like Escape,f to have the same action as Meta-f. For simplicity, let's assume that the original translation table was just Meta<Key>F: forward-word() \n\ <Key>: insert-char() To this I added (with XtOverrideTranslations) my <Key>Escape,<Key>F: forward-word() and it worked fine, *but* Meta-f and unmodified f *stopped* working, i.e. they were effectively ignored! After much experimenting, I found that I had to use all of <Key>Escape,~Meta<Key>F: forward-word() \n\ ~Meta<Key>F: insert-char() for XtOverrideTranslations in order to achieve the desired effect. Is this the way it is supposed to work, or a bug? If the former, could someone please explain the logic of the translation manager to me? - Obviously, I think that the ~Meta and the second translation are redundant. N.b. I got similar results when replacing the translation table rather than overriding, i.e. the mininum table I found to work in this case was <Key>Escape,~Meta<Key>F: forward-word() \n\ Meta<Key>F: forward-word() \n\ ~Meta<Key>F: insert-char() \n\ <Key>: insert-char() Thanks In Advance --Per Hedeland per@erix.ericsson.se or per%erix.ericsson.se@uunet.uu.net or ...uunet!erix.ericsson.se!per
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (07/26/89)
[ mcvax!kth!sunic!ericom!erix.ericsson.se!per@uunet.uu.net (Per Hedeland) writes: ] > I tried to add some translations to the Text Widget, in particular I wanted > sequences like Escape,f to have the same action as Meta-f. For simplicity, > let's assume that the original translation table was just > Meta<Key>F: forward-word() \n\ > <Key>: insert-char() > To this I added (with XtOverrideTranslations) my > <Key>Escape,<Key>F: forward-word() > and it worked fine, *but* Meta-f and unmodified f *stopped* working... This is a bug in the MIT Xt implementation. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213