If you have spent any time around HID devices under Linux (for example if you are an avid mouse, touchpad or keyboard user) then you may have noticed that your single physical device actually shows up as multiple device nodes (for free! and nothing happens for free these days!). If you haven’t noticed this, run
↫ Peter Huttererlibinput record
and you may be part of the lucky roughly 50% who get free extra event nodes.
I’ve honestly always wondered about this, since some of my laptops shows both a trackpad and a mouse configuration panel even when there’s no mouse plugged in. Thanks to this article, I now know why this happens.
There is one more reason, though.
Sometimes it is easier to send some inputs with alternative device types. Say you have a headset with controls. It can emulate a keyboard to send “volume up”, “volume down” or even “play/pause” media buttons, instead of hacking together a custom solution in their firmware / drivers. In fact, I would welcome this over custom solutions, as it would not run without that driver.
And since that “keyboard” is not shown in the UI, it is an acceptable compromise.
Maybe partially unrelated… But the fact that my USB-PS2 adapter reports itself both as a keyboard and mouse makes it impossible for me to use my 1986 Model M keyboard with HP-UX on my C8000. The firmware will use whichever is connected first so the USB mouse is detected but not associated to the session, and I need to use HP’s awful USB keyboard.
Out of the billions of people on Earth, I am probably the only one with this problem, so old man cursing at clouds.
@slope The HID protocol’s report descriptors allow single devices to declare multiple functions (e.g., touchpad + mouse buttons) as separate “collections” in their firmware.