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.
FILES
/dev/mouse
SEE ALSO
win(4S)
Mouse System Mouse Manual (Sun 800-0419)
User’s Guide for the Sun Workstation Mouse Subsystem (Sun 800-0402)
Sun Release 1.1 — Last change: 21 March 1984