MCE remote buttons

  • I have simple speedlink MCE remote, which works...almost.

    In general it works, but some buttons are mapped incorrectly.

    So, I've run 'irw and marked buttons I want to change, those are (most of them):

    Especially I need to remap color buttons - they are totally messed, colors and descriptions are different, ie red/KEY_TUNER on my remote has name - Video etc.

    Another important ones - Radio, which I want to run Radio Addon->my stations and PC Power, which should only sleep, not poweroff.

    I don't know how to map buttons successfully by config files - can't find tutorial which uses keynames similar to mine.

    Keymap Editor addon cannot map Radio button at all and there is no way to change Power key behavior.

    Maybe there is another way to find proper key names?

    ahhh - this does not work for me, no effect at all, although this is for my remote.

  • Which IR receiver are you using, is it the same Belkin one as mentioned in the Kodi wiki page?

    Please post the full journal output, this should give some more hints

    Code
    journalctl -a | pastebinit

    so long,

    Hias

  • Thanks a lot for the info! This particular remote and IR receiver indeed generate very odd key codes. LibreELEC ships with a translation layer (via eventlircd) to translate some of these codes into usable ones. The 4 colour buttons seem untranslated though.

    You should be able to remap the colour buttons with a Lircmap.xml file (in /storage/.kodi/userdata). eg this should get you the standard red/green/blue/yellow kodi button codes, which you can then assign via the keymap editor

    Code
    <lircmap>
      <remote device="devinput">
        <red>KEY_TUNER</red>
        <yellow>KEY_AUDIO</yellow>
        <blue>KEY_GREEN</blue>
        <green>KEY_SUBTITLE</green>
      </remote>
    </lircmap>

    If you prefer you can also map the red button directly to kodi's video button via <myvideo>KEY_TUNER</myvideo>

    To change the behaviour of the power button (which fortunately seems to use the standard KEY_POWER keycode) it's best to create a remote.xml file in /storage/.kodi/userdata/keymaps eg like this to change the power button to suspend

    Code
    <keymap>
      <global>
        <remote>
          <power>Suspend</power>
        </remote>
      </global>
    </keymap>

    My personal preference is to get the shutdown menu displayed which you can get with <power>ActivateWindow(ShutdownMenu)</power>

    so long,

    Hias

  • Thank you!
    Looks better now, but still not perfect :)
    1) I've mapped
    KEY_VIDEO to red/Video
    KEY_AUDIO to yellow/Music
    but cannot find a name for blue/Picture (KEY_PICTURE and KEY_IMAGE doesn't work)

    green/MyTV must be idle for know, as I don't have TV client yet.

    2) How to map Radio and DVD button? first column in my list are only labels on the buttons, typed by me manually in the listing above. So, I don't know how to name them in the file. Additionally:

    - Radio - should start Radio add-on and MyStations in there - I've "hacked" :) Main Menu so now Radio in my menu shows that place (both: focused and activated), so I think it is possible to run addon (maybe in keymaps, not here in Lirc), but how to manage the button physically? This is the one:

    Code
    radio	1e	0	KEY_A	devinput

    I've tried <radio>, <a>, <key_a>... no effect

    - DVD - this is bigger thing :) - It will be nice to:

    - - open disc tray when it's empty OR

    - - go to Disc submenu when it exists (so, tray is not empty)

    I understand, that it is probably complicated, so only one of these actions will be nice - I can concern unhide empty disc reader.

    and...

    I've replaced proposed by you:
    <power>Suspend</power>

    to

    <power>Sleep</power>

    which lets me sleep and wake the device by remote only, with single button press. When I need shutdown menu, it always is on its place, but my family doesn't need it.

  • You can only use one of the few defined kodi button names in Lircmap.xml - see eg the default Lircmap.xml lircmap.xml or the button translater source code irtranslator.cpp for a list of valid names.

    So for radio you could use the "liveradio" button <liveradio>KEY_A</liveradio>.

    For the DVD button it's probably best to map it to "eject", this will open/close the tray.

    so long,

    Hias

  • Thanks for the list.

    DVD ejects the tray, Pictures work, still fighting with Radio - <anything>KEY_A</anything> does not work, although the button wakes device from screensaver, so - it reads the button press.

    *anything - liveradio has no tuner, I've tried mute, eject and some others, still no effect.

  • i run now LE9.0.1. and found out that the powerbutton of the remote is working different , compared to LE8

    i tried this code:

    Code

    1. <keymap>
    2. <global>
    3. <remote>
    4. <power>ActivateWindow(ShutdownMenu)</power>
    5. </remote>
    6. </global>
    7. </keymap>

    but this code is not working.

    When i press this button (powerbutton ) the ActivateWindow(ShutdownMenu) is poping up and the system is going into sleepmode, before and after adding this code

    what am i doing wrong ?