trapping key-press signals at the window level



I have a case where, if a particular application window is in focus, I want to
trap all single key-press signals; however, using the usual gtk-signal-connect
function, my callback function is never called:

  gtk_signal_connect( GTK_OBJECT( control_window ),
		      "key_press_event",
		      GTK_SIGNAL_FUNC( control_window_key_press ),
		      (gpointer) NULL );

How can I accomplish this?

Also, is there a way to do a "signal dump"?  By that, I mean, is there some
sort of "debug flag" that will show all GTK signals, from whence they are
emitted, and if they have been stopped on their way up the hierarchy?

Thank you!

-- Duane Johnson



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