kdmouse(7) INTERACTIVE UNIX System kdmouse(7)
NAME
kdmouse - built-in mouse device interface
DESCRIPTION
The kdmouse driver supports Micro Channel architecture mice
and compatibles (such as the IBM PS/2 mouse) on machines
with built-in mouse interfaces such as the COMPAQ 20e and
the IBM PS/2 model 80. It allows applications to obtain
information about the mouse's movements and the status of
its buttons.
Programs are able to read directly from the device. The
data returned corresponds to the byte sequences as defined
in the IBM PS/2 Technical Reference Manual. Programs are
not able to write to the kdmouse device.
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 struc-
ture 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 BUT3STAT 1/* button 3 status (1=down) */
#define BUT2STAT 2/* button 2 status (1=down) */
#define BUT1STAT 4/* button 1 status (1=down) */
#define BUT3CHNG 8/* button 3 changed? (1=yes) */
#define BUT2CHNG 0x10/* button 2 changed? (1=yes) */
#define BUT1CHNG 0x20/* button 1 changed? (1=yes) */
#define MOVEMENT 0x40/* mouse moved? (1=yes) */
FILES
/dev/kdmouse
ADDED VALUE
This entry, supplied by INTERACTIVE Systems Corporation, is
an extension of UNIX System V.
Rev. Page 1