Thanks for all this input! After a lot of “fiddling” around and trying to understand what’s really going on here, I finally figured out how to use my created lircd.conf
and be able to map the keys the way I want.
In the end my solution was to not use key names in the mapping file keyboard.xml
but use key IDs instead. This is also what the keymap editor add-on does “under the hood”.
This way I was able to also map my KEY_EXIT
to some other command using the following mapping:
<keymap>
<global>
<keyboard>
<!-- ... -->
<key id="216">ActivateWindow(home)</key> <!-- KEY_EXIT -->
<!-- ... -->
</keyboard>
</global>
</keymap>
How to get & use the ID
- The ID
216
used above is decimal representation of the hexadecimal value0xD8
- The hex value can be found using the following method:
- Connect using SSH or open terminal on Kodi device
- Run command
tail -F /home/osmc/.kodi/temp/kodi.log | grep HandleKey
- Press the key on the remote
- Output should be something like this and contains the Hex value in brackets:
“DEBUG: HandleKey: menu (0xd8) pressed, action is Back”
- Use google or some calculator to translate the hex value into decimal
- Important: Use the
keyboard
tag instead ofremote
insidekeyboard.xml
. Otherwise IDs don’t seem to be working