Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!rex!samsung!cs.utexas.edu!swrinde!ucsd!cacilj!paul From: paul@cacilj.UUCP (Paul Close) Newsgroups: comp.windows.x Subject: Problems getting keyboard input Message-ID: <1324@cacilj.UUCP> Date: 1 Dec 89 23:11:06 GMT Reply-To: paul@cacilj.UUCP (Paul Close) Organization: CACI Products Company, La Jolla, CA Lines: 29 I am currently having no success trying to rad characters from the keyboard. I am using DECwindows, and the Xt toolkit. Here's how I set up the keyboard read: EventMask event_mask = KeyPressMask; XtAddEventHandler(w->graphics_widget, event_mask, FALSE, key_pressed, w); where key_pressed is the routine to handle the key events and w->graphics_widget is a widget obtained by calling DwtWindow. Here is the widget hierarchy I use: w->shell_widget = XtCreateApplicationShell(title, topLevelShellWidgetClass, NULL, 0); w->main_widget = DwtMainWindow(w->shell_widget, "MainWindow", 0, 0, 0, 0); w->graphics_widget = DwtWindow(w->main_widget, "GraphicsWindow", 0, 0, width, height, w->callback); I have implemented a "mouse button pressed" routine that is almost identical, and it works just fine. With keyboard events, however, the 'key_pressed' handle never even gets called! Do I need to do more than just XtAddEventHandler? Thanks, -- Paul Close paul@cacilj.CTS.COM ...!{uunet, ucsd, crash}!cacilj!paul The Obi-wan Kenobi method: "Use the Source, Luke" -Jim Fulton