The macOS Setup Guide

Keyboard, shortcuts & input

macOS is a keyboard-first operating system wearing a mouse-first costume. Nearly everything has a shortcut, most text fields share the same Emacs-derived navigation keys, and modifier keys are remappable at the system level. Learn this chapter once and every app gets faster.

The modifier keys and what they mean#

KeySymbolRole
Command⌘App-level actions: copy, paste, save, quit, switch apps. Equivalent to Ctrl on Windows/Linux for shortcuts.
Option (Alt)⌥Modifies: word-wise movement, special characters, alternate menu items (hold ⌥ while a menu is open to see them).
Control⌃Terminal/Emacs-style text editing (⌃A, ⌃E, ⌃K), window/Space management, right-click (⌃-click).
Shift⇧Extend selection; reverse direction of many shortcuts.
Function / Globefn / 🌐Function-row behaviour; emoji picker; a fourth modifier in some apps. On Apple silicon it's also used by native window tiling (fn⌃←).
Caps LockWasted real estate — remap it (below).

The key insight for switchers: ⌘ is where your thumb is, so ⌘C/V/Z/S/W/Q/T are one-hand chords, and ⌃ is free for the terminal — ⌃C interrupts a process while ⌘C copies, with no conflict. This is why the Mac terminal experience is nicer than Windows'.

Remap Caps Lock (do this today)#

System Settings → Keyboard → Keyboard Shortcuts… → Modifier Keys. Choose the keyboard in the dropdown (each keyboard is remapped separately) and set Caps Lock → ⌃ Control. Control is the most useful key with the worst factory position; on the home row it makes terminal editing, tmux prefixes, and IDE shortcuts effortless. Vim users often prefer Caps Lock → ⎋ Escape, or — with Karabiner — Escape when tapped, Control when held (the "dual-role" setup), which is what most heavy keyboard users end up with.

While you're there, on a Windows-layout keyboard, swap ⌥ Option ↔ ⌘ Command so the key next to the space bar is Command like on a Mac keyboard. (Many mechanical keyboards have a hardware Mac/Win switch or DIP setting — use that instead if present.)

Karabiner-Elements: the remapper#

