Add events to track keypress