How do you write udev rules for a built-in keyboard?

Since asking my original question on udev keyboard remapping rules (viewed 6K times on askbot in 6 years!), I’m again stumped by the task of remapping my caps lock key to backspace on a new laptop.

This rule worked on my old laptop, added to 90-custom-keyboard.hwdb in /usr/lib/udev/hwdb.d/:


I then update via udevadm hwdb --update

But it no longer works on the new machine. Presumably the ID string is different, but I can’t find anything listed in udevadm info -a /dev/input/event3 that gives me an identifiable string to write a new rule for the built-in keyboard. All my attempts at writing generic rules to target any keyboard plugged in has also failed:

evdev:input:* # doesn't work
keyboard:usb:v*p* # doesn't work. Presumably the built-in keyboard isn't USB

Rules written with lsusb -v strings are fine, of course:

# Microsoft Sculpt Ergo Keyboard

What should I examine to find a udev-friendly string to write a rule targeting a built-in keyboard? I can’t unplug it to watch /var/messages, after all. :slight_smile: