Subject: On wscons, mice, and keyboards
To: None <current-users@NetBSD.ORG>
From: Lennart Augustsson <augustss@cs.chalmers.se>
List: current-users
Date: 07/27/1998 23:30:50
The current wscons design has a problem as far as I can tell.
There is no possibility to have multiple mice (everything I say
here applies to keyboards as well) report events to the same
device.

I currently have three mice connected to my computer and I would
like to be able to use them interchangebly, so this is what I'd
like to have in the config file:

ums0 at uhub?
ums1 at uhub?
psm0 at pckbc?
wsmouse0 at ums0
wsmouse0 at ums1
wsmouse0 at psm0

That is, wsmouse0 (i.e., /dev/wms0) will get the events from
all three mice.  This may not always be what you want, but it
often is.  It would enable me to just plug in a new USB mouse
and then it would be available for use without a single command.

Well, the autoconf model that NetBSD has does not support multiple
parents for a device, so we cant have this.

Have there been similar problems before?  How were they solved?

If there is no other solution I have a slightly hacky solution.
We introduce a new locator for wsmouse that tells which device
it is supposed to report its events to.  So we would have

ums0 at uhub?
ums1 at uhub?
psm0 at pckbc?
wsmouse0 at ums0 destination 0
wsmouse1 at ums1 destination 0
wsmouse2 at psm0 destination 0

(Of course you can use * and ? as usual, I'm just being explicit here.)

This would direct wsmouse1 and wsmouse2 to send their events to
wsmouse0.  Any attempts to open /dev/wms1 and /dev/wms2 would
fail as if they were not attached, whereas /dev/wms0 would report
all events.

The implementation of this will be a little messy, but I think
it's quite possible to do.  I have a fairly good idea of how
to do it.  And it might even work. :-)

What do you think?

        -- Lennart