Keymaps - one button to perform task twice?
#1
Hi, my OS is Windows 10. I am using an Xbox One Elite Controller. I adjusted the joystick.xml in userdata and almost everything works as I need it.

Except for one thing:

Is there a way to assign one action twice to a single button? Without having to push it twice.

Because pushing down twice leads to the fanart being shown when I am browsing through my library. I'd like to press it just once as it has no other function in that area.

This is the code for pressing down:
Code:
<down>Down</down>

Any help is highly appreciated!

Thank you
3000
Reply
#2
I'd do that with a python script. There may be an addon to do the same thing, no idea.

Script method...

Open a new file in your text editor and paste the following:
Code:
import xbmc

xbmc.executebuiltin( "XBMC.Action(Down)" )
xbmc.executebuiltin( "XBMC.Action(Down)" )
exit()
Save that file to your userdata folder as 'doubledown.py'. Be careful not to end up with 'doubledown.py.txt'.

Now adjust your keymap to point to that script.
In the section(s) you want this to apply replace
Code:
<down>Down</down>
with
Code:
<down>RunScript(special://masterprofile/doubledown.py)</down>

Start kodi, check it works.
Reply
#3
trogggy, it works Smile
Really enhances my experience. Plus I learnt how to use Python in Keymaps. Really awesome.

THANK YOU SO MUCH!
Reply
#4
No worries. Glad it worked.
Reply

Logout Mark Read Team Forum Stats Members Help
Keymaps - one button to perform task twice?0