inputattach
Attach serial port devices as input devices
TLDR
Attach a Pulse8 CEC device to the input system
Display help
SYNOPSIS
inputattach [-v] [-d] [-L] [-p plugin] [-c config] [-version] [-?] serial_device {type|plugin}
PARAMETERS
-v, --verbose
Enable verbose output to stdout/stderr for debugging.
-d, --daemon
Daemonize: fork to background and detach from terminal.
-L, --log
Redirect logs to syslog instead of stderr.
-p plugin, --plugin=plugin
Load specified plugin instead of builtin type.
-c config, --config=config
Use alternate configuration file.
-version
Display version information and exit.
-?, --help
Show usage summary and exit.
DESCRIPTION
inputattach is a utility for initializing serial-attached input peripherals like mice, tablets, joysticks, and touchscreens, making them available to the Linux kernel's evdev input subsystem via /dev/input/event* devices. It translates raw serial data into standardized input events, enabling compatibility with X11, Wayland, and other input-handling software.
Run as root, it continuously polls the specified serial port (e.g., /dev/ttyS0) according to the device type parameter. Common uses include reviving legacy hardware in servers, embedded systems, or retro setups. The daemon mode (-d) allows persistent background operation, often via systemd or init scripts.
Plugin support (-p) extends functionality for custom or proprietary devices, while config files (-c) permit fine-tuned settings like baud rates. Verbose logging aids debugging mismatched baud rates or protocols. This tool bridges old serial hardware with modern input stacks, though USB successors have reduced its necessity.
CAVEATS
Requires root privileges. Serial device must be unused and at matching baud rate. Wrong type can cause data corruption or hangs. Not for USB/Bluetooth devices; use udev rules instead. May conflict with getty on console ports.
HISTORY
Developed by Vojtech Pavlik circa 2001-2003 as part of linux-input-tools for early evdev support. Maintained in distributions like Debian/Fedora. Plugin framework added post-2010 for extensibility. Now in libevdev ecosystem.


