def keyScancode(self, code, isPressed):
        """
        @summary: record key event as scancode
        @param code: scancode code
        @param isPressed: True if a key press event
        """
        keyEvent = KeyEventScancode()
        keyEvent.code.value = code
        keyEvent.isPressed.value = 0 if isPressed else 1
        self.rec(keyEvent)
def keyScancode ( self , code , isPressed ) : keyEvent = KeyEventScancode ( ) keyEvent . code . value = code keyEvent . isPressed . value = 0 if isPressed else 1 self . rec ( keyEvent )
@summary: record key event as scancode
        @param code: scancode code
        @param isPressed: True if a key press event