Question about xkbd driver/x server interaction

Peter Hutterer peter.hutterer at who-t.net
Sat Jan 10 19:00:55 PST 2009


On Sun, Jan 11, 2009 at 09:25:50AM +1300, Ian Welch wrote:
> I'm very new to the internals of the X Server and its architecture and
> have a newbie question. Am I right that the X Server creates a socket
> connection to the keyboard via the xkbd driver and the X Server is
> signalled when scan code data is available on the socket?

yes, most drivers open an fd on the matching device file and put a SIGIO
handler on the fd. The server then pulls the data off the fd during sigio
handling, though the actual event processing (i.e. which client receives which
event) is done in the main loop.

one point to watch out is that linux systems tend to use the evdev driver for
keyboards now, not kbd.
 
Cheers,
  Peter



More information about the xorg mailing list