It actually is quite simple to do so...
First, you need to download some Animator Playmaker actions (available in the section Tutorial of this website, of course). Second, you need to adjust the Animator Controller for your character so it read float values between -1 and 1.
When you press the corresponding key to move left, the horizontal axis receives a value between 0 and -1, so you should turn, walk or run left whenever horizontal axis is less 0. Do the opposite for dealing with move, walk or run right, as the horizontal axis should be receiving a value between 0 and +1 and hence your animator controller should do the left actions whenever the horizontal axis is greater than 0.
Suppose you have animations for moving 45°, 90°, 135° and 180° in each direction: what you need to do in this case is to setup a range for each motion. For example, use 0.3 for turning right 45°, 0.5 for turning right 90°, 0.7 for turning right 135° and 0.9 for turning right 180°, and do the opposite for left motions.