Event generating hardware
Event devices can be categorized as
relative locator, absolute locator, or string.
The
event(FP)
manual page lists the defined constants
that represent these classes.
Most mice and trackballs
are examples of relative locator devices.
They are termed ``relative'' devices
because the mouse generates events when it is moved relative
to its previous position. The motion of the mouse generates the events,
not the final position of the mouse. Relative locations are reported as
signed 32-bit quantities.
Bit-pads and light pens are absolute locator devices. The pens are used
on a sensitive pad, and the events are generated by the absolute position
of the pen on the pad, not the relative motion of the pen. Absolute
locations are reported as unsigned 32-bit quantities.
The keyboard is a string graphics input device. This means that the events
will be generated by pressing a key on the keyboard, such as an arrow key.
Some devices can operate in multiple modes. For example, some mice can function
in bitpad mode with the appropriate bitpad software.
Many event devices have buttons; others do not. Three-button devices are viewed as having a left button, a middle button, and a right button. Two-button devices do not have a middle button. One-button devices have only a middle button. Bits representing buttons are set to 1 when the button is depressed. Up to eight buttons can be read at a time. The event(FP) manual page lists macros used to identify buttons.