Kodi Community Forum

Full Version: is there a keypress statement?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can i send a keypress to xbmc from a python script?
use the executehttpapi() command with sendkey. pydocs and manual links in my signature
this is what im using and i get no responce

responce=xbmc.executehttpapi("SendKey(244)")

244 is the select remote key

also tried http://ipaddress/xbmcCmds/xbmcHttp?comma...ameter=244

and again nothing...

This is the second documented function that doesnt work in XBMC that ive come across



Nuka1195 Wrote:use the executehttpapi() command with sendkey. pydocs and manual links in my signature
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....
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
okay dokey, i got there in the end, hopefully others will pick this up on a search because its had me perplexed for hours