Remote.xml codes

I have almost finished setting up OSMC just how I like it except for the remote mapping.

I am using a Sony Bravia W8 TV with the Pi2 and need to map the HOME button on the remote to FullScreen action.

Does anyone know what the button’s string is named?

Currently using this custom settings:



fullscreen systemsettings codecinfo screenshot stop fullscreen reloadkeymaps [/CODE]

Thanks in advance.

I’d say it should be <rootmenu>, which I found in my remote.xml file. But I do not see a <rootmenu> entry in Lircmap.xml, so I am not sure this entry actually does anything.

Only one way to find out - enable Kodi Debug mode in Settings->System->Debugging, then tail the kodi log, which you can do via SSH like this:

tail -f /home/osmc/.kodi/temp/kodi.log

Now you will see in the log in real time what codes your TV is sending for that button when you press it. Note, not all TV remote buttons can be used for CEC functions.

If this is the case with the Home button you will not see any button logged when you press it, and there won’t be anything you can do about it as it’s entirely up to the TV which buttons on it’s remote can and cant be used for CEC.

For what it’s worth when I was using CEC I mapped the TV’s Guide button to the toggle fullscreen action. (EG the same action that TAB on a keyboard performs)

@berto thanks, I will try that when I get home.

@DBMandrake, thanks for this instruction. I was able to make use of the Home button by adding:

<keymap> <global> <keyboard> <key id="237">fullscreen</key> </keyboard> </global> </keymap>

I still would like to know if the onkey “237” has a name string.

I can confirm <rootmenu> assigns to the Sony HOME button, thanks again @berto

I think the mapping between CEC button “number” and name is hard coded in one of the C++ source files in Kodi, so basically you can’t change it if it doesn’t already have a name. Fortunately you can still assign it by button number as you discovered.

@DBMandrake thanks for your input, very helpful. I am finally happy with my Kodi setup.

Glad it worked out. Although I am interested to know how / why it worked out. As I say, I could not find a <rootmenu> entry anywhere in the Lircmap.xml file. Did you add one here?

I thought “connected” entries were needed in all 3 remote files: lircd.conf, remote.xml, and Lircmap.xml? For example, I have an xbox 360 media remote and wanted to map the big X button to go back.

So I have a button code in lircd.conf:

KEY_HOME         0x0B9B

Then Lircmap.xml (in the <remote device="linux-input-layer"> section), has a mapping from KEY_HOME to the <start> action:


And finally remote.xml says that the <start> action should implement PreviousMenu


But if the Lircmap.xml entry was missing, I thought it would break the chain that eventually tells kodi to implement the PreviousMenu action?

@berto I just added a custom remote.xml into the userdata/keymap directory and all buttons were working.

I did not look at nor edit any other files.

@akashi - thanks for confirming the changes you made.

@DBMandrake are you able to share any wisdom here? How can <rootmenu> in “remote.xml” work, if there is no <rootmenu> entry in “Lircmap.xml”?