Why are there two entries per device?
Mu. There are not two entries per device. Yes,
*-mouse are paired, they share the same
pci-0000:05:00.0-usb-0:1.1:1.0 identifier which suggests they are the same device. On the other hand your
*-event-kbd are different devices.
What's the purpose of each entry?
If you run
ls -l /dev/input/by-path, the output might be (example):
pci-0000:05:00.0-usb-0:1.2:1.0-event-kbd -> ../event5
pci-0000:05:00.0-usb-0:1.1:1.0-event-mouse -> ../event6
pci-0000:05:00.0-usb-0:1.1:1.0-mouse -> ../mouse0
pci-0000:05:00.0-usb-0:1.1:1.1-event-kbd -> ../event13
As you can see, there are
mouse* devices. This document explains the difference:
evdev is the generic input event interface. It passes the events generated in the kernel straight to the program, with timestamps. The event codes are the same on all architectures and are hardware independent.
This is the preferred interface for userspace to consume user input, and all clients are encouraged to use it.
mousedev is a hack to make legacy programs that use mouse input work. It takes events from either mice or digitizers/tablets and makes a PS/2-style (a la
/dev/psaux) mouse device available to the userland.
If you do
sudo cat pci-0000:05:00.0-usb-0:1.1:1.0-event-mouse and (in a separate console)
sudo cat pci-0000:05:00.0-usb-0:1.1:1.0-mouse, you will see they both read from your mouse, yet the byte streams are different.
You have already identified
pci-0000:05:00.0-usb-0:1.2:1.0-event-kbd as your keyboard. I think the remaining device (
pci-0000:05:00.0-usb-0:1.1:1.1-event-kbd) is something else. You should
ls -l as above to find out which event it corresponds to, and then
$ # Example from my laptop
$ cat /sys/class/input/event13/device/name
My webcam has no physical buttons but I suspect the same driver supports webcams that do have some (e.g. a snapshot button). In your case the remaining device is probably not a regular keyboard either.