Path: utzoo!utgpu!news-server.csri.toronto.edu!orasis.vis.toronto.edu!tjhorton Newsgroups: comp.windows.x.motif From: tjhorton@vis.toronto.edu ("Timothy J. Horton") Subject: Re: Problems with adding XmText translations Message-ID: <91May15.225721edt.8838@orasis.vis.toronto.edu> Organization: Department of Computer Science, University of Toronto References: <9105151342.AA10669@10669> Distribution: inet Date: 16 May 91 02:57:34 GMT Lines: 27 jerryl@is.Morgan.COM (Jerry Liebelson) writes: >I'm trying to add additional, somewhat emacs-like, keyboard translations to >the XmText widget. > > basic*text.translations: #override \ > Ctrla: beginning-of-line() \n\ > Ctrle: end-of-line() \n\ [...] > PROBLEM: It seems only the first translation (Ctrl-a or whatever one >specifies first) takes affect. The others are ignored. Does anybody see >what I'm doing wrong? Thanks. Straightforward. As you included it, there was a space after the "\" at the end of the first line of the translation: > Ctrla: beginning-of-line() \n\ ^ you have a space here That "\" character escapes the next character. If it were a newline, the usual meaning of the newline would be ignored (ie normal meaning is "end of this resource") and it would be included as whitespace in the resource definition. In your translations, you escaped the following space, and the newline after that ended the resource definition. Thus, nothing else of your translations should have had effect. I've seen this problem before; it should be in the FAQs if it isn't.