Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!uunet!tut.cis.ohio-state.edu!cis.ohio-state.edu From: frank@cis.ohio-state.edu (Frank Adelstein) Newsgroups: comp.windows.x.motif Subject: adding an event handler for keypresses Message-ID: <114159@tut.cis.ohio-state.edu> Date: 29 Apr 91 15:06:22 GMT Sender: news@tut.cis.ohio-state.edu Organization: The Ohio State University, Department of Computer and Information Science Lines: 13 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. --Frank Adelstein. frank@cis.ohio-state.edu