How to edit remote.xml?

  • Hi all,

    I'm trying to get my remote to bring up the Context Menu when I have a video file highlighted.

    I would like to change the function of the Red remote button from it's current action ActivateWindow(TVChannels)

    to ContextMenu

    Using Putty and going to the usr/share/kodi/system/keymaps folder, then typing nano remote.xml

    Editor opens but says file is unwriteable. I am logging in as root.

    So, what am I doing wrong?

    Thanks,

    OtG

    • Official Post

    You are trying to edit a default settings file, which is read-only. To overwrite such settings, you have to create a custom file.

    So what you want is /storage/.kodi/userdata/keymaps/remote.xml with this content:

    Code
    <keymap>
      <global>
        <remote>
          <red>ContextMenu</red>
        </remote>
      </global>
    </keymap>
  • You are trying to edit a default settings file, which is read-only. To overwrite such settings, you have to create a custom file.

    So what you want is /storage/.kodi/userdata/keymaps/remote.xml with this content:

    Code
    <keymap>
      <global>
        <remote>
          <red>ContextMenu</red>
        </remote>
      </global>
    </keymap>

    Does that add to or replace the default settings?

    What would be the accepted Remote key for a mouse Right-Click?

    I would like to use the Right Key for this but if I understand the Remote.xml file, I would need to know what window I am in to add that without screwing up the other instances when I need the Right Key to work as it is now. An example if I have the "side" menu open and need to go back.

    Is that correct? The Red, Blue, Yellow and Green keys make the TV display a message, which is annoying but it goes away, so the Right Key would be a better choice.

    The reason I need the Context menu is there were movies and TV Shows in my media files that did not input into the Library. I used a wireless keyboard and mouse to "Scan into Library" and fixed those files but think I could use the capability of bringing up the context menu without using the keyboard and mouse (I don't have that out and powered unless I need to).

    Thanks!

    OtG

    • Official Post

    Does that add to or replace the default settings?

    Both. It adds a non-exiting definition or replaces an existing one.

    What would be the accepted Remote key for a mouse Right-Click?

    Wrong question ;). The question is, which Kodi action is linked to the right-click.

    If "ContextMenu" doesn't performs the right action for your needs, selects yours here.

    An example if I have the "side" menu open and need to go back.

    Is that correct?

    Using the "Back" action is correct. You probably need different Kodi actions. Define different actions on your remotes color keys.

  • Both. It adds a non-exiting definition or replaces an existing one.

    Wrong question ;). The question is, which Kodi action is linked to the right-click.

    If "ContextMenu" doesn't performs the right action for your needs, selects yours here.

    Using the "Back" action is correct. You probably need different Kodi actions. Define different actions on your remotes color keys.

    I couldn't get it to work with just the simple xml you suggested. I ended up copying the complete original remote.xml file to /storage/.kodi/userdata/keymaps/remote.xml and then editing the RED KEY action

    That works as expected (have to wait for TV message to go away).

    Maybe the version you posted just needed the <?xml version="1.0" encoding="UTF-8"?> line?

    The "ContextMenu" was what I needed, it works well not only to "Scan to Library" but to "Add to Favorites".

    My question was, what remote key would be most appropriate to use for the mouse right-click?

    The Green, Yellow and Blue also had defined actions I have just left as is for now.

    Anyway, I have a way to bring up the context menu now so I'm happy. Thanks for the help.

    OtG

    • Official Post

    I'm using exactly the same XML to get "ContextMenu" on my RPi 3B+, and it works fine. Maybe you additionally have a keymap editor installed, which "overwrites the XML overwrite".

    You can mark this thread as solved by editing your initial post.