def get_event_string(self, evtype, code):
        """Get the string name of the event."""
        if WIN and evtype == 'Key':
            # If we can map the code to a common one then do it
            try:
                code = self.codes['wincodes'][code]
            except KeyError:
                pass
        try:
            return self.codes[evtype][code]
        except KeyError:
            raise UnknownEventCode("We don't know this event.", evtype, code)
def get_event_string ( self , evtype , code ) : if WIN and evtype == 'Key' : try : code = self . codes [ 'wincodes' ] [ code ] except KeyError : pass try : return self . codes [ evtype ] [ code ] except KeyError : raise UnknownEventCode ( "We don't know this event." , evtype , code )
Get the string name of the event.