Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!ucbvax!unify.COM!grp From: grp@unify.COM (Greg Pasquariello) Newsgroups: comp.windows.x.motif Subject: How are menu accelerators specified for custom Mwm menus? Message-ID: <9007270125.AA02399@magpie> Date: 27 Jul 90 01:25:24 GMT References: <1990Jul26.140300.18500@hellgate.utah.edu> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: uunet!unify.com!grp Distribution: inet Organization: The Internet Lines: 47 Rich Thomson writes: >Is it possible to define menu accelerators for menus you create in Mwm? >How does one specify them? Thanks in advance... > -- Rich Yes. The syntax for a menu is Menu menu-name { label mnemonic accelerator function . . . } The mnemonic is the part of the label that gets the underscore, and the accelerator is the key that invokes the action. The mnemonic looks like _c where the 'c' is the character to be underlined. A real menu (that I use, and is pretty much the standard) looks like: Menu DefaultWindowMenu MwmWindowMenu { "Window Menu" f.title "Restore" _R AltF5 f.normalize "Minimize" _n AltF9 f.minimize "Maximize" _x AltF6 f.maximize "Move" _M AltF7 f.move "Size" _S AltF8 f.resize "Lower" _L AltF3 f.lower no-label f.separator "Quit" _Q AltF4 f.kill } >Rich Thomson thomson@cs.utah.edu {bellcore,hplabs,uunet}!utah-cs!thomson >``If everybody is thinking the same thing, is anybody thinking?'' --Bob Johnson > > -Greg Pasquariello grp@unify.com