Responding to events from keyboard