A couple of times for some reason I have accidentally touched the windshield washer stem when I meant to touch the joystick gear selector. What would happen if I were to do the opposite while driving? Is there an interlock/idiot protector that prevents the transmission from going into reverse while driving forward? How about neutral? If I were to accidentally shift a Gen2 prius into neutral, is it fine to shift back to drive while costing forward or should one coast to a stop first?
From page 144 of my wife's 2007 owners' manual, and I'm sure they are all the same: So, the answer to all your questions is "not to worry." And quite a few people shift into neutral and back to drive a lot while driving so they can coast. But you can also coast with a trained right foot on the accelerator pedal.
There is an interlock that prevents shifting into P or R, while driving above about 3 mph in D or B. If you attempt to shift to N, it makes you wait 1.5 seconds before going to N. It is safe to shift back to D. Oddly, the interlock acts by shifting to N. So if you really wanted to be in N (you never want to be in N) it is faster to try to shift to R. So Toyota has your back and nothing horrible will happen.
Mine will shift from D/B to R at around 6 MPH or lower. The only time I do that (on purpose) is for my yearly-or-so brake drag test, where I head out 15 minutes or so on a lightly-traveled road where I won't have to touch the brakes, and turn into a parking lot at the end that usually has room to circle around in B and then stop by shifting to R from 6 MPH and then stabbing the brake at zero (when it won't produce any heat). Then I can get out and feel the four rotors and if they're all stone cold, I know I'm not developing any brake-drag issue. The car doesn't mind at all, as nothing happens other than switching the phase of some electric currents and smoothly decelerating the car.