pkamb / PowerKey

Remap your Macbook's power key to Forward Delete
MIT License
229 stars 29 forks source link

Add "Target Display Mode" as an option #63

Closed maxmclau closed 7 years ago

maxmclau commented 7 years ago

Some iMac's offer Target Display Mode that allow them to be used as monitors. The shortcut to enter this is ⌘ + F2 which requires you to plug a keyboard in just to turn the computer into a monitor.

maxmclau commented 7 years ago

Returns error after connecting-reconnecting. Will return with solution

pkamb commented 7 years ago

You may want to consider doing this via an Apple Script, may be easier than relying on a key combo.

Let us know how it goes!

maxmclau commented 7 years ago

You're right, that makes much more sense. For reference to anyone else who wants to do this the script would look something like this:

tell application "System Events" to key code 120 using command down