file in userdata/keymaps has no effect

  • On a Raspi 2 with LE 10.0.2 I created the file yellow.xml in .kodi/userdata/keymaps:

    Code
    <keymap>
        <global>
            <remote>
                <yellow>RunScript(/storage/num_input.py)</yellow>
            </remote>
        </global>
    </keymap>

    The file storage/num_input.py is present and executable.

    When I press the yellow key on my Samsung TV remote, kodi still switches to 'Music', which is the default action for the yello button.

    On a Raspi 4 (LE 10.0.2) and on an Odroid N2+ (CoreElec) this works with the same two files as expected. Is there anything that can prevent kodi from respecting user defined keys?

    Currently I am not on the location whre the Raspi 2 is working (my parents home). I am logged in via VPN and ssh. Is there a way I can simulate a certain CEC-keypress on command line? It seems that kodi-send can only send actions to kodi, not the keypress which should trigger the action.

  • I would start by installing keymap editor and try to find out that the yellow button should actually be "yellow"in the keymap and not some number..

    Just try to create a random function for the yellow key with the addon and check your keymap.xml if the yellow is actually 'yellow' and not something else.

    Also some keys are hard coded and cannot be programmed...but the yellow shouldn't be one of them..


    Just checked on my remote the yellow button is '253'

    keymap looks like this

    Code
    <keymap>
     <global>
         <keyboard>
           <key id="253">updatelibrary(video)</key>
         </keyboard>
       </global>
    </keymap>

    Edited once, last by Mario77: Merged a post created by Mario77 into this post. (June 25, 2022 at 12:45 AM).

  • Thank you, that was very helpful. I changed my file, let my mother press the yellow key and can confirm that it works.

    On my own Samsung TV (a newer genration model) the yellow key is identified as 'remote' and 'yellow'. Maybe a different CEC protocol.

    Strange is, that the red key on my mothers TV remote does not work as expected with key id 251 - kodi still trys to start PVR.

    Anyway, I just needed one key to call my script.