Remap Mouse/Keyboard Buttons on Linux (Works for X11 and Wayland)

mail
Cyrus Kao
Last modified

Remapping mouse buttons and keyboard keys could be a difficult thing to do in Linux due to the X Window System (X11) and Wayland confusion. However, there is a GUI tool written in Python called Input Remapper can help you remap devices with ease. It supports both protocols, and remembers the configuration after reboot.

input-remapper was formally named as key-mapper.

Installation

Using pip

For other Linux distros or if you preferred managing input-remapper with pip:

sudo pip install --no-binary :all: git+https://github.com/sezanzeb/input-remapper.git
Bash

Enable the service manually:

sudo systemctl enable input-remapper
Bash

Usage

Remap the buttons/keys of your selected device:

Input Remapper
MIDDLE button mapped to LEFT with autoload turned on

Don't forget to click apply after configuration.

Comments

0500