Attempt at input event documentation

Daniel Stone daniel at
Wed Aug 9 02:05:44 PDT 2006

On Wed, Aug 09, 2006 at 05:08:32PM +0930, Peter Hutterer wrote:
> In my attempt to write MPX I had to dig through a lot of functions  
> and try to figure out how a (mouse) event is created and sent to the  
> client. I wrote up a summary of how the X server processes input events.
> If the information is useful (and correct), I am happy with putting  
> it up on the wiki or anywhere else where it is of use to other  
> developers. At the moment it uses wiki syntax (DokuWiki), I can  
> change that to whatever meets the requirements.
> I'd appreciate any feedback, especially if I misunderstood something  
> and the information is wrong.

It's fantastic, thanks.  Our wikis use Moin, but feel free to put it
there.  The only thing I noticed is that this is specific to the XFree86
DDX, but KDrive at least is quite similar (essentially just changed
function names).

In the input-hotplug branch, the DDX isn't actually responsible for
event generation any more.  There are two functions (GetPointerEvents
and GetKeyboardEvents[0]) in the DIX which generate all the events for
you, and the DDX enqueues them as it sees fit.  This included fixing
mieq so it was Xi-aware, so XFree86 and KDrive both use it now.

This should hopefully make MPX easier, as you can just generate all the
events you need in GPE.  It still has a few limitations at the moment
(most glaringly: lack of multi-screen; I don't have a multiscreen system
to test on), but is mostly there.  I've been using it daily on my laptop
for three or so weeks now.


[0]: Which is just a special case of GetKeyboardValuatorEvents.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
URL: <>

More information about the xorg mailing list