keyboard and remote things - I can't handle notations.

  • Hello,

    I want to summarize my knowledge about keys, remotes etc.

    My libreelec box (amd64) uses simultaneously MCE remote, wireless keyboard (logitech one, with nano) and will use arduino leonardo as usb keyboard (whcih will handle some cover buttons).

    I need some remappings and I had config partially fixed, but I don't understand it globally.

    Last days I've implemented ambilight (via hyperion and arduino) and I need a key to turn it on/off.

    And it's done - on the wireless keyboard Ive put into

    /storage/.kodi/userdata/keymaps/keyboard.xml

    something like that:

    Code
    <keymap>
    <global>
    <keyboard>
    <insert>System.Exec("/storage/.kodi/userdata/addon_data/script.hyperion.switch/hypswitch.sh")</insert>
    </keyboard>
    </global>
    </keymap>

    where /storage/.kodi/userdata/addon_data/script.hyperion.switch/hypswitch.sh is just a script to switch all hyperion service on and off.

    This part works.

    Now, I want to do the same on the remote ...and I can't.

    What is not clear with my remote?

    1. Another location of config

    /storage/.kodi/userdata/Lircmap.xml

    I can't find any working (in my case) solution with config file in the same place (under keymaps dir), which should be obvious thing in my opinion.

    2. Lircmap.xml looks like this:

    Display Spoiler

    <lircmap>

    <remote device="devinput">

    <myvideo>KEY_TUNER</myvideo>

    <yellow>KEY_AUDIO</yellow>

    <mypicture>KEY_GREEN</mypicture>

    <green>KEY_SUBTITLE</green>

    <power>Sleep</power>

    </remote>

    </lircmap>

    where:

    - KEY_TUNER, KEY_AUDIO, KEY_GREEN, KEY_GREEN are button codes taken from irw monitor,

    - yellow, green - are color of physical buttons

    - myvideo and mypicture are WORKING redirections of red and blue buttons into corresponding kodi places

    - <power>Sleep</power> is also WORKING solution to sleep machine after PC Power button stroke (I have two - PC Power and TV Power).

    And here's the place where I understand less I thought.

    in keyboard section

    <insert>System.Exec("/storage/.kodi/userdata/addon_data/script.hyperion.switch/hypswitch.sh")</insert> means, that pressing insert (tag key) calls System.Exec function (value): Press <tag> -> Call "value"

    in remote section:

    <myvideo>KEY_TUNER</myvideo> means something completely different! Pressing <value> calls <tag>! KEY_TUNER calls myvideo place in my kodi.

    This is a mess, but not the biggest one!

    also in remote section:

    <power>Sleep</power> works same as keyboard! <tag> calls <value>!

    To be honest, now I don't know how to remap the rest of my remote. Where I should use which notation type? How to call external script (hypswitch.sh in this case)?

    May I have all the config in one place - it may be in separate files, but in one dir? Few years ago I did most of remote remappings but I've lost it just because of this location mess (don't ask :) )


    My remote is cheap speedlink sl-6399-sbk

  • I had described the IR and kodi remote processing in the wiki, but it seems this has now been removed with the switch to the new wiki...

    Here's the archive of the old wiki page Infrared Remotes [LibreELEC.wiki] , the introduction should contain the info you need - also read through the linked kodi wiki pages for more detais.

    so long,

    Hias