Here is how:
You can simulate this by turning off the monitor power.
Open a notepad window and move it to the external monitor.
[Power off the external monitor here for a true test, but leave it on for now. Some video hardware will auto-reposition windows]
click alt-tab until notepad is showing.
Press alt-spacebar
Press the M key.
If your external monitor is logically to the right, use the left arrow key until you see an outline of the window on your laptop screen.
Press Enter.
If you left your external monitor on, you will see that alt-spacebar opens up the window control menu.
Another suggestion would be to invest in a UPS.
Regards,
--VS