xref: /netbsd/share/man/man4/man4.atari/ms.4 (revision bf9ec67e)
1.\"	$NetBSD: ms.4,v 1.4 2002/01/15 01:30:39 wiz Exp $
2.\"
3.\" Copyright (c) 1995 Leo Weppelman
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
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.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by Leo Weppelman.
17.\" 4. Neither the name of the University nor the names of its contributors
18.\"    may be used to endorse or promote products derived from this software
19.\"    without specific prior written permission.
20.\"
21.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31.\"
32.\"
33.Dd October 16, 1995
34.Dt MS 4 atari
35.Os
36.Sh NAME
37.Nm ms
38.Nd
39.Tn Atari
40mouse interface
41.Sh SYNOPSIS
42.Cd "pseudo-device mouse 1"
43.Sh DESCRIPTION
44The Atari mouse driver supports both the original Atari mouse and the third
45party 3-button mouse that has its middle button connected to the up-switch
46of the second joystick port. To accommodate X11 users with a standard mouse,
47the driver is able to emulate the middle button. See the section on ioctls
48for more info.
49.Ss Supported ioctls
50.Bl -tag -width MIOCG3B_EMUL -compact
51.It MIOCS3B_EMUL
52This ioctl turns the middle button emulation on or off depending on its
53argument. The middle button event is triggered by simultaneously pressing
54the left and right buttons. The default emulation mode is on.
55.Pp
56Note that the emulation status is retained across multiple open/close calls.
57.It MIOCG3B_EMUL
58This ioctl allows you to get the actual status of the emulation mode.
59.El
60.Ss Interface description
61The Atari mouse interface works on a minimal emulation of Sun's Firm_event
62structures. The primary reason for this is easy interfacing with X11.
63.Pp
64The movement and button events are read as structures of the form:
65.Bd -literal
66typedef struct Firm_event {
67	u_int_16_t      id;       /* key or MS_* or LOC_[XY]_DELTA   */
68	u_int_16_t      pad;      /* unused                          */
69	int_16_t        value;    /* VKEY_{UP,DOWN} or locator delta */
70	struct timeval  time;     /* time stamp of the event         */
71}
72.Ed
73.Pp
74The values of 'id' concerning the mouse:
75.Bd -literal
76#define MS_LEFT         0x7f20    /* left mouse button   */
77#define MS_MIDDLE       0x7f21    /* middle mouse button */
78#define MS_RIGHT        0x7f22    /* right mouse button  */
79#define LOC_X_DELTA     0x7f80    /* mouse delta-X       */
80#define LOC_Y_DELTA     0x7f81    /* mouse delta-Y       */
81.Ed
82.Pp
83The values of 'value' concerning a button event:
84.Bd -literal
85#define VKEY_UP         0         /* a button went up   */
86#define VKEY_DOWN       1         /* a button went down */
87.Ed
88.Sh FILES
89.Bl -tag -width /dev/mouse0 -compact
90.It Pa /dev/mouse0
91The real mouse device
92.It Pa /dev/mouse
93The currently active mouse device
94.El
95.Sh BUGS
96The time interval that defines 'simultaneous' cannot be set.
97