class Window(QtGui.QWidget):

    def __init__(self):
        self.setFocus()
self.__modifier_pressed = False

def keyPressEvent(self, event):
    pass
Pipe all keyboard commands automatically to an embedded mplayer instance when a modifier key is pressed in pyqt4