How can you handle what? Once the player presses the W key, you would enter a new state which ignores all player inputs, just plays the turning animation and once it has finished transitions into the idle-state. Which of these isn't working for you? Why not?