Can I switch between multiple Macs connected to an iMac with Target Display Mode?
Solution 1:
As I understand it you want to alternate between using the iMac display to display a) itself b) a connected MBP c) a simultaneously connected Mac Mini
When you enter Target Display Mode, you do this on the target, i.e. the iMac. There is no option to tell the iMac which connected computer to display, if there are multiple connected.
According to Use your iMac as a display with Target Display Mode in the section Exit Target Display Mode it mentions,
"Your iMac also exits Target Display Mode if you disconnect the cable that connects the two computers, or if you shut down or sleep either computer"
I have since tested with a Late 2012 iMac 27", Late 2013 15" Macbook Pro, and a Mid 2011, 13", Macbook Air, all running Yosemite.
a) I first connected the MBP and iMac via Thunderbolt cable, and pressed Command-F2 on the iMac. This caused the iMac to go into target display mode and displayed the MBP.
b) I connected the Macbook Air, via a second Thunderbolt cable and this caused the iMac to exit target display mode (as both the Macbook Air and the MBP were not sleeping).
c) I put the MBP to sleep (by closing the lid), and pressed Command-F2 on the iMac. This caused the iMac to go into target display mode and display the Macbook Air.
d) I then alternated target display mode by alternately putting the Macbook Air and the MBP to sleep and pressing Command-F2 on the iMac.
This all seemed to work ok, except one annoyance and that was the iMac seemed to have a dim display every time I entered target display mode. I had to manually adjust the brightness of the iMac display, using the display settings.
NB: From step b) that you cannot have the two computers connected to the iMac awake at the same time and have the iMac in Target Display Mode. At least one of the computers connected must be sleeping. The linked Apple support page fails to mention that.
Solution 2:
In order to switch displays you either need to shut down or disconnect the computer using the monitor i.e. the display "remembers" the active port and will only switch if this original source is turned off or disconnected.
But you can use a physical DisplayPort switcher like this one : http://www.kanex.com/snapx
Two Macs, One Display
Winner of MacWorld’s Best Consumer Hardware, Kanex SnapX is a compact two-port switcher designed for Apple LED Cinema Displays 27 and 24 inch. Control two Macs with your keyboard, mouse and get full audio. Simply connect the two built-in mini DisplayPort cables with USB from the SnapX to your Mac computers, plug the display cable to the unit and you are set.
Not compatible with Thunderbolt™ iMac and Display
So, for me the best solution is to move to DisplayPort or to turn off your screen when you want to change (you can use the hot corners or some shortcuts).
Solution 3:
The hardware doesn't support this directly - so without a KVM type server environment hardware that's usually targeted for Linux/Windows, this is better solved with Software.
What you want would require modifying Mission Control or the OS X display manager to contain a remote desktop version of the other computer's desktops. I don't think this is in existence and you would need to recruit some developers to do it. If you want to try the open source community at the task then go ahead.
Option 1
You can try using a peer to peer remote desktop client from one computer to the other and just make the remote desktop client full screen. That will make it appear in mission control. To get a better response time you could try linking the computers together with an ethernet patch cable.
Option 2
The problem is it looks like you don't want to get a third monitor but this is how you could do it if you could get a third monitor.
You can use Synergy to go between both computers with one keyboard and one mouse. It is like having multiple desktops but between two completely different computers. You can grab a nightly build of Synergy free here to try it out.
If you want a good cheap monitor then try the ASUS VN247H-P.