Ero in quella situazione qualche tempo fa. L'unico modo che sembra funzionare senza emettere il collegamento con la tastiera Apple ho trovato era presente nei forum Logitech .
I have successfully implemented what I believe is a reasonable workaround. Here's what I did...
Purchased and installed Keyboard Maestro from Stairways Software.
Within Keyboard Maestro I created a new Macro in the Global Macro Group.
For "Triggered by any of the following:" I selected "This device key:" and then hit the mute button (i.e. F10) on my Logitech keyboard. Keyboard Maestro correctly captured this as "USB Receiver Mute".
For "Will execute the following actions:" I had Keyboard Maestro record my keystrokes and then I hit ;⌘-F2 USING MY APPLE KEYBOARD. Keyboard Maestro captured this as ⌘-? (I'm sure the ? is just a place holder). It looks odd, but it works.
Now when I hit the mute button (F10) I can enter AND EXIT Target Display Mode from my Logitech keyboard.
I originally tried another key (F15), but that didn't work for me. It allowed me to enter, but not exit, Target Display Mode. I suspect that this is due to the fact that your Mac ignores most all of the keys on the keyboard when in Target Display Mode. However, I knew it still "listened" to the keys that control music playback. I selected mute as it was the least offensive to use. I haven't tried any others yet.
Ma questo metodo, come dice l'autore nel suo post successivo, ha uno svantaggio davvero sgradevole:
Turns out the solution isn't perfect. After I took the batteries out of my Apple wireless keyboard, the mute/F10 trick on the Logitech keyboard stopped working. So, now I have the Apple wireless keyboard turned on, but not in use - the mute/F10 trick on the Logitech keyboard works again.
Quindi, è un peccato, ma il metodo migliore è quello di mantenere e utilizzare la tastiera Apple.