LinuxAlternative
libinputLinux vs X-Mouse Button ControlWindows

libinput as a Linux alternative to X-Mouse Button Control

Updated

Our verdict

libinput is not a direct replacement for X-Mouse Button Control. It handles low-level input device behavior but lacks GUI tools for per-application remapping or button-to-keystroke actions. Advanced users can use it with command-line tools or udev rules for basic remapping, but it doesn't support context-aware profiles or scripting. If you need window-specific button actions or to run commands based on active apps, libinput alone won't suffice. You’ll need additional tools like xbindkeys, sxhkd, or third-party utilities such as libinput-gestures for partial functionality. Not ideal for users wanting point-and-click mouse customization.

Feature parity30%
License
MIT
Price
Free
Latest version
1.32.0
Rating
—

What works the same

  • Both handle mouse button input at the system level
  • Support remapping of physical mouse buttons to different functions
  • Work across multiple connected mice
  • Apply configurations that persist across reboots when set correctly
  • Integrate with desktop environments and window managers

What is different

  • libinput has no built-in support for triggering actions based on active window or app
  • No GUI for configuration—relies on config files or external tools
  • Cannot simulate complex keystrokes or run shell commands directly
  • Lacks profile switching per application
  • X-Mouse Button Control offers fine-grained scripting; libinput focuses on consistent device handling

Opening your X-Mouse Button Control files

There is no way to import or open X-Mouse Button Control configuration files in libinput. The two systems are fundamentally different in design and storage format. libinput does not use user-editable profile files in the same way, and mappings are typically defined through udev rules or desktop environment settings. Any migration must be manual, translating desired behaviors into Linux-compatible tools.

Switching from X-Mouse Button Control to libinput, step by step

  1. Identify which mouse buttons need remapping using 'libinput list-devices'
  2. Use udev hwdb rules or tools like 'evdev' to remap buttons system-wide
  3. For per-application behavior, script with xbindkeys or sxhkd triggered by window focus
  4. Bind remapped buttons to keystrokes using 'xinput' or 'evtest' in combination with 'xdotool'
  5. Test persistence after reboot by placing rules in /etc/udev/hwdb.d/ or using desktop autostart

Key features of libinput

  • Handles mice, touchpads, keyboards, and touchscreens
  • Built-in gesture support for touchpads (pinch, swipe)
  • Automatic device detection and configuration
  • Supports both X11 and Wayland
  • Low-level button and axis mapping
  • Multitouch and edge scrolling support
  • Device quirks database for hardware-specific fixes
  • Calibration and rotation for touchscreens

How to install libinput on Linux

Ubuntu / Mintsudo apt install libinput
Debiansudo apt install libinput
Fedorasudo dnf install libinput
Arch / Manjarosudo pacman -S libinput-tools
openSUSEsudo zypper install libinput

Frequently asked questions

Can libinput remap mouse buttons like X-Mouse Button Control?

Yes, but only at a system level and without a GUI. You must use udev rules or command-line tools to change button mappings, and changes apply globally, not per app.

Can I make a mouse button do different things in different apps with libinput?

No, not directly. libinput doesn’t support context-aware profiles. You’d need additional tools like xbindkeys with window detection scripts to simulate this behavior.

Is configuration persistent across reboots?

Yes, if you apply mappings via udev hwdb rules or systemd services. Default libinput settings are reapplied at boot, so custom changes must be integrated into system configuration.

2 other alternatives to X-Mouse Button Control

All alternatives to X-Mouse Button Control

Rate libinput

Be the first to rate
Is it a good replacement for X-Mouse Button Control? 8