Can A Drawable Canvas Receive Key Events?



Hi,

I have a standalone test app that has nothing inside the main window but a big, drawable RGB canvas (GtkDrawingArea). I can receive nearly any kind of event via the canvas: Expose, mouse motion, button press/release, scroll wheel, etc. However, I *cannot* figure out how to get key press events. I even added the key up/down events to the widget's event list using the GDK_KEY_PRESS_MASK and GDK_KEY_RELEASE_MASK flags passed to gtk_widget_add_events().

Is it even supposed to be possible to get key events for the canvas? Is a non-text widget forbidden from receiving key events? When I swap the canvas out for a more text-oriented widget, I get all the key events I want.

        Thanks...
--
        -Mike Melanson



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]