PDA

View Full Version : HTTP-API SendKey: trigger & directional thumb?


cplusplus
2007-08-07, 15:24
Hi,

How can I fire the left & right trigger and the directional thumb sticks (up/down/left/right) with SendKey (http://www.xboxmediacenter.com/wiki/index.php?title=WebServerHTTP-API#Action_commands)?
(http://xbox/xbmcCmds/xbmcHttp?command=SendKey&parameter=xxx)

Is it even possible? I can't get it to work using the keycodes defined in key.h (http://xbmc.svn.sourceforge.net/viewvc/xbmc/tags/XBMC_2_0_1/XBMC/guilib/Key.h?view=markup).
All other buttons including the d-pad work fine though (latest T3CH SVN build).

Thanks.

nad
2007-08-10, 13:27
I expect it is because you are not also including the appropriate values of the stick positions. For example, right thumb down would have a key code of 267 but the stick y axis should also indicate that it is down, so you would use something like:

http://xbox/xbmcCmds/xbmcHttp?command=SendKey&parameter=267;0;0;0;0;0;-1

Note the -1 which indicates RightThumbY's position. Have a look on the wiki here http://www.xboxmediacenter.com/wiki/index.php?title=WebServerHTTP-API

cplusplus
2007-08-13, 16:28
Thanks for pointing that out.

However, is it possible to control exactly how far/deep the stick is virtually being pushed? Just like a real Xbox controller.
Same applies to the triggers, as they can be hold in different positions.

I couldn't find documentation on this. I rather have an answer from the experts here than trying random values (instead of -1), it is greatly appreciated. :)

nad
2007-08-13, 22:09
From my recollection the figures run from +1 to -1 on each axis, so a value of -1 on the y axis is the stick all the way down, +1 all the way up (0 in the centre/neutral position).