Re: Getting keyboard input into an unfocused window
- From: Havoc Pennington <hp redhat com>
- To: Mubashir <mcheema yahoo com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Getting keyboard input into an unfocused window
- Date: 07 Jun 2001 11:50:44 -0400
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]