HTTP API Sendkey?
#16
elite1967 Wrote:I would be interested too in knowing what is the key code of a key + shift:
I mean if key 'E' has a keycode = 0xF045, what is the keycode for Shift+E (or Ctrl+E, etc.)?

thanks

Not really sure why it matters, since the API is deprecated.

But
e= 0xF045
E= 0x2F045
^e= 0x1F045
Reply
#17
darkscout Wrote:Not really sure why it matters, since the API is deprecated.

But
e= 0xF045
E= 0x2F045
^e= 0x1F045

Thanks a lot!

I know that is deprecated, but still works and it's the only way to send keycommands to XBMC, that I know of.

Or maybe is there another way to send keyboard commands to XBMC, other than HTTP_API SendKey?

I would appreciate any advice.

thanks
Reply
#18
unfortunately sending 0x2F045 does not seem to mimic the action of pressing
Shift-E which is what we need to be able to jump to, for example, songs that start with E.No

Does the JSON interface provide some means of doing this?
Image
VoxCommando.com
Reply
#19
jitterjames Wrote:Does the JSON interface provide some means of doing this?

It does not. Its on the roadmap though. For jsonrpc to support it properly we need to cleanup core with input handling quite much, atleast if we want a stable input wrapper and not how httpapi and eventserver is currently (with lots of small weird bugs).

So currently for input, httpapi or eventserver is the ways to go about it and it depends abit on your clients needs. I would say that eventserver is the preferred way but as said it depends on your preferences.

Cheers,
Tobias
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#20
I would not require keyboard emulation at all, if JSON provide commands to navigate, search, filter, jump to a particular entry. That sort of thing.

If I could jump to item "item name" that would be great, or if I could filter on a string etc. It would also be nice if I could jump to the "first" item. currently the home key does this, but not very well, because the home key will take you to the zeroth or first item. It could be the first item, or it could be the .. link to parent folder, depending on user settings.

as I see it now, there is no method at all using any system, to jump to a letter reliably.
Image
VoxCommando.com
Reply
#21
topfs2 Wrote:It does not. Its on the roadmap though. For jsonrpc to support it properly we need to cleanup core with input handling quite much, atleast if we want a stable input wrapper and not how httpapi and eventserver is currently (with lots of small weird bugs).

So currently for input, httpapi or eventserver is the ways to go about it and it depends abit on your clients needs. I would say that eventserver is the preferred way but as said it depends on your preferences.

Cheers,
Tobias

thanks topfs2 for the clarification.

Do you know how I can send a key with shift (shift+E, for example):
0x2F045 does not seem to work.

thanks
Reply
#22
elite1967 Wrote:thanks topfs2 for the clarification.

Do you know how I can send a key with shift (shift+E, for example):
0x2F045 does not seem to work.

thanks

Fire up a debug log.

Press the Shift-e on the keyboard.
Send a "Shift-e" over the api. See what the log says is happening. (If you can build from SVN things were cleaned up for debugging).

It could also have to do with a "bug" I'm running into in EventServer. http://forum.xbmc.org/showthread.php?tid=86397

0x2F045 > 0xFFFF, so anything that is 16 bits is going to crop it. It'll still send the proper character, it's just that it won't have any modifier keys.

Paste the debug log and go from there.
Reply
#23
jitterjames Wrote:I would not require keyboard emulation at all, if JSON provide commands to navigate, search, filter, jump to a particular entry. That sort of thing.

If I could jump to item "item name" that would be great, or if I could filter on a string etc. It would also be nice if I could jump to the "first" item. currently the home key does this, but not very well, because the home key will take you to the zeroth or first item. It could be the first item, or it could be the .. link to parent folder, depending on user settings.

as I see it now, there is no method at all using any system, to jump to a letter reliably.

Navigate the GUI by actions, i.e. up down etc. That makes sense for sure in JSONRPC, just not added actually. Your more than welcome to do a feature request (ticket) on trac. cc me and please be as informative you can on there. e.g. name methods and how they should behave, what paremeters to take etc. The more thought you put into it the faster it will be added (since then I or someone else won't need to think, we like not to think Smile)
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#24
darkscout Wrote:Fire up a debug log.

Press the Shift-e on the keyboard.
Send a "Shift-e" over the api. See what the log says is happening. (If you can build from SVN things were cleaned up for debugging).

It could also have to do with a "bug" I'm running into in EventServer. http://forum.xbmc.org/showthread.php?tid=86397

0x2F045 > 0xFFFF, so anything that is 16 bits is going to crop it. It'll still send the proper character, it's just that it won't have any modifier keys.

Paste the debug log and go from there.

Here is the log sending key 0x2F045 (shift+e) using HTTP Api:
Code:
19:27:39 T:4492 M:887177216   DEBUG: HttpApi Start command: SendKey  paras: SendKey; 0x2F045
19:27:39 T:4492 M:887177216   DEBUG: CApplication::OnKey: 192581 pressed, action is

Here is the log sending key 0xF045 (e) using HTTP Api:
Code:
19:28:31 T:4492 M:884113408   DEBUG: HttpApi Start command: SendKey  paras: SendKey; 0xF045
19:28:31 T:4492 M:884113408   DEBUG: CApplication::OnKey: 61509 pressed, action is


*** Only this works ***
Here is the log pressing 'shift+e' on the keyboard:
Code:
19:29:48 T:4492 M:893108224   DEBUG: CApplication::OnKey: 192581 pressed, trying keyboard action 61765

Any clue?
Reply
#25
elite1967 Wrote:Here is the log sending key 0x2F045 (shift+e) using HTTP Api:
Code:
19:27:39 T:4492 M:887177216   DEBUG: HttpApi Start command: SendKey  paras: SendKey; 0x2F045
19:27:39 T:4492 M:887177216   DEBUG: CApplication::OnKey: 192581 pressed, action is

Here is the log sending key 0xF045 (e) using HTTP Api:
Code:
19:28:31 T:4492 M:884113408   DEBUG: HttpApi Start command: SendKey  paras: SendKey; 0xF045
19:28:31 T:4492 M:884113408   DEBUG: CApplication::OnKey: 61509 pressed, action is


*** Only this works ***
Here is the log pressing 'shift+e' on the keyboard:
Code:
19:29:48 T:4492 M:893108224   DEBUG: CApplication::OnKey: 192581 pressed, trying keyboard action 61765

Any clue?

Looks like the same thing I'm running into with EventServer.

Good news is I have a bug filed: http://trac.xbmc.org/ticket/10817
Bad news is I have no clue how to fix it.

The 'OnKey' events are identical. Except I don't think that the key variable is being populated correctly when it is coming from EventServer (and now I found out HTTP API).

61509 = 0xF045
192581 = 0x2F045
Reply

Logout Mark Read Team Forum Stats Members Help
HTTP API Sendkey?0