2015-04-06, 02:37
This makes a world of difference for the XBOX-ONE remote.
Thanks!
Thanks!
(2015-04-05, 00:20)Roby77 Wrote: interested too, tried in windows but it doesn't work
checked the path and it's ok (copy/paste the path in windows explorer)
<keymap>
<global>
<keyboard>
<volume_up>RunScript("C:\Utenti\Roby\AppData\Roaming\kodi\userdata\volume.py", "up")</volume_up>
<volume_down>RunScript("C:\Utenti\Roby\AppData\Roaming\kodi\userdata\volume.py", "down")</volume_down>
</keyboard>
</global>
</keymap>
<keymap>
<global>
<keyboard>
<f9>RunScript("C:\Users\<username>\AppData\Roaming\Kodi\userdata\volume.py", "down")</f9>
<f10>RunScript("C:\Users\<username>\AppData\Roaming\Kodi\userdata\volume.py", "up")</f10>
</keyboard>
</global>
</keymap>
#!/usr/bin/python
import json, sys, xbmc
def chg_volume (vol, step):
vol_min = 0
vol_max = 100
vol_lvl = vol + step
# some sanity checks
if vol_lvl > vol_max : vol_lvl = vol_max
if vol_lvl < vol_min : vol_lvl = vol_min
return vol_lvl;
step = int(sys.argv[1])
rpc = '{"jsonrpc": "2.0", "method": "Application.GetProperties", "params": {"properties": ["volume"]}, "id": 1}'
vol = json.loads(xbmc.executeJSONRPC(rpc))["result"]["volume"]
xbmc.executebuiltin('SetVolume(%d,showVolumeBar)' % (chg_volume(vol, step)))
<keymap>
<global>
<keyboard>
<volume_up>RunScript("/path/to/chg_volume.py", "8")</volume_up>
<volume_down>RunScript("/path/to/chg_volume.py", "-5")</volume_down>
</keyboard>
</global>
</keymap>
(2015-04-06, 02:37)FishOil Wrote: This makes a world of difference for the XBOX-ONE remote.Tried using this with my xbox-one remote as well. Experiencing major latency though so had to revert back to default, running xbian on imx6. Any ideas for achieving the same effect without having to call an external python script?
Thanks!
xbindkeys
"xte 'keyup XF86AudioRaiseVolume' 'str +++++++++'"
XF86AudioRaiseVolume
"xte 'keyup XF86AudioLowerVolume' 'str ---------'"
XF86AudioLowerVolume