In order to toggle between Mirroring and Screen Extension
, I used the program "global hotkey". it's donationware. you can configure it easy: just copy a folder "global hotkey" (where you put everything that's in the dmg file!) to utilities. afterwards you copy the MirrorDisplay application (also donationware, i think) to utilities. Now you create an alias out of the MirrorDisplay application. rename that alisa to "F3" (for example), then move it to "Applications" folder INSIDE the Global hotkey folder. Delete other shortcuts in the different subfolders, if you don't need them (optional).
drag the global hotkey application into startup items of your user accounts (you can find it in user prefpane).
NOW YOU CAN TOGGLE BETWEEN MIRRORING AND SCREEN EXTENSION BY PRESSING F3 (or another F key you chose...)
edit: global hotkey link:http://www.monkeybreadsoftware.de/Softw ... tkey.shtml