For anything beyond the five modifier keys, Karabiner-Elements (free, open source, brew install --cask karabiner-elements) is the standard. It runs as a system extension (approve it in System Settings → General → Login Items & Extensions → Driver Extensions, and grant Input Monitoring). Popular "complex modifications" you can import from its online rules gallery or write yourself:

  • Caps Lock → Escape if alone, Control if held (the canonical one).
  • Hyper key: Caps Lock → ⌘⌥⌃⇧ when held — a fifth modifier no app uses, so HyperT can launch your terminal, HyperH/J/K/L can be arrows, etc. Pairs beautifully with Raycast hotkeys or a window manager.
  • Right ⌘ → Change input source, Right ⌥ → Fn for keyboards that lack it.
  • Vim-style navigation layer (hold a key → H/J/K/L become arrows everywhere).
  • Per-device profiles: a different map for your external mechanical keyboard vs the built-in one.
  • Swap ⌥ and ⌘ only on external PC keyboards (Karabiner does this per device, unlike System Settings' per-keyboard dropdown which sometimes forgets).

A minimal ~/.config/karabiner/karabiner.json "Caps Lock dual role" rule:

json
{
  "description": "Caps Lock → Escape (tap) / Control (hold)",
  "manipulators": [{
    "type": "basic",
    "from": { "key_code": "caps_lock", "modifiers": { "optional": ["any"] } },
    "to": [{ "key_code": "left_control" }],
    "to_if_alone": [{ "key_code": "escape" }]
  }]
}

Karabiner's config is JSON and lives in ~/.config/karabiner/, so it belongs in your dotfiles (Chapter 10). Alternatives: Hyperkey (just the Hyper key, one click), Keyboard Maestro (paid; macros, not just remaps — Chapter 21), or a QMK/ZMK/VIA-programmable keyboard where the remap lives in the firmware and follows the keyboard.

Text editing shortcuts that work everywhere#

These work in every native text field — Safari, Mail, Notes, Slack's composer, the address bar, Xcode, even most Electron apps — because they're implemented by the Cocoa text system, not the app.

ActionShortcut
Move by word⌥← / ⌥→
Start / end of line⌘← / ⌘→ (also ⌃A / ⌃E)
Start / end of document⌘↑ / ⌘↓
Page up / downfn↑ / fn↓ (⌃V down)
Select (add ⇧ to any movement)⌥⇧→ selects a word; ⌘⇧← to line start
Delete word back / forward⌥⌫ / ⌥fn⌫ (⌥D in terminals)
Delete to line start⌘⌫
Delete to line end⌃K (kills to macOS kill buffer; ⌃Y yanks it back)
Forward deletefn⌫ or ⌃D
Transpose two characters⌃T
Move line (Notes/Pages/Xcode)⌃⌘↑/↓
Emacs-style char/line movement⌃F/B/N/P
Paste and match style (plain text)⌘⌥⇧V
Look up / define selected word⌃⌘D (or three-finger tap)
Emoji & symbols picker⌃⌘Space (or 🌐 if you left it enabled)
Special charactersHold ⌥: ⌥- en dash –, ⌥⇧- em dash —, ⌥; …, ⌥8 •, ⌥2 ™, ⌥G ©, ⌥E then vowel → é, ⌥U then vowel → ü, ⌥N then n → ñ
Accents on a held keyHold e → picker (disable with ApplePressAndHoldEnabled false to get key repeat instead — Chapter 3)

You can add or override these globally by editing ~/Library/KeyBindings/DefaultKeyBinding.dict (create it). Windows switchers who want Home/End to mean line start/end rather than document start/end:

{
  "\UF729"  = moveToBeginningOfLine:;                       /* Home */
  "\UF72B"  = moveToEndOfLine:;                             /* End  */
  "$\UF729" = moveToBeginningOfLineAndModifySelection:;     /* Shift-Home */
  "$\UF72B" = moveToEndOfLineAndModifySelection:;           /* Shift-End  */
  "^\UF729" = moveToBeginningOfDocument:;                   /* Ctrl-Home */
  "^\UF72B" = moveToEndOfDocument:;                         /* Ctrl-End */
}

Log out and back in. (Electron apps and terminals have their own keymaps and ignore this file.)

System shortcuts worth memorising#

CategoryShortcutDoes
Apps⌘Tab / ⌘`Switch apps / windows of the current app
⌘Q / ⌘W / ⌘⌥WQuit app / close window or tab / close all windows
⌘H / ⌘⌥HHide app / hide all others
⌘MMinimise (prefer ⌘H — minimised windows vanish from ⌘Tab)
⌘⌥⎋Force Quit dialog
⌘,App settings — universal
⌘⇧/Help menu search — finds any menu item by name, then arrow to it
Windowfn⌃←/→/↑/↓Native tiling: left/right half, fill, centre (Chapter 6)
fn⌃⇧ + arrowsQuarters
fn⌃RReturn to previous size
⌃⌘F / fnFFull screen
⌘N / ⌘TNew window / tab
⌘⇧[ / ], ⌃TabPrevious/next tab (works in Safari, Terminal, Finder, VS Code…)
Spaces⌃←/→Previous/next Space
⌃1…9Jump to Space N (enable in Keyboard Shortcuts → Mission Control)
⌃↑ / ⌃↓Mission Control / App Exposé
fnH or F11Show desktop
System⌘SpaceSpotlight (Search or Ask on GG)
⌘⇧SpaceVisual Intelligence (GG)
⌃⌘QLock screen
⌥⌘⏏ / ⌃⇧PowerSleep / display sleep
⌃⌘PowerForce restart (hold)
⌥-click menu bar items (Wi‑Fi, Sound, Bluetooth, Battery)Debug/detail views: BSSID, channel, sample rate, condition
⌥⇧ + volume/brightness keysQuarter-step adjustments
Screenshots⌘⇧3 / 4 / 5Full screen / selection / the toolbar (record, timer, options). Add ⌃ to copy to clipboard instead of saving. In ⌘⇧4, press Space to capture a window, hold ⌥ to omit the shadow.
⌘⇧6Touch Bar (old) / Visual Intelligence region (GG)
Finder / Save dialogs⌘⇧G or / or ~Go to path — works inside Open/Save dialogs too; drag a folder onto the dialog to jump there
⌘D in dialogs"Don't Save" / Desktop
⌘⌫ in dialogs"Delete"/"Don't Save" (the destructive default)
⌘. / ⎋Cancel

Keyboard navigation of the UI#

  • System Settings → Keyboard → Keyboard navigation: on. Then Tab moves through all controls (buttons too), Space presses, Return is the default button, ⎋ cancels.
  • ⌃F2 (or fn⌃F2) focuses the menu bar; type to jump to a menu; arrows navigate. ⌃F3 focuses the Dock. ⌃F8 focuses menu bar extras (status items).
  • ⌘⇧/ opens Help → Search: type any menu command; it highlights where it lives and pressing Return runs it. This is the fastest way to run an obscure command in any app.
  • In dialogs, the first letter of a button often activates it when Full Keyboard Access is on.

Custom app shortcuts#

System Settings → Keyboard → Keyboard Shortcuts… → App Shortcuts → +. Pick an app (or All Applications), type the exact menu item title (including … typed as ⌥;), assign a key. Examples people set:

  • All Applications: Merge All Windows → ⌘⇧M; Export as PDF… → ⌘⇧E; Move Window to Left Side of Screen → something ergonomic.
  • Safari: Show Web Inspector if the default clashes; Pin Tab.
  • Finder: New Terminal at Folder → ⌘⌥T.
  • Mail: Archive → ⌘E.

Menu items in the Services submenu are enabled here too (Keyboard Shortcuts → Services) — turn off the dozens you never use; they clutter every right-click menu.

Function keys and the Touch Bar's legacy#

  • Use F1, F2, etc. keys as standard function keys: Keyboard → Keyboard Shortcuts… → Function Keys. Developers using IDE debuggers (F5–F11) usually turn this on and hit fn for brightness/volume. Alternatively keep media keys and let the IDE bindings use fn.
  • Per-app exceptions: Keyboard → Keyboard Shortcuts… → Function Keys has none, but Karabiner can switch behaviour per app (e.g. standard F-keys only in Xcode/IntelliJ/VS Code).

Input sources and typing in other languages#

  • Keyboard → Text Input → Edit… → + to add layouts/languages. Show Input menu in menu bar. Switch with ⌃Space (previous) / ⌃⌥Space (next) — and make sure this doesn't collide with ⌘Space for Spotlight (check the Input Sources section of Keyboard Shortcuts).
  • Automatically switch to a document's input source: on if you write in two scripts.
  • Unicode Hex Input layout: hold ⌥ and type a code point (2192 → →). Handy for maths symbols.
  • US International – PC or ABC – Extended give dead keys for accents on a US keyboard; the standard ABC layout has them via ⌥ chords as shown above.
  • Dictation (🌐 twice by default, or set your own): on-device, offline, punctuation by voice ("comma", "new line"), works in any text field. Golden Gate's improved dictation (M3+, 12 GB+) is noticeably more accurate.

Coming from Windows or Linux: the translation table#

You press on Windows/LinuxOn MacNotes
CtrlC/V/X/Z/S/A/F⌘ + same letterUniversal
AltTab⌘Tab (apps) + ⌘` (windows)Or install AltTab
AltF4⌘Q (quit) / ⌘W (close window)Closing the last window does not quit a Mac app
Win / Super⌘SpaceLaunch anything
WinDfnH / F11Show desktop
WinL⌃⌘QLock
Win←/→fn⌃←/→Snap halves (or Rectangle/Raycast)
WinShiftS⌘⇧4 (+⌃ to clipboard)Screenshot region
PrtSc⌘⇧3
Home/End⌘←/→Line start/end (or remap Home/End as above)
CtrlHome/End⌘↑/↓Document start/end
Ctrl←/→⌥←/→Word-wise
CtrlBackspace⌥⌫Delete word
Deletefn⌫Forward delete; ⌫ alone is Backspace
F2 renameReturn on a Finder itemReturn renames; ⌘O opens
CtrlShiftEsc⌘⌥⎋ / Activity MonitorForce Quit / task manager
Right-click⌃-click, two-finger tap, or right side of Magic Mouse
Middle-clickThree-finger tap (with MiddleClick app) or ⌘-click for links
CtrlAltT (terminal)none by defaultBind in Ghostty/iTerm2 (global hotkey window) or Raycast
Alt + accelerator letters in menusnoneUse ⌘⇧/ and type the command name

Two things trip up switchers for a week: (1) ⌘W closes the window but the app stays open with its menu bar — that's normal, and it relaunches instantly; quit with ⌘Q when you mean it. (2) Menus live in the menu bar at the top of the screen, not in each window; the active app's menus are shown. Both stop being weird by Friday.

Hardware keyboard notes#

  • Keyboard layout wizard appears the first time you plug in an unknown keyboard (ISO vs ANSI detection). If § and ` (backtick) are swapped on a European keyboard, rerun it: Keyboard → Change Keyboard Type… (or Karabiner's Devices tab has a per-device §/backtick swap).
  • Mechanical keyboards with QMK/VIA: set the Mac layout in firmware (swap GUI/Alt, map F-keys to media as you like). Then nothing in macOS needs remapping and the board works identically on your Linux box.
  • Bluetooth lag: pair via USB-C once (Apple keyboards), keep the dongle in a USB-A port rather than a hub for Logitech Bolt receivers, and avoid 2.4 GHz Wi‑Fi congestion — Apple's N1 chip (M5 Pro/Max, M6) with Bluetooth 6 is markedly better here.
  • Two keyboards, two layouts: Keyboard → Text Input → Edit… is global, but Karabiner can force a per-device input source.

View this chapter as Markdown · Edit on GitHub

Last reviewed September 2026. Written for macOS 26 Tahoe and macOS 27 Golden Gate on Apple silicon Macs. Prices are US list prices. Text is CC BY 4.0; code and configs are MIT.