LG Remote Settings

I followed the instructions here: http://forum.osmc.tv/showthread.php?tid=6978

However, I can’t get things to work. When I look at the log, I get the following:

14:50:37 T:1957158912   DEBUG: OnKey: 166 (0xa6) pressed, screen saver/dpms woken up
14:50:38 T:1957158912   DEBUG: OnKey: 167 (0xa7) pressed, action is Down
14:50:39 T:1957158912   DEBUG: OnKey: 168 (0xa8) pressed, action is Right
14:50:39 T:1957158912   DEBUG: OnKey: 169 (0xa9) pressed, action is Left
14:50:41 T:1957158912   DEBUG: OnKey: 11 (0x0b) pressed, action is Select
14:50:43 T:1957158912   DEBUG: OnKey: menu (0xd8) pressed, action is Back
14:50:44 T:1957158912   DEBUG: OnKey: menu (0xd8) pressed, action is Back
14:58:57 T:1957158912   DEBUG: OnKey: 224 (0xe0) pressed, action is Stop
14:59:00 T:1957158912   DEBUG: OnKey: 234 (0xea) pressed, action is PlayPause
14:59:03 T:1957158912   DEBUG: OnKey: 230 (0xe6) pressed, action is Pause
14:59:04 T:1957158912   DEBUG: OnKey: pause (0xdd) pressed, action is SkipPrevious
14:59:06 T:1957158912   DEBUG: OnKey: sleep (0xdf) pressed, action is SkipNext

I have tried using the names or numbers, and the “0x” identifiers to no avail. Here is my current remote.xml file (in ~osmc/.kodi/userdata/keymaps), which is set wide open on permissions (chmod 777):

                        <key id="0xdf">PageDown</key>
                        <key id="224">ContextMenu</key>
                        <key id="224">reloadkeymaps</0xe0>
                        <key id="224">Stop</key>

What am I doing wrong?


The reason it’s not working for you is that the OnKey values reported in the log are bogus, for example OnKey: 230 (0xe6) is not actually valid. (The action reported is valid though)

I ran into the same problem recently when trying to customise a remote.xml. I don’t know what causes the wrong key codes to be printed in the debug log but I suspect it must be a Kodi bug.

The best way to figure out the mappings is to start with the action reported and use the default mappings in /usr/share/kodi/system/keymaps/remote.xml as a guide and work backwards from that to see what the real button name is.

HAve you used the Keymap addon to map the remote? Worked very well with my LG remote