Re: Hooking into the input queue(?)



Tristan Van Berkom wrote:
On Thu, 02 Dec 2004 14:15:06 +0000, Jan <jandersen informatica com> wrote:
[...]
 > I know that in the earlier versions of Windows an application could hook
 > in to different places in the system, among others the keyboard message
 > queue, and I assume this is what the producers of this game did. How
 > would one do the same in Gnome?

I think you are looking for something like this:
http://developer.gnome.org/doc/API/2.0/gtk/gtk-General.html#gtk-key-snooper-install

The prerequisite is that the application in question has to have keyboard forcus
somewhere (i.e. the keyboard snooper approach lets you get key input events
that are delivered to your application before they get delivered to
particular widgets
such as text entries etc.)

I think that to get "global" key input then you have to fool around with
the terminal that X is running in and kind of tee the output, there might be
some kind of inittab entry for that or something.

Yes, it is this global approach I am after - it has to be possible somehow. I assume the X server is the one that captures the physical keystrokes and sends them to - the window manager? Or directly to the application?

/jan




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