'Process a key click event.  This maps certain keys to appropriate
mouse click events.'

def key_event(self):

    event = self.events[(-1)]
    if (event.key is None):
        return
    key = event.key.lower()
    if (key in [u'backspace', u'delete']):
        self.mouse_event_pop(event)
    elif (key in [u'escape', u'enter']):
        self.mouse_event_stop(event)
    else:
        self.mouse_event_add(event)
