summaryrefslogtreecommitdiff
path: root/share/man/man4/man4.atari/ms.4
blob: 76b864f90200816cdb12ca3c359a25a1b0512023 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
.\"	$OpenBSD: ms.4,v 1.5 2001/01/29 02:11:11 niklas Exp $
.\"	$NetBSD: ms.4,v 1.2 1996/04/25 06:03:47 leo Exp $
.\"
.\" Copyright (c) 1995 Leo Weppelman
.\" 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 Leo Weppelman.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may 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 October 16, 1995
.Dt MS 4 Atari
.Os
.Sh NAME
.Nm ms
.Nd
.Tn Atari
mouse interface
.Sh SYNOPSIS
.Cd "pseudo-device mouse 1"
.Sh DESCRIPTION
The Atari mouse driver supports both the original Atari mouse and the third
party 3-button mouse that has its middle button connected to the up-switch
of the second joystick port. To accomodate X11 users with a standard mouse,
the driver is able to emulate the middle button. See the section on ioctls
for more info.
.Pp
.Bl -tag -width xx
.It Sy Supported ioctls
.Bl -tag -width MIOCG3B_EMUL -compact
.It MIOCS3B_EMUL
This ioctl turns the middle button emulation on or off depending on its
argument. The middle button event is triggered by simultaneously pressing
the left and right buttons. The default emulation mode is on.
.Pp
Note that the emulation status is retained across multiple open/close calls.
.It MIOCG3B_EMUL
This ioctl allows you to get the actual status of the emulation mode.
.El
.El
.Bl -tag -width xx
.It Sy Interface description
The Atari mouse interface works on a minimal emulation of Sun's Firm_event
structures. The primary reason for this is easy interfacing with X11.
.Pp
The movement and button events are read as structures of the form:
.Bd -literal
typedef struct Firm_event {
	u_int_16_t      id;       /* key or MS_* or LOC_[XY]_DELTA   */
	u_int_16_t      pad;      /* unused                          */
	int_16_t        value;    /* VKEY_{UP,DOWN} or locator delta */
	struct timeval  time;     /* time stamp of the event         */
}
.Pp
The values of 'id' concerning the mouse:
.Bd -literal
#define MS_LEFT         0x7f20    /* left mouse button   */
#define MS_MIDDLE       0x7f21    /* middle mouse button */
#define MS_RIGHT        0x7f22    /* right mouse button  */
#define LOC_X_DELTA     0x7f80    /* mouse delta-X       */
#define LOC_Y_DELTA     0x7f81    /* mouse delta-Y       */
.Ed
.Pp
The values of 'value' concerning a button event:
.Bd -literal
#define VKEY_UP         0         /* a button went up   */
#define VKEY_DOWN       1         /* a button went down */
.Ed
.Sh FILES
.Bl -tag -width /dev/mouse0 -compact
.It Pa /dev/mouse0
real mouse device
.It Pa /dev/mouse
currently active mouse device
.El
.El
.Sh BUGS
The time interval that defines 'simultaneous' cannot be set.