change key event to keydown