IMac – How to connect MacBook Pro to an iMac with a 3rd party keyboard

3rd-partydisplayimackeyboardthunderbolt

I was following the instructions here:

https://support.apple.com/en-us/HT204592

which say to press CommandF2 and that works fine when I use my Apple keyboard. However, I want to connect my Apple keyboard to my MacBook Pro so I wanted to use some other keyboard to enable target display mode (i.e display my MacBook Pro on my iMac).

I obviously opened the keyboard viewer on the imac to make sure I am pressing CommandF2 and I am. However, it still doesn't allow me to connect my MacBook to my iMac.

The instructions on that support page do not really suggest how to fix them though they do have a list of things to be done. I tried all the F1,…etc.

Anyway, is there a way to connect my MacBook Pro with a 3rd party keyboard?


I did noticed that despite me pressing F2 on the Mac keyboard the keyboard view did say I did press F2 but in the Mac it DOES say I press CommandF2 on the keyboard viewer. Odd.


Some instructions on that page if CommandF2 doesn't work:

If Command-F2 doesn't work If your iMac doesn't
switch to Target Display Mode when you press
Command-F2, check these things:

Make sure that the iMac you're trying to use as a display supports
Target Display Mode. Target Display Mode works only when your primary
Mac is logged in to a macOS user account. For example, if your first
Mac is at the FileVault login screen, pressing Command-F2 on your iMac
does not enable Target Display Mode. You must first log in to your Mac
(using a regular display, if necessary) before you can use an iMac in
Target Display Mode. Make sure that you're pressing Command-F2 on the
keyboard that's connected to the iMac you want to use as a display. In
Keyboard System Preferences, if the checkbox is enabled for "Use all
F1, F2, etc. keys as standard function keys," the key combination
changes to Command-Fn-F2. Make sure that your Mini DisplayPort or
Thunderbolt cable is connected to both computers. If you're currently
logged in on the iMac you want to use as a display, try logging out to
return to the login window. Then press Command-F2 again. Some older
Apple keyboards and third-party keyboards might not allow Command-F2
to toggle display modes. If this happens, use the keyboard that came
with your iMac to toggle Target Display Mode on and off. If your iMac
is currently started up in Windows, it won't enter Target Display
Mode. Target Display Mode isn't supported in Boot Camp.

Best Answer

Technically speaking, you're not pressing F2 (yes, it's labeled "F2), you're actually pressing "Brightness Up." To actually get the "F2", you have to press fnF2

You can confirm with with a utility called xev which will display the scan codes of what you're typing. The actual "F2" comes up as scan code 128 and will do so on both your Apple (when pressing the fn) and Dell keyboards.

Since you've already tried turning off "use all F1, F2, etc. keys as standard functions keys", your keyboard doesn't support this. You most likely need an Apple keyboard or at minimum, a keyboard with "enhanced" function keys; with a fn to change the function.