107 lines
4.0 KiB
Groff
107 lines
4.0 KiB
Groff
.\" $NetBSD: ms.4,v 1.3 2001/04/21 14:32:27 wiz 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 accommodate 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
|
|
.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
|
|
.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
|
|
|
|
.Pp
|
|
.Sh FILES
|
|
.Bl -tag -width /dev/mouse0 -compact
|
|
.It Pa /dev/mouse0
|
|
The real mouse device
|
|
.It Pa /dev/mouse
|
|
The currently active mouse device
|
|
.El
|
|
.El
|
|
.Sh BUGS
|
|
The time interval that defines 'simultaneous' cannot be set.
|