keypress solution