As red, use down to turn the direction to go, then you use up to go the opposite direction. As purple, use s to turn the direction you want to go, and you use w to go the other direction.
Take a look inside to see how it works