Re: Getting keyboard input into an unfocused window



Mubashir <mcheema yahoo com> writes:
I have been able to get keyboard input for my application without a
problem (when it is in focus).  Using the following:

gtk_signal_connect( (GTK_OBJECT(window), "key_press_event",
                      GTK_SIGNAL_FUNC(eventPressKey), NULL);

However I need to get keyboard input even when my application window does
not have the focus.  I have played around with XGrabKeyboard, which does
a good job of grabbing the keyboard, however it does not send the events
to my application window when my app goes out of focus.  I am very new
at GTK programming and would appreciate any pointers.


If you also gdk_pointer_grab(), it should keep the focus in your app.

Havoc
  




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