Joystick Drivers

The joystick is an input device that provides absolute position information. It is an additional supported input device and not a replacement for the mouse. For this chapter, the term joystick refers to any absolute position device; for example, a light pen, a digitizing tablet, and a touch screen could all use the joystick driver interface.

All joystick function calls are routed through the WINMM module. WINMM loads the joystick driver and passes application requests to it. The joystick driver must handle the standard tasks handled by all installable drivers, as well as the following joystick-specific tasks:

·Returning the device’s button configuration and movement range

·Returning position and button-press information

·Accepting calibration values and adjusting position information accordingly

The joystick driver interface enables a driver to handle one or two devices. Each device can have one to three axes and one to four buttons. The joystick interface accommodates both analog and digital devices.

Note: Providing drivers for non-interrupt, analog joysticks under Windows NT is difficult because the device polling required by such drivers is incompatible with NT’s operation. The use of digital joysticks is recommended.