mousetrap

autodetect mouse and start appropriate driver (QNX)

Syntax:

Print command line necessary to start driver:

    mousetrap [options] [query]

Start driver:

    mousetrap [options] start

Options:

-f type
Check this device first, overriding the default scan.
-m
Force use of older Mouse manager. This option will not scan the UARTs.
-q
Suppress message that a mouse could not be found.
-v
Verbose output to help debugging failed detection.
-x type
Exclude scan for this type of mouse.
type
Type may be: inport, msbus, ps2, uart, serial. The uart and serial types are for the same serial mice; the difference is that uart scans the hardware for UARTs directly, while serial looks for the /dev/sern character-special files established by an already-running serial device driver (Dev.ser).

Examples:

Assuming you have a serial and a bus mouse in your system, the following command skips the bus mouse during the scan, and starts the driver for the serial mouse.

    mousetrap -x inport start

Description:

The mousetrap utility starts the appropriate driver to ensure that the /dev/mouse device exists. If this device is already present, mousetrap will not start the driver.

If the query argument is specified, mousetrap prints, but does not execute, the command lines it believes to be necessary to make that mouse work.

If the start argument is specified, the command line is executed and the appropriate driver is started.

The mousetrap program scans for mice in a particular order, and stops as soon as one is found. If you have more than one mouse installed, you will need to start the driver for the second mouse by hand. The order in which mousetrap scans for mice is the following:

  1. BUS mice

    inport (microsoft) bus mice OR ATI mice, microsoft bus mice (old version)

  2. PS/2

    ps/2 mouse

  3. Serial mice

    microsoft OR Logitech "mouse man" serial mouse, logitech C7 serial mouse

See the mousetrap usage message (use mousetrap) for a definitive list of currently supported mouse types.

The mousetrap utility starts mouse support only for text mode applications which use the mouse , for QNX Windows and for some older versions of the X window system for QNX. The inputtrap utility provided with Photon and the X window system provides similar functionality for those products.

Exit status:

Mousetrap waits a reasonable amount of time for the drivers to start. If any driver fails or mousetrap times out, an error is returned, otherwise success is returned.

0
The mousetrap command was successful.
>0
An error occurred.

See also: