(self, scan)
Insert a key-up event.
Insert a key-up event.
Insert a key - up event .
def _key_up(self, scan):
        """Insert a key-up event."""
        if scan is not None:
            self.last_scancode = 0x80 + scan
        try:
            # switch off ephemeral modifiers
            self.mod &= ~MODIFIER[scan]
        except KeyError:
           pass
        # ALT+keycode
        if scan == scancode.ALT and self.keypad_ascii:
            char = int2byte(int(self.keypad_ascii)%256)
            if char == b'\0':
                char = b'\0\0'
            self.buf.append(char, None)
            self.keypad_ascii = b''
def _key_up ( self , scan ) : if scan is not None : self . last_scancode = 0x80 + scan try : # switch off ephemeral modifiers self . mod &= ~ MODIFIER [ scan ] except KeyError : pass # ALT+keycode if scan == scancode . ALT and self . keypad_ascii : char = int2byte ( int ( self . keypad_ascii ) % 256 ) if char == b'\0' : char = b'\0\0' self . buf . append ( char , None ) self . keypad_ascii = b''