xinput
systemLinux/Unix
The xinput command is one of the most frequently used commands in Linux/Unix-like operating systems. xinput A utility to configure and test X input devices
Quick Reference
Command Name:
xinput
Category:
system
Platform:
Linux/Unix
Basic Usage:
xinput [options] [arguments]
Common Use Cases
Syntax
xinput [options] [command] [device]
Options
| Command | Description |
|---|---|
version |
Show the version of the program |
list [--short | --name-only | --id-only] |
List available devices with their information |
get-feedbacks device |
List device feedback states |
set-pointer device |
Change a device to a pointer device |
set-integer-feedback device feedback value |
Set feedback's value |
set-button-map device map_button_1 [...] |
Set button mapping for a device |
get-button-map device |
Get button mapping for a device |
set-pointer-buttons device num_buttons |
Set number of buttons for a pointer device |
set-mode device ABSOLUTE|RELATIVE |
Set device mode |
query-state device |
Query device state |
test device |
Enter test mode to see device events |
test-xi2 [--root] device |
Enter XI2 test mode to see device events |
list-props device [--short || --type] |
List device properties |
set-prop device property value |
Set device property value |
watch-props device |
Watch device property changes |
delete-prop device property |
Delete device property |
set-float-prop device property val [val ...] |
Set a float property for a device |
set-int-prop device property format val [val ...] |
Set an integer property for a device |
set-atom-prop device property val [val ...] |
Set an atom property for a device |
disable device |
Disable a device |
enable device |
Enable a device |
map-to-output device output |
Map device to the specified output |
list-hierarchy [--short] |
List device hierarchy |
reattach device master |
Reattach device to specified master device |
float device |
Remove device from master device |
create-master name |
Create a pair of master devices |
remove-master id [Floating|AttachToMaster masterId] |
Remove a master device |
Global Options
| Option | Description |
|---|---|
--display display |
X display to use |
--help |
Show usage |
-v, --version |
Show version |
Examples
How to Use These Examples
The examples below show common ways to use the xinput command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
List all input devices
xinput list
Get device information
xinput list-props "Logitech USB Optical Mouse"
Disable a device
xinput disable 12
Enable a device
xinput enable 12
Advanced Examples:
Change a device property
xinput set-prop "Synaptics TouchPad" "libinput Tapping Enabled" 1
Set mouse speed/acceleration
xinput set-prop "Logitech USB Optical Mouse" "libinput Accel Speed" 0.5