Fix key press event