Subject: Keyboard/Mouse drivers on SGI

From: Miguel de Icaza <[email-masked]>
Date: Mon, 23 Jun 1997 20:20:03 -0500

Hello guys,

   More questions.

   I see that the Xsgi server uses /dev/input/mouse and
/dev/output/keyboard.  I can see from par's output that it does some
STREAMS ioctls it I_PUSH'es something (I am not even remotely familiar
to STREAMS, so I dunno what those I_PUSHes do).

    Can someone tell me if the X server does something interesting
with those ioctls (as the man page for the keyboard/mouse did not
mention anything interesting in this regard), or if it just reads from
those devices in raw mode and decodes the information itself?

   On the SPARC, the server puts the keyboard and the mouse in a
special mode (VUID mode) which makes the read(2) system call return
records instead of returning a stream of bytes (ie, the client and the
kernel agree to send information in structure-sized chunks).

   So, on the SPARC, those VUID records have all of the decoded
information ready for X server to use, no further decoding takes place
on the X server, the stuff is just put on the X servers's input queues
by just copying fields.  For example, in the mouse case, those VUID
registers come with the dx/dy information as well as the buttons
status all in a nicely packed record.
  
   Now, even if we have our own X server, I would like to make our X
server and Xsgi use the same drivers and mechanisms for input (just to
be able one day to run a stock Xsgi server on Linux, for those
machines where a free X11R6 derivative will not work).  I mean, I do
not really care where the input decoding takes place in the server or
in the kernel, I can go ahead and use a quickly hacked Sun-like VUID
to do this in the meantime.

Cheers,
Miguel.