'Determines if it is a key event'

def post_event(self):

    if (len(self.events) == 0):
        warnings.warn(u'No    events    yet')
    else:
        self.keyormouse = (self.events[(-1)].name == u'key_press_event')
