Animation by Direction

hello
I want to animate a character based on direction change. I would like to animate “Idle” if it is not moving left or right. How can I fix this?

you can check if player doesnt press left and right (without “or”) and add trigger once
then it will work i think (you can add “wait x seconds” before actions if it bugs)