only update direction if the button pressed is a direction