BGE: Having trouble with getting my character to turn properly My current logic brick set up for my character

So Im trying to learn the BGE by making a side-scrolling platformer game, and my character is fully animated and i have it set up to move with in the logic editor . moving forward being "D" and moving backward being "A". And with these controls my character walks backwards, with out turning around. So i want him to turn around when I pick "A". I accomplished this by setting it up were when I pick "A" it walks backwards and turns 180 degrees. But the problem with this is it stays at the 180 so my "D" would move in the same direction as my "A". I would have to pick "A" again to put my character in the position were "D" would move him forward. So is there a way to make him turn 180 degrees when pressing "D" only when "A" has been pressed. Or maybe a even better way of doing it than the way i did it. Thanks I hope I explained it well enough.
After much troubleshooting I found that making my character turn 180 degrees was a bad way in turning so is used the edit object actuator, and used the track to object feature.


I hope this helps anyone that gets stuck with the same problem