Looking for some assistance with capturing of key presses...
#1
I was wondering if it is possible to be able to 'capture' specific key presses(such as Play, Select(ok), Queue(0), exit) with in a script but still pass the other key presses to the skin.

The scenerio is the following:

Script starts...
Opens the Video Library(movies)
Allow the user to move around the Video Library,
build a playlist by having the user select Movies by pressing play, select, or queue.
Stopping the script if the user tries to leave the Library

I have seen references to using WindowDialog() to do this but I am a little lost and I have not been able to find any examples of this being done.

Any help would be appreciated..
Reply
#2
Same question here, left unanswered yesterday on IRC.

I am trying to capture volume up/down keys to set the audio level on a squeezebox system (without changing xbmc own audio level, of course).
Reply
#3
The only way that I know if is popping up a WindowDialog so you have modal focus - that's the only way you'll receive events. Whether or not that will capture it I don't know. The obvious problem then is that you don't want a modal dialog as then the user can't interact with the movie library window - i.e. you'd have to completely simulate it. This doesn't sound reasonable at all to me.

I'm not sure if having a script placed inbetween input and actions is a good thing to have in general or not.

Perhaps you could expand on what exactly it is that you're wanting to accomplish, and we can brainstorm on the best way to get it doable.

Cheers,
Jonathan
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
Reply
#4
I didn't think simulating the video library was a good way to go either.

Essentially what I would like to accomplish is to simplify queuing of movies(in a playlist) for the user of the script, by capturing the common key presses that might be used(Play, Select(Ok), Queue). The script runs well using Queue, I was just hoping to avoid the requesting of making it simpler and to avoid frustration of the user(accidentally pressed Play or Select and the Movies starts)

It would also be nice to capture a key press to clear the present queue if the user messed up. I can do this now by just testing to see if the window has changed(ie the user returned home - clear playlist & stop script)

If it is not feasible to do this, I'll just have to reinforce that 'q' and '0' are to queue the movies(to users) and that if the user accidentally presses Play or Select, to stop the movie and continue to add movies to queue.
Reply

Logout Mark Read Team Forum Stats Members Help
Looking for some assistance with capturing of key presses...0