The blue gear is input.
A disengaging idler rises in a slot because of gear forces when the drive direction is reversed.
The mechanism should be used only for low speed because of gear collision.
During the transmission if the output green gear is driven by an other source to make it rotate faster, the idler also rises to disconnect the transmission from the blue gear. So the mechanism can act as an overrunning clutch.