Kodi Community Forum

Full Version: Keymap general window (solved)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, first post here Smile
I've managed to nearly complete my first "project" within Kodi. I've assigned a button on the remote to turn off a light with Tellstick via IFTTT.

I launch a python script from keymap.xml that sends a web-request to IFTTT via Curl Smile

It works when I'm one step in from the main menu in Kodi, like Videos or System.

But when I'm in the main menu it doesn't work.

I've put the code within Global as I thought that would make the keymap available everywhere.
But is there any other window-specific tag to use?

Code:
<keymap>
  <global>
    <keyboard>
    <a mod="ctrl,alt">RunScript(/storage/.kodi/userdata/scripts/light_off.py)</a>
    </keyboard>
  </global>
</keymap>
have you tried putting it under <Home> as well?
No...
I thought Global was like "One tag to rule them all" Smile
I'll try it when I get home.
Nope Global is only a fallback if the button is unassigned in the specific context, if the button is already assigned in the specific context this over rules anything in Global.
Yes, but in my case the button (Ctrl-Alt-A) is unassinged everywhere except in Global?
I guess I just misunderstood something Smile
I'll figure it out.
As you suggested, "home" was the key.
I had to include both global and home though.
So global is a fallback, unless you're at the main menu Smile

Thanks for the help!

Code:
<keymap>
  <global>
    <keyboard>
    <a mod="ctrl,alt">RunScript(/storage/.kodi/userdata/scripts/light_off.py)</a>
    </keyboard>
  </global>

  <home>
    <keyboard>
    <a mod="ctrl,alt">RunScript(/storage/.kodi/userdata/scripts/light_off.py)</a>
    </keyboard>
  </home>
</keymap>