Re: uniform input device packets?

Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 26 Jun 1998 01:49:31 +0100 (BST)


> that differs between me and you. I think, that the kernel
> should do enough to make an abstraction of the actual
> hardware interfaces, so that the apps don't have to care
> whether this is a mouse with a wheel made my Microsoft, or
> made by Logitech, serial, PS/2, or with a special card.

I think you are both half way there and both missed the right answer.

> They shouldn't care whether it is a digital trackball
> connected to a game port. (I'm writing a driver for that
> right now, believe me, such things exist).

Correct.

> If we would only do minimal hardware support in the kernel,
> and would only export completely raw devices, every
> application would have to know about all these crazy

Not quite.

Why can't it be a shared library or set of shared libraries that
wrap a mixture of tty devices, weird joystick devices, and
horrible things you never even dreamed of (parallel port
joystics etc)

> which only makes things problematic - imagine console mode
> restoral troubles when a raw mode application crashes. It

Console ought to restore to 'default' when the last application
holding it in raw mode closes it IMHO.

> We need /dev/jsXX without any more discussion, since
> joysticks is a bunch of very different beasts, with every
> manufacturer having a specific protocol, and sometimes
> (Gravis) even not similar between models from the same
> manufacturer. And, these protocols are very timing sensitive
> and can't be handled in the applications.

Ok thats a good case for it needing to be in kernel for this
one.

> We don't necessarily need /dev/mouseXX, but it will be
> useful, getting us rid of the mouse repeating trouble,
> because /dev/psaux can be opened only once (and other

Actually fixing /dev/psaux to be multi-open is simpler. Mice
definitely can be done with a library if the multi-open semantic
is cleaned up appropriately. In fact the library can support
gpm repeater too ;)

> is really convenient? A mouse has buttons, and these are
> very similar to keys. Why not to handle them in the same
> way?

"When all you have is a hammer everything looks like a nail"
I believe the quote goes. Kernel mode unified mouse has been
done before and nobody found it worth while.

Mice are far more tricky than joystick because most mice do
not need kernel help. With joystick you get to pick the
messages you pass and you'd be off your trolley not to make
them the same for all types.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu