compensate for keypress delay