Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ucsd!ucsdhub!hp-sdd!hp-pcd!hpcvlx!gabe From: gabe@hpcvlx.cv.hp.com (Gabe Begeddov) Newsgroups: comp.windows.x Subject: Re: Xt Accelerators Message-ID: <100920176@hpcvlx.cv.hp.com> Date: 26 Feb 90 20:46:12 GMT References: <9002251927.AA13834@rx7.ece.cmu.edu> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 35 / hpcvlx:comp.windows.x / John.Hagerman@rx7.ece.cmu.EDU, at.rx7@rx7.ece.cmu.EDU / 11:27 am Feb 25, 1990 / I'm having trouble getting accelerators to work. What's wrong with the following code? The intent is to have a Return keypress in the dialog's `value' widget cause a set()notify()unset() action sequence in the dialog's `show' widget. I'm using the R3 Athena widgets on a DS 3100 running Ultrix. Thanks for any help - John hagerman@ece.cmu.edu acc = XtParseAcceleratorTable("Return:set()notify()unset()"); XtSetArg(arg[0], XtNaccelerators, (XtArgVal) acc); XtSetValues(cmd, arg, 1); XtInstallAccelerators(val, cmd); XtRealizeWidget(top); XtAppMainLoop(ac); } ---------- The problem seems to be the merge mode used. XtInstallAccellerators will merge the accelerators using augment semantics unless there is an explicit "#override" directive in the accelerators string. Try: acc = XtParseAcceleratorTable("#override Return:set()notify()unset()"); Gabe Beged-Dov Interface Technology Operation Hewlett-Packard --------------- "Home of the Motif Lite Widget-Brewery"