Oct 15, 2020
Change keymaps in Wayland on Archlinux
I’m trying a new (cheap) mechanical keyboard and I want to send ctrl with the capslock key and I want to send meta with the right alt key.
So just to pin down things here’s what I’ve done.
Create a new file like this:
vim /etc/udev/hwdb.d/10-personal-keymaps.hwdb
and add your mappings like this:
evdev:input:b0003*
KEYBOARD_KEY_70039=rightctrl
KEYBOARD_KEY_700e2=rightmeta
The first line is working and I don’t know why.
The others are your actual mappings.
To find the numbers after KEYBOARD_KEY_
and the name of the new key
use the evtest
command.
The lines above set capslock to send rightcontrol and leftalt to send rightmeta.
To activate those mappings just run:
systemd-hwdb update
udevadm trigger
And happy mapping.
Refs: