autodetect mouse and start appropriate driver (QNX)
Print command line necessary to start driver:
mousetrap [options] [query]Start driver:
mousetrap [options] start
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
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:
inport (microsoft) bus mice OR ATI mice, microsoft bus mice (old version)
ps/2 mouse
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.
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.