Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!gibdo!slh From: slh@gibdo.engr.washington.edu Newsgroups: comp.windows.x.motif Subject: Re: adding an event handler for keypresses Message-ID: <1991May03.224951.16499@gibdo.engr.washington.edu> Date: 3 May 91 22:53:07 GMT References: <114159@tut.cis.ohio-state.edu> Sender: news@milton.u.washington.edu (News) Reply-To: slh@gibdo.engr.washington.edu (PUT YOUR NAME HERE) Organization: zippity Lines: 14 In article <114159@tut.cis.ohio-state.edu> frank@cis.ohio-state.edu (Frank Adelstein) writes: |Hello. I'm having problems trying to add an event handler for KeyPress |events. Basically, for debugging, I want to be able to quit my application |whenever I hit a 'q' key. I have the line: | |XtAddEventHandler (Frame, KeyPressMask, False, KeyQuit, NULL); | |where Frame is a form widget, and KeyQuit is the callback, which is never |getting called (back). I've been able to get the same thing to work under |Athena. Is there something obvious or subtle that I'm missing? Any |suggestion or help is appreciated. Thanks. | The problem probably isn't your event handler, but keyboard focus, the widget is never getting the keypress.