switching from keyrelease to keypress