How to Remap Keyboard / Gamepad in Ubuntu Easily with This Tool

Last updated: March 29, 2023

Want to remap your keyboard or gamepad keys in Ubuntu Linux? It’s easy to do this via Input Remapper.

Input Remapper is a free and open-source tool written in Python 3. With it, you can change the mapping for input devices, including mouse, keyboard, and gamepad.

It works on both X11 and Wayland, and supports for mapping to combined buttons (e.g., Control+A) and programmable macros.

The software has an easy to use interface. Simply start the app, choose the device (e.g., keyboard) to you want to remap, then click add new preset and do:

    1. Click ‘Add’ button in left to add an item.
    2. Click the pencil icon and type a name.
    3. Use “Record” button to record the original keyboard key or key combination.
    4. Choose device to map the input key to.
    5. Finally, type the output key, e.g., letter (a, b, …, z), number (1, 2, …, 9), and/or function keys (Alt_L Control_L Control_R Shift_L Shift_R)

Presets are saved in user’s .config/input-remapper-2/presets folder. You can use them in another machine that can read these “.json” files.

How to Install Input Remapper in Ubuntu:

The software offers official .deb package for Ubuntu / Debian based systems.

Grab the deb package, then open terminal and run command to install it:

sudo apt install ~/Downloads/input-remapper*.deb

It should work on all current Ubuntu releases since it requires only a few python modules.

Once installed, open it from system app launcher and enjoy!

(Optional) For choice, there’s command to remove the tool from Ubuntu:

sudo apt remove --autoremove input-remapper


I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee:

6 responses to How to Remap Keyboard / Gamepad in Ubuntu Easily with This Tool

  1. After having tried multiple tutorials for modifying X11 config files manually without success, key-mapper just works perfectly.

    Thanks so much, Ji m!

  2. As above – looking, tried, without any results. Thanks to you article I found it.
    Thank you so much!

  3. The only way that worked on Ubuntu 22.04! Thank you! :)

  4. After so many tries, this works perfectly with my mouse side-buttons. Thank u!

  5. I installed it, but typing “key-mapper” gives “command not found.” Can’t find it anywhere …

    • My window manager has this listed as “input-remapper” under ‘All Applications’ and ‘Settings’. From a terminal it’s called ”input-remapper-gtk”