Fix to enter keypress routine