Ignoring ir-keymap when browsing the TV menu

  • I'm upgrading my HTPC to an Intel NUC. Since my TV doesn't support HDMI-CEC, I figured I could use the inbuilt infrared receiver with ir-keytable to control Kodi. I intend to map the directional buttons and the "Enter" button in the remote to the respective KEY_.

    I occasionally need to open my TV menu to change some output settings. When I do I need to use the same directional buttons to navigate said menu. These button presses would, I assume, also be read by Kodi, so that navigating the TV menu would also unintentionally navigate through Kodi.

    I'm trying to find a way to fix this, but I can't come up with anything. The best I could think of is to map the "menu" button in the remote to some unused keyboard button, and have this execute System.ExecWait(script.sh) in order to call a script similar to the following:

    Bash script
    Code
    #! /bin/bash
    
    test=n
    
    while [ $test != y ]
    do
        read -n 1 -s test
    done

    ... replacing "y" with said unused button. I'm not sure how I would add a "normal" keyboard button on my ir-keytable keymap: do I just write a normal letter (a, b, c, ...) instead of KEY_FOO, or do I need something like KEY_a, KEY_b, KEY_c, ... ?

    Please let me know if there's a simpler solution, as the one above is a literal hack job, and I doubt it would work in practice.

    --------------------------------

    Edit 05/03: this thread has some info about irexec which maybe could be useful for what I want to do?