On Ubuntu 20.04 I modified /usr/lib/udev/rules.d/60-evdev.rules as follows, because I don't want udev to touch my raw keyboard device:
# do not edit this file, it will be overwritten on update ACTION=="remove", GOTO="evdev_end" KERNEL!="event*", GOTO="evdev_end" ATTRS{name}=="AT Raw Set 2 keyboard", GOTO="evdev_end" [...] LABEL="evdev_end" This works, but I'm concerned about the "do not edit this file" line. I want a cleaner way to do the same thing. I tried to move this line to a file named /etc/udev/rules.d/01-atkbdraw.rules, but this results in the following error: GOTO="evdev_end" has no matching label, ignoring.
I also tried to use the := operator like this:
ATTRS{name}=="AT Raw Set 2 keyboard", RUN:="/bin/true" But this doesn't work, I think it only affects the "RUN" keys and doesn't stop further processing entirely.
I saw that there was a option called last_rule which seems to be exactly what I need, but it got removed in version 147.
Is there a way I can do what I want without editing /usr/lib/udev/rules.d/60-evdev.rules?