HTTP API Sendkey?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
elite1967 Offline
Senior Member
Posts: 165
Joined: Apr 2010
Reputation: 0
Post: #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
find quote
darkscout Offline
Posting Freak
Posts: 2,148
Joined: Jul 2008
Reputation: 12
Post: #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.
find quote
topfs2 Offline
Team-XBMC Developer
Posts: 3,825
Joined: Dec 2007
Reputation: 8
Post: #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: badge.gif]

"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#."
find quote
elite1967 Offline
Senior Member
Posts: 165
Joined: Apr 2010
Reputation: 0
Post: #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?
find quote
darkscout Offline
Posting Freak
Posts: 2,148
Joined: Jul 2008
Reputation: 12
Post: #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
find quote
Post Reply