adds key event