← 返回命令列表

Linux command

uinput 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Preview

uinput -p

Example

sudo uinput -c [path/to/device1.yaml] [path/to/device2.yaml]

Example

sudo uinput -d [/dev/input/eventX] [/dev/input/eventY]

说明

uinput is the writer half of the Interception Tools pipeline: it reads `input_event` records from stdin and dispatches them through a freshly created virtual input device backed by the kernel's `/dev/uinput` interface. The virtual device's capabilities (keys, axes, LEDs, etc.) are derived from the YAML description files passed via `-c`, optionally merged with capabilities cloned from existing devices via `-d`. Typical usage chains it after udevmon and per-device transformation tools (such as caps2esc) so that remapped events are re-injected into the input stack as if they came from a normal device.

参数

-p
Print the merged YAML device description and exit (dry-run preview).
-c _FILE..._
Merge one or more YAML device-description files into the virtual device.
-d _DEVICE..._
Merge capabilities cloned from existing `/dev/input/event*` device nodes.
-h, --help
Display help information.

FAQ

What is the uinput command used for?

uinput is the writer half of the Interception Tools pipeline: it reads `input_event` records from stdin and dispatches them through a freshly created virtual input device backed by the kernel's `/dev/uinput` interface. The virtual device's capabilities (keys, axes, LEDs, etc.) are derived from the YAML description files passed via `-c`, optionally merged with capabilities cloned from existing devices via `-d`. Typical usage chains it after udevmon and per-device transformation tools (such as caps2esc) so that remapped events are re-injected into the input stack as if they came from a normal device.

How do I run a basic uinput example?

Run `uinput -p` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -p do in uinput?

Print the merged YAML device description and exit (dry-run preview).