Home · All Classes · Grouped Classes · Annotated · Functions

Mouse Pointer Handling

Pointer handling in Qtopia works for both mouse and mouse-like devices such as touch panels and trackballs. The various drivers can be enabled and disabled using the configure script. For example:

    ./configure -extra-qtopiacore-config -qt-mouse-tslib

To see the available mouse drivers run:

    <qtopia-root-dir>/qtopiacore/qt/configure -embedded -help |grep -a1 mouse

Note: By default only the PC mouse driver is enabled.

Available Drivers

Qtopia Core provides drivers for the MouseMan, IntelliMouse, Microsoft, NEC Vr41XX, Linux Touch Panel and Yopy protocols as well as the universal touch screen library, tslib.

Note: The driver must be specified explicitly for systems with a modem otherwise Qtopia Core may attempt to try to auto-detect the mouse device and thereby disrupt the modems operation.

Provided that the "pc" mouse driver is enabled, Qtopia Core will try to auto-detect the mouse device if it is one of the supported types on /dev/psaux or one of the /dev/ttyS? serial lines. If multiple mice are detected, all may be used simultaneously. Note that Qtopia Core does not support auto-detection of touch panels in which case the driver must be specified explicitly to determine which device to use.

Other drivers can be added by deriving from the QWSMouseHandler and QMouseDriverPlugin classes and using Qt's plugin mechanism.

This can be part of a device configuration profile. For an example implementation, see <qtopia-root-dir>/devices/examples/src/plugins/qtopiacore/mousedrivers

For a tutorial on how to add a new keyboard driver plugin see : Tutorial: Implementing a Device Plug-in

Specifying a Driver

To specify which driver to use, set the QWS_MOUSE_PROTO environment variable. For example (if the current shell is bash, ksh, zsh or sh):

             export QWS_MOUSE_PROTO=<driver>:<device>

The <driver> argument is either MouseMan, IntelliMouse, Microsoft, VR41xx, LinuxTP, Yopy or Tslib, and the <device> argument is typically /dev/mouse for mouse devices and /dev/ts for touch panels. Note that the latter argument is optional.


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3