Since Kodibuntu is no longer supported by the Kodi developers, I have made the move to LibreELEC and I am very happy with it so far... Quick to install, fast boot, available options that should have been in Kodibuntu (network configuration tool!) and overall a very impressive experience.
However, I am scratching my head when it comes to getting my remote control working. Previously in Kodibuntu, I would remove LIRC and rely on IR-KEYTABLE to deal with a bank of RC-5 commands from my Philips Pronto remote control. I had no issues with creating a keytable and configuring a "keyboard.xml" to map buttons to specific functions. Everything worked perfectly and whenever reinstalling, I could just drop my "pronto.cfg" (keytable) and "keyboard.xml" files in the relevant places, and it would just work.
I assumed the same was possible with LibreELEC since it has IR-KEYTABLE built in, but I am unable to get it to work fully. I am well versed in IR-KEYTABLE; I can assign protocols, write keytables, test commands, load on boot, etc, but I have two problems:
LIRCD interferes with IR-KEYTABLE
My IR receiver is working perfectly but before IR-KEYTABLE will accept IR codes, I have to stop the LIRCD service with "systemctl stop eventlircd.service". No problem, just write an "autostart.sh" script to run this script on boot... Except it doesn't work!
I have no use for LIRC / LIRCD since I am using the RC-5 IR codes to emulate a keyboard and as I understand it, only IR-KEYTABLE can emulate key presses. I have no interest in using LIRC / LIRCD so if it cannot be removed, can it be disabled on boot up?
Specific Keys are not recognised by Kodi
I have the "Guide" button on my Pronto mapped to an RC-5 IR code that prompts "KEY_C" in the keytable. After stopping LIRCD, "KEY_C" works when running "ir-keytable -t" and I can see the key is recognised by IR-KEYTABLE. However, Kodi does not react to this keypress! It should display the Context Menu, but nothing happens. I thought this could be an issue with my custom "keyboard.xml" so I deleted it, which reverts back to Kodi's defaults, and although pressing the "C" key on a USB keyboard works, "KEY_C" is not recognised!
I have tested with a few other keys as well, most notably "KEY_P" and this doesn't work to play a video either, even though "P" on a USB-connected keyboard works fine. Interestingly, I mapped the same RC-5 IR code to "KEY_PLAY" instead of "KEY_P", and it now works in Kodi.
This tells me that LIRC / LIRCD is interfering in the translation from IR-KEYTABLE to Kodi, and any keys it doesn't recognise, it just drops. What is the best way to completely disable LIRC / LIRCD so that I can just use IR-KEYTABLE? And also, where is the translation from IR-KEYTABLE names to Kodi commands done? There must be a file somewhere that takes the IR-KEYTABLE commands, translates to Kodi-recognised commands, and spits them out to Kodi.
If you need any further information please let me know and I'll try to supply it. Thanks for any help you can give!
EDIT: Here is an excerpt from my kodi.log. It looks like I was right; LIRC is intercepting IR signals and dropping those it doesn't understand!
11:49:01.937 T:140430158071040 DEBUG: LIRC: Update - NEW at 71096:6c 0 KEY_DOWN devinput (KEY_DOWN)
11:49:01.937 T:140430158071040 DEBUG: OnKey: 167 (0xa7, obc88) pressed, action is Down
11:49:02.186 T:140430158071040 DEBUG: LIRC: Update - NEW at 71345:6c 0 KEY_DOWN_UP devinput (KEY_DOWN_UP)
11:49:02.518 T:140430158071040 DEBUG: LIRC: Update - NEW at 71677:2e 0 KEY_C devinput (KEY_C)
11:49:02.767 T:140430158071040 DEBUG: LIRC: Update - NEW at 71926:2e 0 KEY_C_UP devinput (KEY_C_UP)
11:49:04.128 T:140430158071040 DEBUG: LIRC: Update - NEW at 73287:2e 0 KEY_C devinput (KEY_C)
11:49:04.394 T:140430158071040 DEBUG: LIRC: Update - NEW at 73553:2e 0 KEY_C_UP devinput (KEY_C_UP)
11:49:04.958 T:140430158071040 DEBUG: LIRC: Update - NEW at 74117:2e 0 KEY_C devinput (KEY_C)
11:49:05.224 T:140430158071040 DEBUG: LIRC: Update - NEW at 74383:2e 0 KEY_C_UP devinput (KEY_C_UP)
11:49:06.286 T:140430158071040 DEBUG: LIRC: Update - NEW at 75445:11 0 KEY_W devinput (KEY_W)
11:49:06.552 T:140430158071040 DEBUG: LIRC: Update - NEW at 75711:11 0 KEY_W_UP devinput (KEY_W_UP)
11:49:07.332 T:140430158071040 DEBUG: LIRC: Update - NEW at 76491:e 0 KEY_BACKSPACE devinput (KEY_BACKSPACE)