1 .\" $NetBSD: ms.4,v 1.4 2002/01/15 01:30:39 wiz Exp $
3 .\" Copyright (c) 1995 Leo Weppelman
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 .Cd "pseudo-device mouse 1"
38 The Atari mouse driver supports both the original Atari mouse and the third
39 party 3-button mouse that has its middle button connected to the up-switch
40 of the second joystick port. To accommodate X11 users with a standard mouse,
41 the driver is able to emulate the middle button. See the section on ioctls
44 .Bl -tag -width MIOCG3B_EMUL -compact
46 This ioctl turns the middle button emulation on or off depending on its
47 argument. The middle button event is triggered by simultaneously pressing
48 the left and right buttons. The default emulation mode is on.
50 Note that the emulation status is retained across multiple open/close calls.
52 This ioctl allows you to get the actual status of the emulation mode.
54 .Ss Interface description
55 The Atari mouse interface works on a minimal emulation of Sun's Firm_event
56 structures. The primary reason for this is easy interfacing with X11.
58 The movement and button events are read as structures of the form:
60 typedef struct Firm_event {
61 u_int_16_t id; /* key or MS_* or LOC_[XY]_DELTA */
62 u_int_16_t pad; /* unused */
63 int_16_t value; /* VKEY_{UP,DOWN} or locator delta */
64 struct timeval time; /* time stamp of the event */
68 The values of 'id' concerning the mouse:
70 #define MS_LEFT 0x7f20 /* left mouse button */
71 #define MS_MIDDLE 0x7f21 /* middle mouse button */
72 #define MS_RIGHT 0x7f22 /* right mouse button */
73 #define LOC_X_DELTA 0x7f80 /* mouse delta-X */
74 #define LOC_Y_DELTA 0x7f81 /* mouse delta-Y */
77 The values of 'value' concerning a button event:
79 #define VKEY_UP 0 /* a button went up */
80 #define VKEY_DOWN 1 /* a button went down */
83 .Bl -tag -width /dev/mouse0 -compact
87 The currently active mouse device
90 The time interval that defines 'simultaneous' cannot be set.