PDA

View Full Version : React on keypress event in XBMC script?


junk
2009-06-18, 00:24
Hi there,

Is it possible to react on keypress in a XBMC script?

For example, something like this:
import xbmc, xbmcgui

class MyWindow(xbmcgui.Window):
def __init__(self):
pass

def onKeyPress(key):
xbmcgui.Dialog().ok("Key", "You pressed: " + key)

Thanks in advance!

junk
2009-06-18, 00:59
Found a workaround:

def doAction(action):
if action == 7: # ACTION_PARENT_DIR
doWhatIWantToDoAtKeyPress()

Would still like to know if the scenario I first described is possible though...