xref: /netbsd-src/share/man/man4/man4.atari/ms.4 (revision 2a399c6883d870daece976daec6ffa7bb7f934ce)
1.\"	$NetBSD: ms.4,v 1.2 1996/04/25 06:03:47 leo 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
44
45The Atari mouse driver supports both the original Atari mouse and the third
46party 3-button mouse that has its middle button connected to the up-switch
47of the second joystick port. To accomodate X11 users with a standard mouse,
48the driver is able to emulate the middle button. See the section on ioctls
49for more info.
50.Pp
51.Bl -tag
52.It Sy Supported ioctls
53.Bl -tag -width MIOCG3B_EMUL -compact
54.It MIOCS3B_EMUL
55This ioctl turns the middle button emulation on or off depending on its
56argument. The middle button event is triggered by simultaneously pressing
57the left and right buttons. The default emulation mode is on.
58.Pp
59Note that the emulation status is retained across multiple open/close calls.
60.It MIOCG3B_EMUL
61This ioctl allows you to get the actual status of the emulation mode.
62.El
63.El
64.Bl -tag
65.It Sy Interface description
66The Atari mouse interface works on a minimal emulation of Sun's Firm_event
67structures. The primary reason for this is easy interfacing with X11.
68
69.Pp
70The movement and button events are read as structures of the form:
71.Bd -literal
72typedef struct Firm_event {
73	u_int_16_t      id;       /* key or MS_* or LOC_[XY]_DELTA   */
74	u_int_16_t      pad;      /* unused                          */
75	int_16_t        value;    /* VKEY_{UP,DOWN} or locator delta */
76	struct timeval  time;     /* time stamp of the event         */
77}
78
79.Pp
80The values of 'id' concerning the mouse:
81.Bd -literal
82#define MS_LEFT         0x7f20    /* left mouse button   */
83#define MS_MIDDLE       0x7f21    /* middle mouse button */
84#define MS_RIGHT        0x7f22    /* right mouse button  */
85#define LOC_X_DELTA     0x7f80    /* mouse delta-X       */
86#define LOC_Y_DELTA     0x7f81    /* mouse delta-Y       */
87.Ed
88
89.Pp
90The values of 'value' concerning a button event:
91.Bd -literal
92#define VKEY_UP         0         /* a button went up   */
93#define VKEY_DOWN       1         /* a button went down */
94.Ed
95
96.Pp
97.Sh FILES
98.Bl -tag -width /dev/mouse0 -compact
99.It Pa /dev/mouse0
100The real mouse device
101.It Pa /dev/mouse
102The currently active mouse device
103.El
104.El
105.Sh BUGS
106The time interval that defines 'simultaneous' cannot be set.
107