NetBSD/share/man/man4/man4.i386/busmouse.4

80 lines
2.9 KiB
Groff
Raw Normal View History

.\" $NetBSD: busmouse.4,v 1.1 1996/11/12 19:27:32 explorer Exp $
.\"
.\" Copyright (c) 1996 Michael Graff
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by Michael Graff for the
.\" NetBSD Foundation, Inc.
.\" 3. The name of the author may not be used to endorse or promote products
.\" derived from this software without specific prior written permission
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd November 12, 1996
.Dt busmouse 4
.Os NetBSD 1.2B
.Sh NAME
.Nm busmouse
.Nd
Busmouse protocol
.Sh DESCRIPTION
Many of the mouse drivers provided internally convert the protocol
the mouse uses to a common busmouse protocol.
.Pp
Many of the drivers allow information to be retrieved from the driver using
an
.Xr ioctl 2
call or by reading the device directly using
.Xr read 2 .
.Pp
The MOUSEIOCREAD ioctl, found in machine/mouse.h, returns a struct mouseinfo.
.Pp
When reading the mouse device directly, each change of button state or
mouse movement generates a five byte event.
The bytes contain:
.Bl -tag -width -offset indent -compact
.It 1
Button status. (u_char)
.It 2
Right/left movement. Positive values indicate right, negative
left. (char)
.It 3
Up/down movement. Positive values indicate up, negative down. (char)
.It 4
Reserved. Should be zero.
.It 5
Reserved. Should be zero.
.El
.Pp
The direction bytes are signed characters, giving a range of +127 to -127.
A positive value indicates movement to the right or up, and negative left
or down.
.Sh FILES
.Bl -tag -width Pa -compact
.El
.Sh SEE ALSO
.Xr ioctl 2 ,
.Xr read 2 ,
.Xr lms 4 ,
.Xr mms 4 ,
.Xr pms 4