libinput como alternativa Linux ao X-Mouse Button Control
Atualizado em
Nossa avaliação
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.
- Licença
- MIT
- Preço
- Grátis
- Versão mais recente
- 1.32.0
- Avaliação
- —
O que funciona igual
- 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
O que muda
- 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
Abrindo seus arquivos do X-Mouse Button Control
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.
Trocando o X-Mouse Button Control pelo libinput, passo a passo
- Identify which mouse buttons need remapping using 'libinput list-devices'
- Use udev hwdb rules or tools like 'evdev' to remap buttons system-wide
- For per-application behavior, script with xbindkeys or sxhkd triggered by window focus
- Bind remapped buttons to keystrokes using 'xinput' or 'evtest' in combination with 'xdotool'
- Test persistence after reboot by placing rules in /etc/udev/hwdb.d/ or using desktop autostart
Principais recursos do 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
Como instalar o libinput no Linux
sudo apt install libinputsudo apt install libinputsudo dnf install libinputsudo pacman -S libinput-toolssudo zypper install libinputPerguntas frequentes
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.