How can I play a widget's animation through a key press?

Thank you so much for your help! It worked, thank you!