def sendKeyEvent(self, e, isPressed):
        """
        @summary: Convert Qt key press event to RDP press event
        @param e: QKeyEvent
        @param isPressed: event come from press or release action
        """
        code = e.nativeScanCode()
        if sys.platform == "linux2":
            code -= 8
        self._controller.sendKeyEventScancode(code, isPressed)
def sendKeyEvent ( self , e , isPressed ) : code = e . nativeScanCode ( ) if sys . platform == "linux2" : code -= 8 self . _controller . sendKeyEventScancode ( code , isPressed )
@summary: Convert Qt key press event to RDP press event
        @param e: QKeyEvent
        @param isPressed: event come from press or release action