How do I determine what HID a keyboard is recognized as?

How do I find out as what kind of HID a keyboard (or any other HID peripheral) is recognized by the system?

Is there a difference in finding out for devices connected through USB and through Bluetooth?

Goal: I’d like to pass some options for the device through a hid_xxxx.conf file in /etc/modprobe.d/.

dmesg will tell you.

This is USB:

[52695.625390] usb 1-3: new low-speed USB device number 6 using xhci_hcd
[52695.770239] usb 1-3: New USB device found, idVendor=1c4f, idProduct=0c07, bcdDevice= 1.10
[52695.770242] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[52695.770244] usb 1-3: Product: USB Keyboard
[52695.770245] usb 1-3: Manufacturer: SZH
[52695.774332] input: SZH USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:1C4F:0C07.000E/input/input46
[52695.828824] hid-generic 0003:1C4F:0C07.000E: input,hidraw5: USB HID v1.10 Keyboard [SZH USB Keyboard] on usb-0000:00:14.0-3/input0
[52695.830781] input: SZH USB Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1/0003:1C4F:0C07.000F/input/input47
[52695.885611] input: SZH USB Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1/0003:1C4F:0C07.000F/input/input48
[52695.885793] hid-generic 0003:1C4F:0C07.000F: input,hidraw6: USB HID v1.10 Device [SZH USB Keyboard] on usb-0000:00:14.0-3/input1

This is bluetooth:

[50771.531543] input: keycool Keyboard 5.0 as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/bluetooth/hci0/hci0:256/0005:05AC:024F.0008/input/input45
[50771.531684] apple 0005:05AC:024F.0008: input,hidraw3: BLUETOOTH HID v1.1b Keyboard [keycool Keyboard 5.0] on 0c:54:15:56:2b:23
1 Like