I have the default systemd 60-persistent-input.rules file and I have two keyboards one on USB and on a PS2 bus. For the usb devices I get a symlink created in /dev/input/by-id with the bus and id. For the PS2 device don't get this.

The device is on event7:

I: Bus=0011 Vendor=0001 Product=0001 Version=xxxx
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input7
U: Uniq=
H: Handlers=kbd event7 
B: EV=120013
B: KEY=2000000 3803078f800d001 feffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7

but there is no symlink created. Should the udev rules from systemd be creating these?

  • I've never seen the default rules create one, but nothing prevents you from modifying the rules so you get one. Technically, the PS/2 keyboard doesn't have an "id", but a name like /dev/input/by-path/platform-ps2-keyboard might make sense. – dirkt Nov 5 '17 at 7:24
  • 1
    You'll find it already there under by-path, of course, as several platform-i8042-serio* entries. But the question is about by-id. – JdeBP Nov 5 '17 at 10:06
  • @JdeBP: My PS/2 keyboard is definitely not in my by-path (Devuan), so I assume it depends on the udev-variant ... – dirkt Nov 5 '17 at 13:12

PC-compatible keyboards do not have a product identifier. There is a Read ID command, but the ID it returns is apparently always the same 2-byte value 0xAB, 0x83. Referring to a keyboard, and the original version with 83 keys. It sounds like in practice this would be used to double-check that the connected device is a compatible keyboard, as opposed to some other device. This type of "ID" is not specific enough, in my understanding of the "by-id" concept.

Source: http://www.computer-engineering.org/ps2keyboard/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy