fix keyEvent Bug