Enhance device discovery with handler for name matching failures#8
Enhance device discovery with handler for name matching failures#8JerryJohnsonLee wants to merge 1 commit intobahaaador:mainfrom
Conversation
relies on handler when name based matching fails
bahaaador
left a comment
There was a problem hiding this comment.
Thanks so much for your contribution, @JerryJohnsonLee.
I’ll need to find some time to test this, but one thought that comes to mind is whether this might produce unexpected results if other devices are picked up. For example, a power button could have a handler like:
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=8000 10000000000000 0
In that case it might match as a keyboard.
Curious to hear your thoughts on that. Could you tell me a bit more about your use case? What name was showing up for the device on your system?
Yeah for my case I have a logi mouse displayed as "Logitech MX Master 3S" and my keyboard is named as "Majestouch Convertible 2", neither of which contains the "mouse" or "keyboard" keyword, so I have to rely the handler to recognize the device. As for your case, do you think "Power" will be a keyword sufficient to differentiate a power button? In that case we could filter out those containing "Power" in name |
relies on handler when name based matching fails