[Top] [All Lists]

Re: Keyboard/Mouse drivers on SGI

To: Miguel de Icaza <>
Subject: Re: Keyboard/Mouse drivers on SGI
From: Steve Alexander <>
Date: Mon, 23 Jun 1997 21:15:29 -0700
In-reply-to: Message from of 23 Jun 1997 20:20:03 CDT
Miguel de Icaza <> writes:
>   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).

I am not the best person to explain this, but my understanding is that the
keyboard and mouse (or spaceball, etc...) are linked (I_LINKed) under a driver
called 'shmiq,' which is the shared-memory event queue driver.  This driver
takes STREAMS data from the underlying devices and converts it into some sort
of standard event queue.  This allows events to be given to the X server in a
standard format, and I believe that this is done by pinning memory in the
X server and then copying events into this memory; I have no idea what happens
if the server doesn't respond fast enough.

My guess is that /dev/input/{keyboard,mouse} are both some sort of standard
serial port driver and that the modules I_PUSHed on top are what interpret the
low-level keyboard/mouse protocols.

SCO use a similar approach; their driver is called 'ev' if I remember

So, if my theory is correct, what I'd expect to see is:

        mfd = open /dev/input/mouse
        I_PUSH mfd "mouse"
        kfd = open /dev/input/keyboard
        I_PUSH kfd "keyboard"

        sfd = open /dev/shmiq
        I_LINK sfd mfd
        I_LINK sfd kfd

More than that, I don't know.

-- Steve

<Prev in Thread] Current Thread [Next in Thread>