Im trying to make this cool animation work when I jump..But I can't get it to work...

I have my variables and funtion onKeyDown and I call upon the function but how would I code when i press "x" I play an animation