Add key event handling