Kodi Community Forum
Keymap general window (solved) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Keymap general window (solved) (/showthread.php?tid=303695)



Keymap general window (solved) - xl15 - 2017-01-10

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>



RE: Keymap general window - Shogunreaper - 2017-01-10

have you tried putting it under <Home> as well?


RE: Keymap general window - xl15 - 2017-01-10

No...
I thought Global was like "One tag to rule them all" Smile
I'll try it when I get home.


RE: Keymap general window - jjd-uk - 2017-01-10

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.


RE: Keymap general window - xl15 - 2017-01-10

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.


RE: Keymap general window - xl15 - 2017-01-11

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>