Subject: Re: On wscons, mice, and keyboards
To: None <thorpej@nas.nasa.gov>
From: Lennart Augustsson <augustss@cs.chalmers.se>
List: current-users
Date: 08/01/1998 18:31:43
> Uh, better yet, have a "mwms" (muxed-wsmouse) pseudo-device, and write
> a wmsconfig program that uses an ioctl to redirect the events to a
> particular pwms instance.
> 
> If you're going to do this mux thing, please make it configurable from
> userspace, and possible to leave out of the kernel :-)

Here's my latest incarnation of the wsmouse multiplexor.

I've implemented a pseudo device wsmux (of which you may have several).
In the config file you may specify for each wsmouse and/or wskbd that
they should go to a mux (or you can just leave them alone).

There are also ioctl() for joining and leaving a mux afterwards.
Furthermore, there is an ioctl to inject an event to a mux.

I've planned to port the FreeBSD moused program.  This program 
can handle serial mice and inject their events into the mouse
mux.  That way you can have one /dev/mouse on you system and have
all mouse events show up there.  If you use a mouse with a driver
in the kernel no configuration is needed, if you use a serial mouse
you need to start moused with the right arguments to handle the mouse.

USB mice is an example of mice that have a driver in the kernel,
they are fully hot plug and play.  Just plug in a new mouse and it shows
up in /dev/mouse.  /dev/mouse can then be used by X or any other 
program that needs the mouse.

The situation for keyboards is similar, but it is not yet possible to
glue a mux device to the console.  It would be cool to do this,
because then keyboards would also be hot pluggable and usable.

If you leave out the pseudo device from the config file this extra
driver will not cost you a byte.

What do you think?  Is this acceptable to people?

        -- Lennart