pacman -S interception-tools interception-caps2esc
Create /etc/interception/udevmon.d/caps2esc.yaml
with the following content:
- JOB: "intercept -g $DEVNODE | caps2esc | uinput -d $DEVNODE"
DEVICE:
EVENTS:
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
sudo systemctl enable udevmon
sudo systemctl start udevmon