Input Event Handling

JM Ibanez jm at orangeandbronze.com
Wed Apr 4 08:36:26 PDT 2007


Thorsten Wilms <t_w_ at freenet.de> writes:

> Hi!
>
> I'm working on a concept that deals with mapping user input device 
> events to actions. For this it would be better to know how input 
> events are handled currently. Searched for a while, even had a look 
> at the ICCCM but failed to get anything out of it.
>
> I initialy though it would be roughly like this:
> device -> driver->kernel -> userspace
> If X is running:
> device -> driver->kernel -> x-server -> WM -> app that has focus
> Where events can be interpreted and not passed on on every level.
>
> In a random IRC channel I have been told that events are not passed 
> through the WM. But how can the WM intercept shortcuts, then?

The window manager is simply Just Another X Client. As I understand it,
since the window manager is another X client and it draws (what is) the
window frame, and since it is part of the order of windows (e.g. from
some input widget -> application window -> window manager frame), it
does receive input events and can intercept shortcuts in that manner.

> With further thinking, input focus might happen on 3 levels:
> widget, window, application. Right?


>
> If I hit Alt-F1 to switch to the first console, is that shortcut 
> interpreted by the kernel or the x-server?
>
> Does the x-server anything special to receive all input events?

The X server; I don't know how exactly though. Someone else might be
able to elaborate...



-- 
JM Ibanez
Senior Software Engineer
Orange & Bronze Software Labs, Ltd. Co.

jm at orangeandbronze.com
http://software.orangeandbronze.com/



More information about the xorg mailing list