Keyboard and send keys
#1
Running XBMClive. I do almost all my control using the HTTPapi, but have come up against a situation I can not understand.

While a movie is playing Using either a keyboard attached to the PC or sending a command over the http interface from another PC using SendKeys can do lots of things. OSD display, Pause movie, Play move, Fast Fwd, Fast Rew, and others. The ones giving me problems are previous and next which should move by chapter.

If I use the keyboard either "[" or Up arrow will advance 10 minutes, and "]" or down arrow will back up 10 minutes.

However if I send the "[" using send keys "sendkey(0xF05B)" or "]" using "sendkeys(0xF05D)" nothing happens. I would have thought that the send keys command would send any keyboard symbol using its ascii index.

I am not at all sure what needs to be done to send any of the arrows or non ascii keys.

I would really appreciate any advice or help on this!
Reply
#2
Did you try via xbmcCmds/xbmcHttp?command=Action(*) (key.h)
or xbmcCmds/xbmcHttp?command=ExecBuiltIn(Action(*))

How did you get XBMClive to respond to http?
I can not make this happen.
Reply
#3
On the http side no sweat. Initally just played with it using a browser. Once I was confident I knew what was going on I wrote a VB6 windows app to play and test with. I have it working pretty well now. It can ping, WOL, Send commands, send actions send keys, and playmovies

The basic prefix for raw TCPIP work use using a tcpip socket is:
GET /xbmcCmds/xbmcHttp?command=
sent to port 8080 at the IP of the xbmc box

I tried all sorts of versions of sendkey and eventually determined that not all the standard keybopard characters are mapped, or the actions were dependent on what XBMC (window) was open which sort of makes sense as key events are normally sent to a window.

Actions() works much better, but I use a combination of keys and actions, sometimes I send an action and sometimes I send a key. For example sending as keys "[" and "]" which should be previous and next do not work, but the action codes of 22 and 23 did advance 10 minutes or backup 10 minutes in a movie. I could not figure out how to do chapter next or previous. I could never figure out how to send the arrows as keys but can send them as actions

Trying to figure out key.h gave me a headache as I generally do not program in "C" variants
Reply

Logout Mark Read Team Forum Stats Members Help
Keyboard and send keys0