If you own a new Apple magic keyboard or extended keyboard you may not realise how to use those extra function keys on the top right of the keyboard. You can set them up to launch and control applications. For example I have my f-19 key set up to toggle my Dragon Dictate microphone and I have f-18 set up to launch my Google Calendar calendar in a specific browser.
There are various ways to set up a shortcut. Let’s go from the simplest (although limited) to the most versatile (but complex).
Within the app
Some applications allow you to set up your own shortcuts. You just go to Preferences in the app and you can select your own shortcuts from there.
If you go to System Preferences/Keyboard there’s a tab that allows you to customize many system keyboard shortcuts. Here you can see I have set my F-1 and F-2 keys to adjust the screen brightness. But you can also use the extended function keys like F16, F17 etc.
Launch Apps or URLs
You can launch applications or URLs directly from a function key.
The Apple way to do it is to set up an automator function and then assign it to a service and then assign that to a function key. I find that far too complex so I use an app called ‘Keyboard Maestro’. It allows you to set any key to launch any application or URL.
Here is what it looks like: (This shortcut opens my Google calendar.)
Applications that won’t let you assign function key
There are some applications that will let you set a keyboard shortcut using a modifier key (e.g. command-shift-key) but they won’t let you assign a function key directly to their shortcuts. The workaround for these applications is to use Karibiner Elements to remap your function key to a different shortcut. Creating your own complex modifications is a little tricky, I’ll leave you to read about it here:
Here is an example of where I have used Karibiner Elements to remap my f-19 key to shift-option-command-9 so that I can then assign a shortcut in Dragon Dictate to turn the microphone on and off:
So there you have it. Using Keyboard Maestro and Karibiner Elements you can map any key to any shortcut and even launch Applications or URL’s using function keys.