LinuxAlternative

Linux · System Tools

xinput

xinput is a command-line tool to configure and test X11 input devices like mice, keyboards, and touchpads.

Open sourceFree
Be the first to rate
License
MIT
Latest version
1.6.4

What is xinput?

xinput lets you list, inspect, and modify input device settings in X11 environments. It's been part of the X.Org suite for over a decade, making it mature and stable. You won't find a GUI—it's designed for terminal use, reflecting its role as a low-level diagnostic and configuration tool.

It's for Linux users comfortable with the command line, especially those troubleshooting input devices or needing fine control over button mapping, device enabling, or calibration. System administrators, tinkerers, and people with unusual hardware benefit most. If you're used to point-and-click tools, this will feel bare-bones.

Compared to Windows tools like X-Mouse Button Control, xinput lacks persistent profiles and real-time remapping. You can change button order or disable devices temporarily, but automation requires scripts. It's less 'user-friendly' but more transparent—what you see is exactly what the X server reports and accepts.

Best for: Users who need direct, scriptable control over X11 input devices via the terminal.

Key features of xinput

  • List all input devices recognized by X11
  • Show detailed properties of a specific device
  • Modify device properties (e.g., button mapping, acceleration)
  • Enable or disable devices at runtime
  • Test device events interactively
  • Support for multitouch and extended input devices
  • Scriptable for automation and startup use

Pros

  • Precise control over input device settings
  • Available on nearly all X11 Linux systems
  • Lightweight and fast
  • Scriptable for custom setups
  • Well-documented with man pages and community examples

Cons

  • No GUI—entirely command-line driven
  • Changes don't persist across reboots without scripting
  • Steeper learning curve for beginners
  • Limited to X11; not available under Wayland by default

Windows programs xinput replaces

How to install xinput on Linux

Ubuntu / Mintsudo apt install xinput
Debiansudo apt install xinput
Fedorasudo dnf install xinput
Arch / Manjarosudo pacman -S xorg-xinput
openSUSEsudo zypper install xinput

Tips for Windows users

If you're used to X-Mouse Button Control, expect less automation. xinput doesn't save profiles—use .xinitrc or udev rules to apply settings at startup. Button remapping is done via 'set-button-map', but test carefully as incorrect values can make devices unusable. Use 'xinput list' first to identify device IDs, then 'xinput get-feedbacks' or 'xinput test' to monitor input.

xinput: frequently asked questions

Does xinput work on Wayland?

No, xinput only works under X11. Wayland composites input at a lower level, so tools like libinput debug-events or swaymsg are used instead.

How do I make xinput changes permanent?

Add your xinput commands to a startup script like ~/.xprofile or ~/.xinitrc. Systemd user services or desktop environment autostart entries also work.

Can I remap mouse buttons with xinput?

Yes. Use 'xinput get-button-map' to see current mapping and 'xinput set-button-map' to change it. Not all devices support reordering.

Why doesn't my device show up in xinput?

The device might be handled outside X11 (e.g., by kernel or Wayland). Check with 'libinput list-devices' or ensure you're running an X11 session.

Updated