added event handler for key strokes