Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Solved Remote control button doesn't have assigned key id, two other buttons share key id
#1
Hello,

This issue is on Kodi Krypton 17.6 on LibreELEC 8.2.5 on x86_64 machine. I have two problems with using the remote control that I did not have with Kodi Jarvis 16.1 on LibreELEC 7.0.2 on imx6 machine (Cubox). I have attached the log so you can see what happens when I hit the buttons. I posted in LibreELEC forum but so far nobody is responding.

First issue is that KEY_FAVORITES does not get recognized by Kodi even though it is received by Kodi. I tried using Keymap Editor and when clicking this button nothing was happening. So I checked the log and in the log this line appears without being followed by "OnKey" line:

19:52:05.579 T:140290439489216 DEBUG: LIRC: Update - NEW at 24221436:16c 0 KEY_FAVORITES devinput (KEY_FAVORITES)

In my Lircmap.xml in Userdata folder, this button is assigned to <title>, which is then assigned to operation of ContextMenu in default remote.xml in <global>. With exact same Lircmap.xml this button worked as ContextMenu in LibreELEC 7.0.2.

Second issue is that KEY_BACK and KEY_EXIT share the same key id. When pressed, Kodi recognizes it as key id=216 for both buttons, even though they are actually different buttons with different codes. I first saw this in Keymap Editor and in the log, you can see it also:

19:52:15.799 T:140290439489216 DEBUG: LIRC: Update - NEW at 24231656:ae 0 KEY_EXIT devinput (KEY_EXIT)
19:52:15.799 T:140290439489216 DEBUG: OnKey: menu (0xd8) pressed, action is fullscreen
19:52:16.484 T:140288722986752 DEBUG: CWebServer[8080]: request received for /jsonrpc
19:52:19.048 T:140290439489216 DEBUG: Previous line repeats 3 times.
19:52:19.049 T:140290439489216 DEBUG: LIRC: Update - NEW at 24234906:9e 0 KEY_BACK devinput (KEY_BACK)
19:52:19.049 T:140290439489216 DEBUG: OnKey: menu (0xd8) pressed, action is fullscreen


In my Lircmap.xml, these two buttons are assigned to <back> for KEY_BACK and <epgsearch> for KEY_EXIT, the same as in 7.0.2. Again, in LibreELEC 7.0.2 both of these buttons had different key ids and operated as intended. In 7.0.2 uUsing Keymap Editor I was able to assign KEY_EXIT to activatewindow(home) so I used it as universal exit key. Trying the same in 8.2.5 does not work because Keymap Editor recognizes both buttons with key id of 216.

Can someone please help me fix this? Maybe someone can explain how does the code that is seen by LIRC get translated to key id. I searched many forum posts on both LibreELEC and Kodi forums but cannot find an explanation. If I know how this is done then I can change the key id of these buttons and get them to work.

Currently this is an issue for me primarily when using the TV Guide and wanting to exit to Home at any screen. I was able to do both of these things before. Thank you in advance.

01_KODI.log
Lircmap.xml
Reply
#2
Well, I fixed this problem myself. Since Kodi was not recognizing KEY_FAVORITES and the other two buttons shared the "key id", I figure maybe there is a way to change the way Kodi recognizes the buttons by changing the name of the button. So I listed all button names by SSH-ing into LibreELEC and running "irrecord -l namespace". After a bit of trial and error, I found button names for KEY_FAVORITES and KEY_EXIT that Kodi recognizes and that are unique.

In order to use my Favorites button on my remote as Context Menu button, I used KEY_TITLE for the button. In order to use Exit button on my remote as "go to home screen" button, I used KEY_HOME. What I did was open up my remote control keymap file in "/.config/rc_keymaps" and edit the file to change the KEY_FAVORITES to KEY_TITLE and KEY_EXIT to KEY_HOME. I saved then went edited "/.kodi/userdata/Lircmap.xml" file to also change KEY_FAVORITES to KEY_TITLE and KEY_EXIT to KEY_HOME. I kept the <title> for KEY_TITLE and <epgsearch> for KEY_HOME. I then used Keymap Editor to assign KEY_TITLE to Context Menu in Global. I did not have to do anything for KEY_HOME.

Once I did this, I rebooted and now remote control works like it did in Kodi 16.1. Problem solved!
Reply

Logout Mark Read Team Forum Stats Members Help
Remote control button doesn't have assigned key id, two other buttons share key id0