Remap Mouse Buttons On Linux With KeyMapper

Keymapper Gui

Key Mapper Github:

Install for debian:

sudo apt install git python3-setuptools
git clone
cd key-mapper; ./scripts/
sudo apt install ./dist/key-mapper-1.0.0.deb

The application supports per-device presets, and it allows using timed macros with the ability to repeat keys, wait between keys, hold a modifier while using a key, and more. Besides keyboards and mice, Key Mapper also comes with basic support for gamepads.

The first time you run Key Mapper, you’ll want to select the device (mouse or keyboard) from the device dropdown. Choose a device, and you can start creating a new preset to easily remap your keyboard or mouse buttons.

Left-click in the column, then press the keyboard key or mouse button you want to remap, and it will show up in the key box. In case this doesn't work, you may need to click the button that's displayed to the right-hand side of the device dropdown, and add the key after that.

After you enter the key (or keys) you want to remap, it’s time to choose its mapping. Click inside the cell corresponding to the key you want to remap, then start typing what you want to remap the button to. You can type the first few letters instead of the whole word, e.g. you can type "con" and a dropdown should show the available options, like , , etc:

Once you’ve completed the mappings, click the button. And finally, click to start using the new mappings. You must first the new mappings, then click the button, or else the changes won't have any effect!