kbct
kbct copied to clipboard
Handle duplicated keyboard names on multiple device paths.
I have a new keyboard (Wobkey Rainy 75) that, when in wired mode, exposes itself with the exact same name on multiple device paths:
e.g.:
$ sudo evtest
...
/dev/input/event2: RDR Rainy 75
...
/dev/input/event4: RDR Rainy 75
kbct
seems to always pick event4
and the last one wins, but the one that actually receives the key events is on /dev/input/event2
.
I made a patch to work around this by checking if there is already a keyboard with the current name in the device map, and if so, append the device number to the end. So after the patch, the second one becomes RDR Rainy 75-4
, and I can stick RDR Rainy 75
in the list of keyboards and it works.
I will push a PR shortly.