Posts: 37
Joined: Apr 2008
Reputation:
0
netmgr
Junior Member
Posts: 37
Can i send a keypress to xbmc from a python script?
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
use the executehttpapi() command with sendkey. pydocs and manual links in my signature
Posts: 37
Joined: Apr 2008
Reputation:
0
netmgr
Junior Member
Posts: 37
ok forget that, unless someone wants to clarify.
When i set xbmc to show keycodes, I get 244 when i press select...however in xbirremote.h then select is defined as 11
Thats why the sendkey failed...because i was sending what xbmc told me was the code for select, when actually it wasnt at all....
Posts: 26,215
Joined: Oct 2003
Reputation:
187
244 is the OBC (original button code), whereas internally, microsoft uses the complement of it (255 - OBC).
The keymapping stuff filters this for you - obviously the webserver's sendkey doesn't do this filtering.
Cheers,
Jonathan
Posts: 37
Joined: Apr 2008
Reputation:
0
netmgr
Junior Member
Posts: 37
okay dokey, i got there in the end, hopefully others will pick this up on a search because its had me perplexed for hours