The orange input gear may change rotation direction but the rotation direction of the blue and green gears keeps unchanged.
The yellow idle gear moves in the curved slot because of gear forces.
There is a slight lag during the input gear's reverse.
The mechanism should be used only for low speed case because of gear collision.
The STEP files for this video are available at:
https://www.mediafire.com/?csl2a21rf292m4b
See Lego prototype of the same working principle:
https://www.youtube.com/watch?v=N67IN
آی-ویدئو