Kodi Community Forum

Full Version: Script and Player : catch event
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

when playing a movie or tv stream from a custom python script with xbmc.Player(), I would like to be able to catch some keyboard events ?
The pb is that the python script seems to be under the Player, and can't handle any event.
How can I proceed ?

I would like to play the next/prev item of my movie list (constructed with a WindowXML GUI), or to play a specific item when pressing some particular keyboard keys, and when already playing a file. In fact like using a TV remote (zapping with direct channel acces by their number, even if a channel is already playing)

Thanks in advance.
make your window class a dialog
xbmcgui.WindowDialog or a xbmcgui.WindowXMLDialog ?
I tried with a xbmcgui.WindowXMLDialog and the problem is that the video is now hidden under my dialog.
I fact I would like to view the video in fullscreen mode and the script to be able to handle some keycode.
i use this in TWC script.

<visible>!VideoPlayer.IsFullscreen</visible>
!!!!! Thanks a lot !!!!!