Trying to use a mid 2011 iMac as a display screen for my 2016 MacBookPro I have the two computers connected with the Thunderbolt cord. But when I hit F2 on the 2011 iMac, nothing happens. Well I shouldn't say nothing happens, the screen flashes as if I were taking a screen grab. 

I am using the Thunderbolt Cable, connected by the Thunderbolt 3 USC-C to Tunderbolt 2 Adapter, but am not having any luck. 

The 2011 is running on El Capitan and the MacBook is running on Mojave. 

Thanks for your help!
According to Apple you have to press CommandF2 to enter target display mode, not just F2.