Subject: Re: wsmouse programming
To: Julio Merino <juli@merino.net>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: netbsd-users
Date: 06/13/2001 10:37:07
Julio Merino <juli@merino.net> writes:

> I'm trying to program a mouse trought wsmouse. Any idea about where
> can I find info about it's protocol? It's maybe the same like the
> one in wskbd (as explained in another message in this list)?

Yes, wsmouse uses the same interface to user programs as wskbd, and
it's a series of wscons_event structures as described in
<dev/wscons/wsconsio.h>.

> Do I have to directly read from /dev/wsmouse0 ?

You can read directly from that wsmouse device directly, as long as
you aren't using the wscons multiplexer (wsmux); if you are, read from
/dev/wsmouse (no digit!) instead.

> BTW, does wsmouse support serial mice in i386? I don't see this in
> the man page :p

Nope, it doesn't. The infrastructure is there (the WSMUX_INJECTEVENT
ioctl), but nobody's bothered to write the daemon that reads from the
serial port and injects mouse events into the wsmouse stream.

        - Nathan