QNX Community Resources
Detect input devices and start Input Manager
inputtrap [-f device] [-k] [-l device] [-s] [-V...] [-v...] [-X class]... [-x device]... [start|query]
- -f device
- Probe for device first.
- Don't probe for a keyboard.
- -l device
- ("el") Probe for device last.
- Safe mode (probe only for a keyboard).
- Pass a -v to Input.
- Increment verbosity level by 1.
- -X class
- Exclude any devices of class from scan.
- -x device
- Exclude device from scan.
- Print command line necessary to start Input. If neither start nor query is specified, query is assumed.
- Start driver.
The inputtrap utility probes for input devices and writes invocation commands along with the appropriate options and arguments for starting the found devices to the /etc/config/trap/input.node file. The probing order is as follows:
- Keyboard (kbd).
- Devices owned by another manager; if found, terminate probing (devmse).
- Inport bus mouse (busmse).
- Microsoft bus mouse (busmse).
- PS/2 mouse (ps2) .
- UART-connected relative coordinate pointing devices (uart) .
- fd-connected relative coordinate pointing devices (fd) .
- UART- or fd-connected air mouse (airmse).
- Elographics bus controller (elo).
The device names (given above) are recognized as arguments to -f and -x.
If a /etc/config/trap/input.node file exists, inputtrap uses the contents of this file as arguments to Input.
Although Photon supports the following input hardware drivers, inputtrap doesn't detect all of the associated hardware devices:
|carrol||bus interface adapters only|
|intellitch||bus interface adapters only|
|smartset||bus interface adapters only|
If inputtrap can't find your device, see "Setting up a pointing device" in the Configuring Photon chapter.
Do a check for input devices. Once one of each class of device has been recognized, spawn Input with an appropriate command line:
The first device for each class of device recognized will be chosen (recognized classes are keyboard, relative, and absolute coordinate pointing devices). If a pointing device manager is running (i.e. /dev/touch or /dev/mouse exists), then assume this resource manager is properly configured - use its pointing devices and terminate probing.
|The presence of /dev/kbd will not terminate probing.|
Do a check (as above) for pointing devices. Don't start the driver, but print the command line required to start the driver:
Do a check (as above) for input devices, starting with a check for a UART-based pointing device. This can be useful when you want a serial device to be detected instead of a builtin pointing device (e.g. on laptops and notebooks with builtin PS/2-style mice):
inputtrap -f uart start
Given the following /etc/config/trap/input.node file:
kbd fd -d/dev/kbd intellitch -z uart -2
running inputtrap start will start Input with an fd-based keyboard and an intellitch protocol, getting its input directly from a UART on COM port 2 (port 2f8 IRQ 3).
|Adding invalid information to the input.node file can cause the system to hang. If your hardware changes, remember to remove the old input.node file.|