How to use the secondary mac's keyboard when using Target Display Mode
That's exactly what Target Display Mode does. The only caveats are that &quot;stationary Mac&quot; must be an iMac that supports Target Display Mode, and you must have a keyboard connected to the iMac to turn Target Display Mode on and off.

Follow these steps to start using your iMac as a display:

Make sure both computers are turned on.

Connect the Mini DisplayPort or Thunderbolt cable between the two computers.

Press Command-F2 on the keyboard of the iMac that you want to use as a display.


After you press Command-F2, your iMac displays the desktop from the connected Mac.