1.\" $NetBSD: wsmouse.4,v 1.17 2006/10/31 22:01:09 wiz Exp $ 2.\" 3.\" Copyright (c) 1999 4.\" Matthias Drochner. All rights reserved. 5.\" 6.\" Copyright (c) 2006 7.\" Julio M. Merino Vidal. All rights reserved. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.Dd October 31, 2006 31.Os 32.Dt WSMOUSE 4 33.Sh NAME 34.Nm wsmouse 35.Nd generic mouse support in wscons 36.Sh SYNOPSIS 37.Cd "wsmouse* at pms? mux 0" 38(PS/2 mouse, including ``IntelliMouse''-compatible wheel mice) 39.Cd "wsmouse* at ums? mux 0" 40(USB mouse) 41.Cd "wsmouse* at lms? mux 0" 42(Logitech bus mouse, i386 only) 43.Cd "wsmouse* at mms? mux 0" 44(Microsoft InPort mouse, i386 only) 45.Cd "wsmouse0 at ams? mux 0" 46(Apple ADB mouse) 47.Cd "wsmouse* at btms? mux 0" 48(Bluetooth mouse) 49.Sh DESCRIPTION 50The 51.Nm 52driver is an abstraction layer for mice within the 53.Xr wscons 4 54framework. 55It is attached to the hardware specific mouse drivers and 56provides a character device interface which returns 57.Fa struct wscons_event 58via 59.Xr read 2 . 60For use with X servers, 61.Dq mouse events 62can be generated. 63.Pp 64The 65.Xr wsconsctl 8 66utility gives access to several configurable details that affect this 67driver. 68.Ss Ioctls 69The following 70.Xr ioctl 2 71calls are provided by the 72.Nm 73driver or by devices which use it. 74Their definitions are found in 75.Pa dev/wscons/wsconsio.h . 76.Bl -tag -width Dv 77.It Dv WSMOUSEIO_GETREPEAT Pq Li "struct wsmouse_repeat" 78Retrieve the current automatic button repeating configuration. 79The structure returned is as follows: 80.Bd -literal -offset indent 81struct wsmouse_repeat { 82 unsigned long wr_buttons; 83 unsigned int wr_delay_first; 84 unsigned int wr_delay_decrement; 85 unsigned int wr_delay_minimum; 86}; 87.Ed 88.Pp 89The 90.Va wr_buttons 91field is a bit mask that specifies which buttons send press and 92release events periodically while they are physically held down. 93The least significant bit corresponds to button 0. 94.Pp 95The other three fields describe the frequency upon which these 96automatic events are sent. 97.Va wr_delay_first 98specifies the milliseconds before the first repeated event is sent. 99.Va wr_delay_decrement 100is used to calculate the delay between the most recently generated 101event and the forthcoming one: the previous delay is taken and it is 102decreased by the value given in this variable. 103.Va wr_delay_minimum 104specifies the minimum delay, in milliseconds, between two consecutive 105events. 106.Pp 107.It Dv WSMOUSEIO_SETREPEAT Pq Li "struct wsmouse_repeat" 108Set the automatic button repeating configuration. 109See 110.Dv WSMOUSEIO_GETREPEAT 111above for more details. 112.El 113.Sh FILES 114.Bl -item 115.It 116.Pa /dev/wsmouse* 117.It 118.Pa /usr/include/dev/wscons/wsconsio.h . 119.El 120.Sh SEE ALSO 121.Xr btms 4 , 122.Xr lms 4 , 123.Xr mms 4 , 124.Xr pms 4 , 125.Xr uep 4 , 126.Xr ums 4 , 127.Xr wscons 4 , 128.Xr wsmux 4 , 129.Xr moused 8 , 130.Xr wsconsctl 8 , 131.Xr wsmoused 8 , 132.Xr wsmouse 9 133