OK button and context menu on MCE remote

  • Hi, just discovered LibreELEC, I'm running it on raspberry pi3 and I must say it's brilliant. Just one problem I have though is that when using Kodi in Windows I can hold down the ok button on the Media Center Remote control to bring up the context menu. But on the LibreELEC Rpi build this no longer works, holding down ok button just repeats lots of ok presses. I'm actually using a Logitech remote with a Microsoft IR receiver, it may be something to do with that but like I say it worked fine on Windows with Kodi.
    So has anyone else come across this and is there a way of fixing it? (I'm ok with Linux and editing config files etc).
    Thanks
    Paul


  • Hi, just discovered LibreELEC, I'm running it on raspberry pi3 and I must say it's brilliant. Just one problem I have though is that when using Kodi in Windows I can hold down the ok button on the Media Center Remote control to bring up the context menu. But on the LibreELEC Rpi build this no longer works, holding down ok button just repeats lots of ok presses. I'm actually using a Logitech remote with a Microsoft IR receiver, it may be something to do with that but like I say it worked fine on Windows with Kodi.
    So has anyone else come across this and is there a way of fixing it? (I'm ok with Linux and editing config files etc).
    Thanks
    Paul


    Does the 'Guide' button not bring up the context menu? That's what I'd expect to see.
    As above though, you can probably* change the longpress behaviour with a keymap. You can certainly map the context menu to a separate button.

    *As in you can certainly change it, and it will probably work - I've had difficulty with distinguishing longpresses with particular remotes though.

    Edited once, last by trogggy (February 24, 2017 at 3:47 PM).

  • Thanks for the replies,

    yes the guide button works but I got used to the long-press when I was running kodi in windows and I really miss it now it's gone so was trying to fix this.

    Sounds like the long press mod is what I need. From the link above I have created a new xml file:
    /storage/.kodi/userdata/keymaps/key.xml

    containing:

    <?xml version="1.0" encoding="UTF-8"?>
    <keymap>
    <global>
    <appcommand>
    <button mod="longpress">action</button>
    </appcommand>
    </global>
    </keymap>


    also tried <button mod="longpress">Enter</button>

    followed by rebooting.

    Sadly it didn't work but I don't really know what I'm doing.

    I feel this is along the right lines though so any suggestions as to what I've done wrong really appreciated.

  • Try this

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <keymap>
      <global>
        <select mod="longpress">ContextMenu</select>
      </global>
    </keymap>


    or

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <keymap>
      <global>
        <keyboard>
          <return mod="longpress">ContextMenu</return>
          <enter mod="longpress">ContextMenu</enter>
        <keyboard>
      </global>
    </keymap>

    "enter", "return" or "select" might not be the button id, but you can easily know the button id with the Keymap editor addon,
    also might not make any difference but my .xml file is called keymap.xml

    Edited once, last by vitorp07 (February 24, 2017 at 8:24 PM).


  • Try this

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <keymap>
      <global>
        <select mod="longpress">ContextMenu</select>
      </global>
    </keymap>


    or

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <keymap>
      <global>
        <keyboard>
          <return mod="longpress">ContextMenu</return>
          <enter mod="longpress">ContextMenu</enter>
        <keyboard>
      </global>
    </keymap>

    "enter", "return" or "select" might not be the button id, but you can easily know the button id with the Keymap editor addon,
    also might not make any difference but my .xml file is called keymap.xml


    [hr]
    Thanks, I will give it a try tomorrow.

    Edited once, last by pjm.47 (February 24, 2017 at 8:59 PM).

  • If you're using an mce remote and receiver you're probably using LIRC, so <remote> not <keyboard> is needed.
    Turn on debug logging, press ok, refresh the log and you'll see what the remote is passing to kodi.

  • OK thanks we are getting closer, I tried using:

    <remote>
    <select mod="longpress">ContextMenu</select>
    </remote>

    This now brings up the context menu when pressing 'ok' on the remote but it brings it up all the time regardless of how long the keypress is, which means the ok button now doesn't work for short presses!

    I also tried using 'enter' instead of 'select' but this did nothing. The debug log says "DEBUG: LIRC: Update - NEW at 106466:1c 0 KEY_ENTER $" so I tried 'KEY_ENTER' as well but this did nothing.

    Any thoughts?