PDA

View Full Version : How to find out if keyboard-Input is allowed.


mcfan
2009-06-15, 17:26
In my script i want to get information if keyboard input is needed,
for example "search" -in Music or if file has to be renamed.

I dont want to use Onscreen-Keyboard and also i have no keyboard attached.

If the user can use keyboard to type something i want to show a keyboard on my remote's display, so i need info if typing is allowed.

-mcfan-

jmarshall
2009-06-16, 00:35
I'm not quite sure what it is you are after - do you want to know when XBMC is allowing direct keyboard access to the control versus where it's filtering everything through keymap.xml?

Is your script running in the background or something?

mcfan
2009-06-16, 22:55
okay, let me try to explain in detail:

My script is running in the background using XML-RPC to communicate with
my server application outside xbmc.

The server is also written in python and does the following:

To control xbmc the server manages communication RS232 <> XBMC
using the xbmc event client (so its also a client) to send commands to
xbmc. To allow bi-directional communication it can send request or handle
events coming from my script running in background of xbmc.

Example:
When media is played the "play"-Button on my remote changes to "stop" .
The same way i want to get to know if "real" keyboard input is required so
a small onscreen-keyboard can be shown up -i think you got me right.

By the way - another problem - i have already read of it somewhere else in
this forum is that if python script is running in background xbmc fails to exit, it just hangs.

But i am happy if you can help me with my first problem :D

jmarshall
2009-06-17, 01:36
A state would have to be added that you can query in order to know this.

Add a feature request to trac.

If you want to look at coding something up, you'd add a state variable to the infomanager, then set that state variable whenever the fullscreen OSD is on screen, or whenever an edit control has focus.

Cheers,
Jonathan

mcfan
2009-06-17, 09:59
With:
keyb = xbmc.getCondVisibility("Window.IsVisible(virtualkeyboard)")
i can get the info if keyboard is visible (that was too easy) but for the edit
control focus i don't have a clue.
Before i make a feature request for this - has anybody an idea???

@Jonathan: I really would like to code this myself, but first i have to get an
overview. Add this to the "List of Boolean Conditions" would be perfect - i think this is what you meant.
:D

jmarshall
2009-06-17, 10:24
That's the basic idea, yes.