How can I reset my idle animation?

I want to reset my idle animation whenever I press the s key to make my character walk down then let go the animation plays but continue to play until I press another directional key. Is there a way to fix this ?

not very sure what are you trying to say, but I guess you can try uncheck HasExitTime in the animation transition arrow
110131-anim-hasexittime.png