Apple - How to reverse the F keys default functionality
System Preferences -> Keyboard -> Keyboard tab -> check "Use all F1, F2, etc. keys as standard function keys"
UPDATE: If you have a touch bar Mac you'll want System Preferences -> Keyboard -> Keyboard tab -> "Touch Bar shows" -> "F1, F2, etc. Keys"
You can also invert single keys with FunctionFlip:
And Paula allows you to set the global F1-F12 vs "special key" mode based on the focused application.