mouse(7) —
NAME
mouse − mouse device interface
DESCRIPTION
The mouse driver supports the Microsoft Inport Bus Mouse on the AT release. It allows applications to obtain information about the mouse’s movements and the status of its buttons.
Ioctl Call
MOUSEIOCREAD
This call returns status information about the mouse buttons and the mouse’s relative movement since the previous MOUSEIOCREAD (or since mouse initialization, for the first MOUSEIOCREAD). The argument is the address of a mouseinfo structure; the following structure definition and #defines may be found in <sys/mouse.h>:
struct mouseinfo {
unsigned char status;/∗ see definitions below∗/
char xmotion, ymotion;/∗ between −128 and 127∗/
}
#define BUT3STAT1 /∗ button 3 status (1=down) ∗/
#define BUT2STAT2 /∗ button 2 status (1=down) ∗/
#define BUT1STAT4 /∗ button 1 status (1=down) ∗/
#define BUT3CHNG8 /∗ button 3 changed? (1=yes) ∗/
#define BUT2CHNG0x10 /∗ button 2 changed? (1=yes) ∗/
#define BUT1CHNG0x20 /∗ button 1 changed? (1=yes) ∗/
#define MOVEMENT0x40 /∗ mouse moved? (1=yes) ∗/
FILES
/dev/mouse
\*U — Version 1.0