Linux command
xinput 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List
xinput list
Disable
xinput disable id
Enable
xinput enable id
List properties
xinput list-props id
Set property
xinput set-prop id property value
Detach
xinput float id
Reattach
xinput reattach id master_id
Test
xinput test id
说明
xinput is a utility to list available input devices, query information about a device, and change input device settings in the X Window System. It provides control over keyboard, mouse, touchpad, and other input devices.
参数
- list
- List all input devices with their IDs
- enable ID
- Enable the input device
- disable ID
- Disable the input device
- list-props ID
- List configurable properties of a device
- set-prop ID PROPERTY VALUE
- Set property value (supports 8, 16, or 32-bit formats)
- watch-props ID
- Monitor property changes in real-time
- query-state ID
- Query the current state of a device
- set-mode ID MODE
- Set device mode to ABSOLUTE or RELATIVE
- set-button-map ID MAP
- Remap physical buttons to logical buttons
- map-to-output ID OUTPUT
- Restrict device to specific display output
- float ID
- Detach a slave device from its master
- reattach ID MASTER_ID
- Reattach a slave device to a different master
- create-master NAME
- Create a new master device pair
- remove-master ID
- Remove a master device and its paired device
- test ID
- Register for extended events and display data
FAQ
What is the xinput command used for?
xinput is a utility to list available input devices, query information about a device, and change input device settings in the X Window System. It provides control over keyboard, mouse, touchpad, and other input devices.
How do I run a basic xinput example?
Run `xinput list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does list do in xinput?
List all input devices with their IDs