QNX Community Resources
inputtrap
Detect input devices and start Input Manager
Syntax:
inputtrap [-f device] [-k] [-l device] [-s] [-V...]
[-v...] [-X class]... [-x device]...
[start|query]
Options:
- -f device
- Probe for device first.
- -k
- Don't probe for a keyboard.
- -l device
- ("el") Probe for device last.
- -s
- Safe mode (probe only for a keyboard).
- -V
- Pass a -v to Input.
- -v
- Increment verbosity level by 1.
- -X class
- Exclude any devices of class from scan.
- -x device
- Exclude device from scan.
- query
- Print command line necessary to start Input. If neither start nor query is specified, query is assumed.
- start
- Start driver.
Description:
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:
| Driver module | Detected? |
|---|---|
| ahl | no |
| airmse | yes |
| busmse | yes |
| carrol | bus interface adapters only |
| compaq | no |
| cyber | no |
| devmse | yes |
| dyna | no |
| gm | no |
| intellitch | bus interface adapters only |
| kbd | yes |
| microtch | no |
| msoft | yes |
| msys | yes |
| ps2 | yes |
| smartset | bus interface adapters only |
| wacom | no |
If inputtrap can't find your device, see "Setting up a pointing device" in the Configuring Photon chapter.
Examples:
Do a check for input devices. Once one of each class of device has been recognized, spawn Input with an appropriate command line:
inputtrap
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:
inputtrap query
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. |



