How to modify keymap.xml or remote.xml?

Hi,

I am using OSMC Alpha 4 on a RasPi 2, and would like to add some functionality for my VC-1100 remote control (volume not working), so I wonder: what is the desired way to access the userdefined-keymap.xml / remote.xml, where are they located, and how can I access them remotely (FTP or SMB seem not to work).

What is the fastest and most convenient way to find these files, and alter them?

You can use SSH.
User: osmc
password: osmc.
It is in /home/osmc/.kodi/userdata/keymap folder.
You can edit it in any text editor (eg. nano, vim)

Thanks, but the OSMC Folder is empty, i.e. I can get to cd /home/osmc, but all wubsequent directories are empty.

Is it possible to transfer the files to a PC via PUTTY and copy them back, once I found them?

just type

cd .kodi

the period (.) in front of kodi denotes it as a hidden directory. It’s there…

Also, type

ls -la

to be shown all files including hidden for the given directory.

Thanks, this worked :smile:
Now my next problem:
I created a file called remote.xml, changed the permissions to chmod 777 remote.xml

Problem: after restart, the contents are being ignored, especially the keymappings for the popular VRC-1100 remote do not work:

<keymap>
  <global>
    <remote>
      <f14>VolumeDown</f14>
      <f15>VolumeUp</f15>     
    </remote>
  </global>  
</keymap>

What am I doing wrong?

1 Like

What do you mean by not working. Volume doesn’t work at all or volume is changing on tv instead of Kodi?

Futhermore are you certain that you used proper codes?

To debug cec/remote functions you have to enable Debug in Osmc settings. Then you have to write in console/ssh:
tail -f /home/osmc/.kodi/temp/kodi.log
And find out if keys pressed on the remote are passed properly to OS via CEC. You can find the proper codes there as well

EDIT: if you use remote not for tv but directly using some IR receive you may try to use ‘universalremote’ instead of ‘remote’ in the xml file. This may be usefull article for you:
http://kodi.wiki/view/keymap

Hi,

thanks for your reply. My fault was to put that in a block, however, worked for some reason.

Continuing on this subject, I wish to delete a command (the CLEAR button) from the remote.xml. (I am using a CEC HDMI remote and the input button is acting as the CLEAR button, in the sense that, if on the home screen it opens the weather app or if selected on a movie and INPUT is pressed, it asks to delete the movie.

Using putty I have gone into the Keymaps folder, but pressing “ls” it does not bring anything up.

A COUPLE QUESTIONS: which file do I need to navigate to to delete these line items? And how do I open the file and specifically choose a line to delete?

The keymaps folder won’t have anything until you put it there.
If you want to ‘delete’ entries, then you create a map (eg remote.xml) which has modified entries for the items you wich to affect.
Chase up that link, a couple of posts back, and do some reading - then you may have some detailed questions to ask.
BTW the maps in that folder get read and act as overrides to the system maps (which you shouldn’t alter, as they may be overwritten on updates)
Derek

Hi,

I fiddled around with keymaps for some time as well. Yesterday I installed the RC and thought I’d give the keymap editor add-on a chance. What can I say, it worked out quite nicely. You can select an scope (global or only during playback, etc.), then an action (volume down, open context menu, etc.) and then press the button on your remote to assign it. It’s very straightforward and you do not need edit any file.