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: Another Resource file question Message-ID: <8911171804.AA12209@expo.lcs.mit.edu> Date: 17 Nov 89 18:04:34 GMT References: <1989Nov17.023437.9716@agate.berkeley.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: X Consortium, MIT Laboratory for Computer Science Lines: 29 > Can anyone send a example on how to add accelerator to an application though > the resource database? For example, with xmh, I will like to add an > accelerator where I can hit the "n" key and cause the "Next" Command > button to activate and call it's callback. The application has to install your accelerators for you and the application has to provide action procedures for you to map to keyboard accelerators. The R3 xmh application provides neither. Suppose the xmh application did install accelerators for you, and did provide action routines which map to the command functionality that you are familiar with. The resource database entry might look look something like this: Xmh*someWidgetName.Accelerators: #override\n\ Metaspace: XmhViewNextMessage()\n\ :Metac: XmhMarkCopy()\n\ :Metad: XmhMarkDelete()\n\ :Metaf: XmhForward()\n\ :Metam: XmhMarkMove()\n\ :Metan: XmhViewNextMessage()\n\ :Metap: XmhViewPreviousMessage()\n\ :Metar: XmhReply()\n\ :Metau: XmhUnmark()\n Donna Converse converse@expo.lcs.mit.edu