MacOS – Create custom shortcuts and assign them to F keys

keyboardmacosterminal

I recently migrated to OS X 10.10 from Ubuntu 14.04 (Linux). In Ubuntu, I could make any key of my keyboard do anything I liked. I used to have the F1, F2, and F3 keys set to function as the red, yellow, and green buttons at the top left of the screen (which are the same as in OS X). This was ridiculously useful, and I want to do this on my Mac, but I don't know how I can.

I've already used Karabiner to map the current functions of the F keys to their Fn + F* equivalent. So instead of lowering the brightness with F1, I can do so with Fn + F1.

I have read that you can add a shortcut by going to System Preferences > Keyboard > Input Sources, and then clicking on the + icon. But using Yosemite, my + icon is not there, so I cannot add the "close window", "minimise", and "maximise" shortcuts. Besides, though I can see in the shortcut list that some shortcuts use F keys, I'm not able to assign F keys to any shortcuts myself.

So I would like to:

  1. In particular, make shortcuts to close, maximise, and minimise and window. (In general, create customised shortcuts to do anything a terminal can do.)
  2. Assign this custom shortcut to F keys, overriding F keys' default behaviour to adjust screen brightness, volume, etc.

Best Answer

First of all, You don't need Karabinier to change F* keys behaviour. It can be done in Preferences -> Keyboard -> Use all F1, F2 etc. as standard function keys.

Then to assign keyboard shortcut to Terminal You have to switch to Shortcuts tab, select Application Shortcuts then click + sign. There You can choose application in which this shortcut will be working. There's also text input to enter Menu Item name (for example: Close, Minimize etc. check how it's named in Your Terminal app).

enter image description here

NOTE: There's no Maximize Menu item, I can find only Close and Minimize. If You want to install 3rd party app for this, I'd recommend Better Touch Tool where You can set a lot more actions to keyboard shortcuts and mouse/trackpad gestures. Here's an example for BTT:

enter image description here

Picture 1 taken from osxdaily.com