Use F1–F12 as function keys on Mac (not media keys)
Out of the box, the top row of a Mac keyboard is a media control panel: brightness, volume, Mission Control, Launchpad. Pressing F5 lowers your keyboard backlight; you have to hold Fn to get an actual F5. If you spend any time in an IDE, a terminal, or a game, this is backwards. Here's how to flip the default.
What the two modes mean
Apple calls the media-key behavior "special features" and the F1–F12 behavior "standard function keys." In special-features mode, hold Fn to get a real function key. In standard mode, hold Fn to get the media action. You're just swapping which direction the modifier goes.
Neither mode removes anything — it only changes what happens on an unmodified keypress. You can still dim your display or mute audio with Fn + the relevant key after the switch.
Method 1: System Settings (no Terminal)
This works on macOS Ventura (13) and later:
- Open System Settings (Apple menu → System Settings).
- Click Keyboard in the sidebar.
- Find "Use F1, F2, etc. keys as standard function keys" and switch it on.
- The change takes effect immediately — no restart needed.
On macOS Monterey (12) and older, the same setting lives in System Preferences → Keyboard as a checkbox labelled "Use F1, F2, etc. keys as standard function keys."
This setting applies to the built-in keyboard and any Apple USB keyboard. External third-party keyboards may not obey it — see the section below on external keyboards.
Method 2: Terminal (also works from scripts)
If you prefer the command line, or want to bake this into a setup script:
# enable standard function keys (F1–F12 as default)
defaults write NSGlobalDomain com.apple.keyboard.fnState -bool true
Log out and back in for the change to take effect system-wide. (Some apps pick it up immediately; most don't.)
To undo it and go back to media keys as default:
# restore media-key default
defaults write NSGlobalDomain com.apple.keyboard.fnState -bool false
# or delete the key entirely (same result — macOS falls back to media-key default)
defaults delete NSGlobalDomain com.apple.keyboard.fnState
Mainspring turns this exact setting — and 90+ others macOS buries in Terminal — into a single labelled toggle. Flip Use F1–F12 as function keys on, and flip it back just as fast. No commands to memorize, nothing permanent.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once
External keyboards and third-party hardware
The System Settings toggle controls Apple keyboards reliably. For third-party external keyboards (Logitech, Keychron, etc.), the Fn lock behavior is often controlled by the keyboard's own firmware — either a dedicated Fn Lock key, or a key combo like Fn + Esc. Check your keyboard's manual.
If your external keyboard has media keys but no dedicated Fn key, macOS treats those keys as standard function keys automatically.
Touch Bar MacBooks
On MacBook Pros with a Touch Bar (2016–2021), the Touch Bar replaces the physical function row. The same "standard function keys" setting makes the Touch Bar show F1–F12 labels by default. You can also set this per-app: in System Settings → Keyboard → Keyboard Shortcuts → Function Keys, add specific apps that should always see a standard function row (useful for Xcode, Unity, or games).
Why developers prefer standard function keys
Most IDEs, debuggers, and terminals map specific actions to function keys. In Xcode, F6 steps over a line and F7 steps into a function. In VS Code, F5 starts debugging and F2 renames a symbol. In many terminal apps and shells, F-keys are bound to readline actions or tmux splits. When the default is media keys, you're pressing Fn constantly — which adds friction to actions you take hundreds of times a day.
Switching the default to standard function keys doesn't cost you anything on a laptop: you still have media controls one Fn-press away, and most MacBooks also expose brightness and volume through the Control Center or Touch Bar.
Checking your current setting in Terminal
# prints 1 (standard keys) or 0 (media keys) or nothing if unset
defaults read NSGlobalDomain com.apple.keyboard.fnState 2>/dev/null || echo "not set (media keys default)"