Catching key press events



I've designed a form with Glade to be the front end to a database application. I'm using a variety of text/entry and treeview components to display the data. I want to grab "page down" and "page up" key events to move through records. I was looking in the GTK+ API documentation and I saw a number of references to GDK regarding keyboard events. However, the GTK docs also mentioned a function called "gtk_main_do_event" that is supposed to be used to process GDK events. I'm confused if this is just for passing an event or can be used for filtering.

So, my question is simple. What is the best way for the main form to catch a key press event? Any snippets of code would be appreciated.



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