Why Learn macOS Keyboard Shortcuts
macOS is an operating system with a well-designed keyboard-centric workflow. If you can switch windows, manage files, and edit text without a mouse, your development productivity increases significantly. Especially for developers switching from Windows, quickly learning the difference between Cmd and Ctrl and macOS-specific shortcuts is important.
This article organizes frequently used shortcuts by category: system, Finder, terminal, and text editing.
Understanding macOS Modifier Keys
macOS modifier keys differ from Windows. Knowing the keyboard symbols helps you read shortcuts quickly from menus.
| Symbol | Key Name | Windows Equivalent |
|---|---|---|
| ⌘ | Command (Cmd) | Ctrl |
| ⌥ | Option (Alt/Opt) | Alt |
| ⌃ | Control (Ctrl) | N/A (macOS specific) |
| ⇧ | Shift | Shift |
| ⇪ | Caps Lock | Caps Lock |
| fn | Function | Fn |
Developer tip: Remapping Caps Lock to Control makes Ctrl combinations much more comfortable in the terminal.
# Check Caps Lock → Control mapping (change in system settings)
# System Settings → Keyboard → Keyboard Shortcuts → Modifier Keys
# Caps Lock key: → Control
# Check key mapping in terminal
hidutil property --get "UserKeyMapping"
# Or map directly via command
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E0}]}'
# 0x700000039 = Caps Lock, 0x7000000E0 = Left Control
System Shortcuts
The most fundamental macOS system shortcuts.
| Shortcut | Function |
|---|---|
Cmd+Space | Spotlight search |
Cmd+Tab | Switch apps |
| `Cmd+“ | Switch windows of same app |
Cmd+Q | Quit app |
Cmd+W | Close current window/tab |
Cmd+H | Hide current app |
Cmd+M | Minimize current window |
Cmd+, | Current app preferences |
Ctrl+Space | Switch input source |
Cmd+Ctrl+Q | Lock screen |
Cmd+Shift+3 | Full screen capture |
Cmd+Shift+4 | Area selection capture |
Cmd+Shift+5 | Screenshot/recording tool |
Mission Control Shortcuts
Essential shortcuts for multiple desktops and window management.
| Shortcut | Function |
|---|---|
Ctrl+Up | Mission Control (view all windows) |
Ctrl+Down | View all windows of current app |
Ctrl+Left/Right | Move between desktops |
Ctrl+Number | Jump to specific desktop |
F11 | Show desktop |
# Check Mission Control desktop count
defaults read com.apple.spaces "spans-displays"
# Disable automatic desktop rearrangement (recommended for developers)
# System Settings → Desktop & Dock → Mission Control
# "Automatically rearrange Spaces based on most recent use" → Off
# Check Hot Corners settings (screen corner actions)
defaults read com.apple.dock | grep corner
Finder Shortcuts
Finder shortcuts for file management.
| Shortcut | Function |
|---|---|
Cmd+N | New Finder window |
Cmd+Shift+N | Create new folder |
Cmd+Delete | Move file to Trash |
Cmd+Shift+Delete | Empty Trash |
Cmd+D | Duplicate selection |
Cmd+I | Get file info |
Space | Quick Look (preview) |
Cmd+Shift+. | Show/hide hidden files |
Cmd+Up | Go to parent folder |
Cmd+Down | Open selection |
Cmd+Shift+G | Go to folder (enter path directly) |
Cmd+1/2/3/4 | Switch view mode (icon/list/column/gallery) |
# Always show hidden files in Finder
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder
# Show full path in Finder title bar
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
killall Finder
# Set default Finder view mode to list
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
killall Finder
Terminal/Shell Shortcuts
Shortcuts common to both iTerm2 and the default terminal. Based on Emacs keybindings.
| Shortcut | Function |
|---|---|
Ctrl+A | Move to beginning of line |
Ctrl+E | Move to end of line |
Ctrl+U | Delete everything left of cursor |
Ctrl+K | Delete everything right of cursor |
Ctrl+W | Delete previous word |
Ctrl+L | Clear screen |
Ctrl+R | Reverse history search |
Ctrl+C | Cancel current command |
Ctrl+D | Exit shell |
Ctrl+Z | Suspend process |
Option+Left/Right | Move by word (iTerm2) |
Cmd+K | Fully clear terminal screen (iTerm2) |
# Check keybindings in zsh
bindkey -l
# Output: emacs viins vicmd ...
# To switch to vi mode
# bindkey -v
# Add to .zshrc for vi-style editing
# Use fzf history search instead of Ctrl+R (more powerful)
# After installing fzf, Ctrl+R is automatically replaced with fzf
brew install fzf
$(brew --prefix)/opt/fzf/install
# Ctrl+R → fzf-based fuzzy search for history
Text Editing Shortcuts
Text editing shortcuts common across the entire macOS system.
| Shortcut | Function |
|---|---|
Cmd+A | Select all |
Cmd+C/X/V | Copy/Cut/Paste |
Cmd+Z | Undo |
Cmd+Shift+Z | Redo |
Cmd+F | Find |
Cmd+G | Find next |
Option+Delete | Delete previous word |
Cmd+Delete | Delete to beginning of line |
Option+Left/Right | Move by word |
Cmd+Left/Right | Move to beginning/end of line |
Cmd+Up/Down | Move to beginning/end of document |
Shift + movement key | Extend selection |
Custom Shortcut Configuration
On macOS, you can assign custom shortcuts to any menu item.
# Add custom shortcuts in system settings
# System Settings → Keyboard → Keyboard Shortcuts → App Shortcuts
# "+" button → select app → enter menu title → assign shortcut
# Set custom shortcut via command (e.g., "Show Package Contents" in Finder)
defaults write com.apple.finder NSUserKeyEquivalents -dict-add \
"Show Package Contents" "@\$p"
# @ = Cmd, $ = Shift, p = P key
# Check currently configured custom shortcuts
defaults read -g NSUserKeyEquivalents
defaults read com.apple.finder NSUserKeyEquivalents
Window Management Tool Integration
If macOS’s built-in window management isn’t enough, Rectangle (free) is recommended.
| Shortcut (Rectangle) | Function |
|---|---|
Ctrl+Option+Left | Left half |
Ctrl+Option+Right | Right half |
Ctrl+Option+Up | Top half |
Ctrl+Option+Down | Bottom half |
Ctrl+Option+Enter | Maximize |
Ctrl+Option+C | Center on screen |
Ctrl+Option+U | Top-left quarter |
# Install Rectangle
brew install --cask rectangle
# Or use macOS 15+ built-in window management
# Drag windows to screen edges for snapping
Summary
A strategy for learning macOS keyboard shortcuts.
- Start with 5 essentials: Master
Cmd+Space,Cmd+Tab,Cmd+\``,Cmd+Q, andCmd+,` first to complete the basic workflow - Terminal shortcuts: Learning just
Ctrl+A/E/U/K/Rdramatically improves terminal efficiency - Finder:
Cmd+Shift+.(hidden files) andCmd+Shift+G(go to path) are developer essentials - Window management: Install Rectangle and use
Ctrl+Option+arrow keysfor window splitting - Caps Lock remapping: Mapping
Caps LocktoControlmakes terminal shortcuts much more comfortable - Incremental learning: Don’t try to memorize everything at once — adding 3-5 new shortcuts per week is more effective