Kodi Community Forum
WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps (/showthread.php?tid=8760)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38


- pulp_136 - 2007-06-15

Hi Nad,

I tried the commands:

XBMC.sendKey(26) 'Cycle Subs
XBMC.sendKey(56) 'Cycle Audio
XBMC.sendKey(25) 'Subs On/Off
XBMC.sendKey(19) 'Toggle AR

According to key.h file instructions the should execute various orders, but nothing happens. I found the key.h file on the net since it wasn't in the xbmc folder.

The commands:
XBMC.restartXBMC()
XBMC.shutdown()
XBMC.pausePlaying()
XBMC.stopPlaying()

execute properly. It's only the sendkey commands that I have problems with.

Am I doing something wrong? Could you please try these sendkey commands if they work on your system?

Cheers,
pulp


- nad - 2007-06-16

Pulp, this is a bug (or perhaps I designed it this way - I can't remember) but when using SendKey in that fashion you can only send key strokes when the on screeen keyboard is being displayed. I'll fix it.


- nad - 2007-06-17

Pulp, I have changed SendKey so that the codes it sends are now fully processed but I have also added the command "Action" which I believe provides what you are after more directly:

Action(25) ' subs on/off

I'll update the Wiki shortly.

etc


- clownshoes19 - 2007-06-17

This doesn't work on Windows based Smartphones? I get a NotSupportedException. If this is the case, damn. I mean I can use an touchpad emulator if it can at least run.


- pulp_136 - 2007-06-18

thank you Nad,
I'll try it this evening

pulp


- pulp_136 - 2007-06-18

Sorry for my ignorance but what exactly do I have to download to use the latest changes? I hope I don't have to abandon my xbmc version (latest stable 2.0.1).


- pike - 2007-06-18

@pulp_136

OFCOURSE you must use a fresh binary to get these changes. a T3CH was released just yesterday with these changes included


- tslayer - 2007-06-18

Yes you do. Change is in current SVN. You need a new build.

Oops... Just noticed pike replied.


- nad - 2007-06-18

ClownShoes: what are you trying to do on your smartphone?
The PocketPC xbmc client app that I wrote won't work without changes even if it is just to take account of the smaller screen size. However a good starting point is to make sure you have .NET CF v2 installed on your smartphone before running my client app.
If you are trying to do something else ignore what I just said.


- pulp_136 - 2007-06-20

Thanks everyone

The SendKey commands still do nothing, but the action commands execute properly. However, it happened what I was afraid of. I get no feedback from the OSD when, for example, I change the subtitles, with the new selected language (like every common DVD Player would do). So you change blindly and you have to wait until the next dialogue to see what you have chosen. Same with audio stream and subs on/off. Any way to change that?


- nad - 2007-06-20

Pulp:

Are you sure SendKey is not working?

While playing a movie try:

SendKey(247)

which should show/hide the OSD.

When an onscreen keyboard is being displayed try:

SendKey(61793)

which should send an "a" (61696+asc("a"))


- pulp_136 - 2007-06-26

Yes, SendKey(247) works (shows/hides OSD).
Action(247) doesn't work (does nothing).

Code 247 isn't in the key.h file that I have. There seems to be some other codelist that I'm not aware of. Could someone inform me?

thanks, pulp


- nad - 2007-06-26

guilib/key.h is where the actions are defined.

You will also find the magic 0xF100 = 61696 for specifying ascii sendkey values.


- pulp_136 - 2007-06-27

thanks, Nad

I found a new key.h file. Code 247 is still not there. About your next comment (0xF100 = 61696) you will have to explain me more.

I'm actually looking for the video zoom function (that I personally find very convenient in order to crop the black bars). Everything that I have found so far is for images only. Have I overlooked it?

pulp


- nad - 2007-06-28

You are getting confused.

SendKey sends key and button codes. Action sends the action codes as defined in key.h i.e. those labelled ACTION_XXXXXX

SendKey(247) is the code that is sent by the MENU button on the xbox remote. (Defined in XBIRRemote.h)

You will also notice in key.h

"#define KEY_ASCII 0xF100"

0xF100 is the hex value of 61793 decimal. If you want to send codes that would be generated by typing on a keyboard (either a real keyboard connected directly to your xbox or a virtual keyboard as displayed by xbmc)you use SendKey with a parameter of 61796 + the ascii value of the key to be sent.