Remapping Linux Capslock

Ade Yahya Prasetyo
08 Jul 2026 05:11

Yet again another small notes on how to remap capslock to esc on linux. I remember I’ve been posting this kind of notes several times in this blog, but this time I found another way to remap the capslock reliably by doing it in kernel level.

Previously I always use xremap to do this small thing, but the problem with xremap for me is I always forget on how to configure it, and it’s also require different steps for x11 and wayland.

This time I found keyd that perfectly fits my need, because basically the only remap that I need just transforming capslock to esc because it’s been a part of my muscle memory while in mac.

In some forum I’ve red that mostly it’s included in most distro, but in case it didn’t as in Fedora, here is the repository

https://github.com/rvaiya/keyd

and here is my config for it /etc/keyd/default.conf

[ids]
*

[main]
capslock = esc