events in evdev.c

Peter Hutterer peter.hutterer at
Sat Sep 20 18:29:39 PDT 2008

On Sat, Sep 20, 2008 at 11:48:08AM -0400, Chuck Robey wrote:
> I myself really like the approach that xf86-input-joystick takes, it allows the
> approach that evdev takes for Linux, but it doesn't try to suppose that the
> event interface that only works for Linux can work for other OSes.  You know how
> evdev is usually put forward as the best example of driver writing?  I think
> that the joystick is a way better (more portable) example.  Other OSes *do* have
> events, but they're intra-kernel only, not exported to apps.  And, FreeBSD
> doesn't have wscons (although I like that idea, myself).

evdev is put forward as standard example because - unlike most other drivers -
most of its code deals with being an X driver, not a hardware driver.  There's
little protocol crazyness, only few ifdefs, and the code is relatively

I'm sorry if you don't see how that is a good way of _learning_ how to write
an input driver. 


More information about the xorg mailing list