I have a couple of (identical) USB RF Remotes for my various Kodi-using devices, one on Android and another on LibreELEC (an RPI3). These remotes usually get sold under a product name like "MX3", and an unfortunate oversight in their design is that they have no SHIFT key, only CAPS (Lock). This is a shame since we make frequent use of the "Jump to letter" feature (press shift+Letter to jump to that letter in Library lists).
I tried to "fix" this by using the Keymap Editor add-on inside Kodi to remap the CAPS key's keycode to the shift feature, which made the file keymaps/gen.xml:
However, even when fully rebooting the device running Kodi (be it that running Android or that running LibreELEC), the key still functions regardless as caps lock.
I was able to modify things to my satisfaction on my Android setup by remapping the keyboard at the OS-level. I am however struggling to work out how I am supposed to do this in LibreELEC.
I have spoken in #kodi and #libreelec on Freenode IRC but so far haven't been able to work out quite how next to proceed. The seemingly best idea for now is from "vpeter" who thinks it might be possible to use udev and the hwdb akin to this article on the Arch Wiki, but due to the lack of peripheral tools inside LibreELEC it is difficult to translate the information in the Wiki into a form useful for this case. Curiously, lsusb doesn't appear to list my RF adapter, and the only information I've so far gained is an excerpt from my dmesg.
- [ 2.155495] input: MemsArt MA144 RF Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:0C45:5101.0001/input/input0
- [ 2.212174] hid-generic 0003:0C45:5101.0001: input,hidraw0: USB HID v1.10 Keyboard [MemsArt MA144 RF Controller] on usb-3f980000.usb-1.2/input0
- [ 2.216507] input: MemsArt MA144 RF Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.1/0003:0C45:5101.0002/input/input1
- [ 2.216805] hid-generic 0003:0C45:5101.0002: input,hidraw1: USB HID v1.10 Mouse [MemsArt MA144 RF Controller] on usb-3f980000.usb-1.2/input1
- [ 2.221592] input: MemsArt MA144 RF Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.2/0003:0C45:5101.0003/input/input2
- [ 2.279802] hid-generic 0003:0C45:5101.0003: input,hidraw2: USB HID v1.10 Device [MemsArt MA144 RF Controller] on usb-3f980000.usb-1.2/input2
Since this is getting rather involved, I decided it would be best to open a forum thread, and then hopefully not only can I come to a solution, but also document it publicly in the process.
I look forward to any input any of you may have, and am willing to clarify anything as needed.