Is there a way to play animation on focus?

You asked about Focus. It does not require input per se. Use whatever input you need.