в консоли, а не в X11
sudo usermod -a -G input user
где user - имя пользователя
evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event4: AT Translated Set 2 keyboard
evtest /dev/input/event4
Input driver version is 1.0.1
Input device ID: bus 0x11 vendor 0x1 product 0x1 version 0xab41
Event: time 1630747582.938161, type 4 (EV_MSC), code 4 (MSC_SCAN), value 3a
Event: time 1630747582.938161, type 1 (EV_KEY), code 58 (KEY_CAPSLOCK), value 0
dmesg | grep input
sudo vim /lib/udev/hwdb.d/90-keyboard-changes.hwdb
evdev:input:b0011v0001p0001*KEYBOARD_KEY_3a=leftctrl
systemd-hwdb -s update
udevadm trigger /dev/input/event4
Тест
evtest /dev/input/event4
Event: time 1630751006.715770, type 4 (EV_MSC), code 4 (MSC_SCAN), value 3a
Event: time 1630751006.715770, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1