Remap keyboard keys using evremap

21 May 2023 | Linux Guide

A close-up view of a purple backlit keyboard with a transparent text overlay reading “evremap”.


  1. Introduction
  2. Building and Installing

    1. Prerequisites
    2. Building
    3. Installing
  3. Usage
  4. Other Options
  5. References


Sometimes a key on your keyboard stops working, and you may not have the time or motivation to fix it or get it fixed. Or maybe you just want to change how your keyboard keys work to improve your workflow. All this, and more, can be done with the help of evremap (

It is a tool that can remap the keyboard inputs for Linux systems, made by Wez. And because evremap targets the evdev layer of libinput, the remapping is effective system-wide – in Wayland, X11 and the Linux console.

Building and Installing


Debian and its derivatives like Ubuntu require some prerequisites before we can build it. Use this command to install them:

sudo apt install git cargo pkg-config libevdev-dev

RHEL and its derivates also require some prerequisites. Use the following command to install it:

sudo dnf install git libevdev-devel


First, clone the repository to any folder of your choice. I recommend the Downloads folder, as after building it, you can safely delete it.

cd ~/Downloads && git clone && cd evremap

Now, build the binary.

cargo build --release

If everything went fine, the last lines of your terminal output should be something like the ones in the image below.

A screenshot of the terminal after evremap finished building.


Copy the binary file to the specified location using this command:

sudo cp target/release/evremap /usr/bin/

Now create a config file in the specified location using this command:

sudo touch /etc/evremap.toml

We will edit this file in the Usage section, below.To make your configured remapping active immediately after the system startup we need to create a systemd service. Use the following commands to do so:

sudo cp evremap.service /usr/lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable evremap.service
sudo systemctl start evremap.service

Now, you can safely delete the cloned repository.

cd .. && rm -rf evremap


In the configuration file, we need to state two things, basically – name of the keyboard(s) and name of the keys you wish to remap.

To find the name of all the connected keyboards use the following command:

sudo evremap list-devices

Usually, laptop keyboards will be named “AT Translated Set 2 keyboard”.

To find the name of all the inputs use:

sudo evremap list-keys

The grep command can help you find the keyboards and the keys faster.

For example:

sudo evremap list-devices | grep HOME

Now, let us modify the configuration file. Use the following command to edit it:

sudo nano /etc/evremap.toml

Here is a template that you can copy and paste, and make te changes you need:

device_name = "DEVICE NAME HERE"


output = ["OUTPUT_KEY"]


Here is the configuration file that I use for my laptop, as my Tab and Number 2 keys do not work.

device_name = "AT Translated Set 2 keyboard"

input = ["KEY_END"] output = ["KEY_2"]

input = ["KEY_HOME"]
output = ["KEY_TAB"]

You can save the file by hitting CTRL + X, then Y and then Enter.

Now, you can log out and log back in and test your new configuration. If everything went perfectly, your remapped keys should work as expected.

Please visit the official repository on GitHub if you have any questions or need a detailed documentation.

Other Options

There is a tool called xmodmap, but it works only on X11.



Recent Posts

How to Bypass CGNAT - Exposing your home server to the internet with TLS/SSL pass through

07 October 2023 | Linux Guide, Privacy, Self-hosting

You've set up a home server, and are hosting some services like Vaultwarden, or Jellyfin, or perhaps Nextcloud. But now, you want to share it...

Read More

Remap keyboard keys using evremap

21 May 2023 | Linux Guide

Sometimes a key on your keyboard stops working, and you may not have the time or motivation to fix it or get it fixed. Or...

Read More

Proton VPN Linux Guide – How to install, configure, use and auto-connect?

19 May 2023 | Linux Guide, Privacy

The official Proton VPN Linux client lacks a lot of features, like changing the connection protocol, quickly connecting to the fastest server of a specific...

Read More

MusicOther ProjectsPrivacy PolicyAbout