stop animation with esc key or tap on screen