Linux command
inputattach 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Example
sudo inputattach --pulse8-cec /dev/ttyACM0
Example
sudo inputattach --baud 19200 --w8001 /dev/ttyS0
Example
sudo inputattach --daemon --elo /dev/ttyS0
Example
sudo inputattach --microsoft /dev/ttyS0
Example
inputattach --help
说明
inputattach attaches a serial line to the Linux input subsystem. It reads raw bytes from the named serial device, decodes them according to the chosen protocol, and feeds the resulting events into the kernel where they appear as standard input devices under `/dev/input/`. The program is part of the linuxconsoletools package. After attaching, devices can be used with libinput, evdev, X.Org, or any other consumer of the Linux input layer. With --daemon, inputattach detaches from the controlling terminal so it can be started from rc scripts or systemd units. For Wacom W8001 hardware, the default rate of 38400 bps covers pen-and-touch and touch-only devices. Pen-only devices need --baud 19200.
参数
- --daemon
- Fork into the background after attaching.
- --always
- Ignore initialization failures and keep the device attached.
- --noinit
- Skip device initialization.
- --baud _RATE_
- Override the default serial baud rate.
- --help
- Display help and list all supported device modes.
- --microsoft, --mouseman, --intellimouse, --mousesystems
- Common serial mouse protocols.
- --elo, --mtouch, --touchit213, --fujitsu
- Serial touchscreen protocols.
- --w8001, --wacom_iv, --wacom_v
- Wacom serial tablet protocols.
- --pulse8-cec, --rainshadow-cec
- HDMI-CEC adapters that present as serial devices.
- --magellan, --spaceorb, --spaceball
- 6-DOF serial input devices.
- --sunkbd, --lkkbd, --stowaway
- Serial keyboard protocols.
FAQ
What is the inputattach command used for?
inputattach attaches a serial line to the Linux input subsystem. It reads raw bytes from the named serial device, decodes them according to the chosen protocol, and feeds the resulting events into the kernel where they appear as standard input devices under `/dev/input/`. The program is part of the linuxconsoletools package. After attaching, devices can be used with libinput, evdev, X.Org, or any other consumer of the Linux input layer. With --daemon, inputattach detaches from the controlling terminal so it can be started from rc scripts or systemd units. For Wacom W8001 hardware, the default rate of 38400 bps covers pen-and-touch and touch-only devices. Pen-only devices need --baud 19200.
How do I run a basic inputattach example?
Run `sudo inputattach --pulse8-cec /dev/ttyACM0` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --daemon do in inputattach?
Fork into the background after attaching.