MOUSE(4S) — SPECIAL FILES
NAME
mouse − Sun mouse
SYNOPSIS
pseudo-device ms3
DESCRIPTION
The mouse interface provides access to the Sun Workstation mouse.
The mouse incorporates a microprocessor which generates a byte-stream protocol encoding mouse motions.
Each mouse sample in the byte stream consists of three bytes: the first byte gives the button state with value 0x87|~but, where but is the low three bits giving the mouse buttons, where a 0 (zero) bit means that a button is pressed, and a 1 (one) bit means a button is not pressed. Thus if the left button is down the value of this sample is 0x83, while if the right button is down the byte is 0x86.
The next two bytes of each sample give the x and y delta’s of this sample as signed bytes. The mouse uses a lower-left coordinate system, so moves to the right on the screen yield positive x values and moves down the screen yield negative y values.
The beginning of a sample is identifiable because the delta’s are constrained to not have values in the range 0x80-0x87.
The mouse can be used as a device that emits Firm_events as specified by the protocol of a Virtual User Input Device. It understands VUIDSFORMAT, VUIDGFORMAT, VUIDSADDR and VUIDGADDR ioctls (see reference below).
FILES
/dev/mouse
SEE ALSO
The SunView System Programmer’s Guide
Sun Release 3.5 — Last change: 18 December 1985