Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!converse From: converse@EXPO.LCS.MIT.EDU (Donna Converse) Newsgroups: comp.windows.x Subject: Re: Translations and Accelerators Message-ID: <8910261857.AA10847@expo.lcs.mit.edu> Date: 26 Oct 89 18:57:49 GMT References: <8910242023.AA09995@drlc1> Sender: daemon@bloom-beacon.MIT.EDU Organization: X Consortium, MIT Laboratory for Computer Science Lines: 20 > I want to bind string translations to menu actions. For concreteness, > assume I pop up a menu with two items: "start" and "stop". I'd like > to be able to type "sta" to invoke the first and "sto" to select the > second. > > Query 1: Should the translation table: > > "s,t,a: Start()\n > s,t,o: Stop()\n" > > invoke the appropriate actions when installed on the menu widget? With a backslash at the end of the first line, you can specify this as the definition of the Accelerator resource of your menu widget in an application default file, and yes, you can have 3-key accelerators. The accelerator source widget is the menu widget, and the acclerator destination widget is where ever those accelerators are defined, where ever you expect the keyboard sequence "sta" to execute the Start action.