Mac keyboard shortcut guides
Find the keys for the action you need.
Practical, source-reviewed Mac guides. Search for an action or explore an app. Default keys can vary with your language, layout and custom settings.
60 guides to explore
- Finder
Choose the right Finder view from the keyboard
Command-1 through Command-4 select icon, list, column and gallery views in Finder. Pick the view that exposes the information your task needs.
- Finder
Connect to a server or eject a Finder volume deliberately
Command-K opens Connect to Server. Command-E ejects a selected disk or volume when Finder supports that action.
- Finder
Choose duplicate, alias or move in Finder
Command-D duplicates a selected Finder item, Control-Command-A makes an alias and Option-Command-V moves files previously copied to the Clipboard.
- Finder
Search Finder files without overlooking the search scope
Command-F starts Finder search. Check the location and filters before deciding that a missing file is not present.
- Finder
Inspect a Finder selection before opening or sharing it
Select an item and press Command-I for Get Info. Use that information to check which file you are handling before continuing.
- Finder
Jump to Home, Desktop or Downloads in Finder
Finder has direct folder shortcuts: Shift-Command-H for Home, Shift-Command-D for Desktop and Option-Command-L for Downloads.
- Finder
Keep Finder windows and the tab bar under control
Command-N opens another Finder window and Shift-Command-T toggles the tab bar. Closing a window is a separate action from changing its layout.
- Finder
Navigate Finder folders from the keyboard
Move to an enclosing folder or retrace your path without confusing navigation with opening a file.
- Finder
Create a normal Finder folder or a Smart Folder
Shift-Command-N creates a normal folder. Option-Command-N starts a Smart Folder, which represents a saved search rather than a new storage container.
- Finder
Open the selected Finder item without changing the wrong folder
Command-Down Arrow opens the selected Finder item. In list view, Right Arrow expands a selected folder and Left Arrow collapses it.
- Finder
Open Computer, Network or Utilities in Finder
Finder’s Shift-Command shortcuts jump to Computer, Network and Utilities without requiring a folder-by-folder journey.
- Finder
Show Finder’s path, sidebar and status information
Option-Command-P toggles Finder’s path bar, Option-Command-S toggles the sidebar and Command-/ toggles the status bar.
- Finder
Preview and compare files in Finder
Inspect a selected file and choose a Finder view suited to comparing a folder.
- Finder
Move Finder items to Trash without skipping the checks
Command-Delete moves the selection to Trash. Shift-Command-Delete starts emptying Trash; inspect its confirmation and contents before proceeding.
- macOS
Create a Mac shortcut for an existing menu command
Use System Settings → Keyboard → Keyboard Shortcuts → App Shortcuts to assign a combination to an existing menu command.
- macOS
Delete a word or forward character on Mac
Option-Delete removes text to the previous word boundary. Fn-Delete, or Control-D in supported text controls, deletes forward.
- macOS
Use document zoom or accessibility screen zoom on Mac
Document zoom changes an app’s content view; accessibility Zoom magnifies the display and must be enabled in macOS settings first.
- Mac apps
Edit text and recover an accidental change
Use common Mac editing shortcuts while accounting for app-specific behavior.
- macOS
Navigate Mac dialogs without guessing what Return will do
Use Tab and Shift-Tab to move focus where keyboard navigation is enabled, then inspect the focused control before activating it.
- macOS
Lock a Mac or log out: choose the right shortcut
Control-Command-Q locks the screen. Shift-Command-Q starts logging out of the user account and presents confirmation.
- macOS
Open, save and search a Mac document from the keyboard
Command-O opens a document, Command-S saves and Command-F searches the front document or window in apps supporting these standard commands.
- macOS
Capture a Mac window or selected area with the keyboard
Shift-Command-4 starts area selection; pressing Space during that mode switches to window capture. Shift-Command-5 opens Screenshot controls.
- macOS
Choose Spotlight or Finder search from the keyboard
Command-Space opens Spotlight; Option-Command-Space starts a Finder search. Choose the search surface before typing a query.
- macOS
Select Mac text by word or line boundary
Add Shift to Option-arrow or Command-arrow navigation to extend a text selection by words or line boundaries.
- macOS
Switch Mac apps without losing the window you need
Use Command-Tab to change apps and Command-` to cycle windows within an app. They solve different navigation problems.
- Preview
Copy from a Preview PDF and check the print context
Command-C copies the current text or area selection in Preview. Command-P prints the current PDF or image, so confirm the selected document first.
- Preview
Fit several Preview images or inspect their actual size
Option-Command-9 fits all images in the window; Option-Command-0 shows them at actual size. These are view changes, not file resizing.
- Preview
Move a Preview PDF by page or by screenful
Option-Down Arrow and Option-Up Arrow change Preview pages. Page Down and Page Up scroll a screenful, so the movements are not equivalent.
- Preview
Switch Preview tabs and documents without confusing them
Control-Tab changes tabs in Preview. Option-Page Down and Option-Page Up move among documents in the current window.
- Safari
Choose Back, Forward or Reload in Safari
Command-[ and Command-] follow Safari’s page history; Command-R reloads the current page. Reload is not a way to return to the previous page.
- Safari
Find text on a Safari page
Search within the page you already opened instead of starting another web search.
- Safari Web Inspector
Search Safari Web Inspector resources from the keyboard
Inside Web Inspector, Command-F searches the focused resource and Shift-Command-F searches across files and resources.
- Safari
Open Safari links without losing the page you are reading
Command-click opens a link in another tab; adding Shift makes the new tab active. Use the modifier that matches whether you want to keep reading.
- Safari
Change Safari page zoom without changing Mac display settings
Command-Plus and Command-Minus change Safari website content zoom. This is different from magnifying the whole Mac interface.
- Safari
Open a Safari Private Browsing window deliberately
Shift-Command-N opens a Private Browsing window in Safari. Check the window’s mode before using it for a separate browsing session.
- Safari
Read a Safari page and save it for later
Keep a page in Reading List and open Reader using documented Safari shortcuts.
- Safari
Return to a Safari starting point without retracing every page
Shift-Command-H goes to Safari’s configured homepage. Back returns to the preceding page instead, so choose the route that matches your intention.
- Safari
Open a typed Safari address in the current or a new tab
After entering an address in Safari’s Smart Search field, Return navigates; Command-Return opens it in a new tab and Shift-Command-Return also activates that tab.
- Safari
Jump directly to a numbered Safari tab
Command-1 through Command-8 select the corresponding Safari tabs; Command-9 selects the last tab, not necessarily the ninth.
- Safari
Switch Safari tabs and recover a closed tab
Move between Safari tabs without losing your place, and recover an accidentally closed tab.
- Visual Studio Code
Close or reopen a VS Code editor without losing track of the file
Command-W closes the active editor; Shift-Command-T reopens a closed editor. Keep closing an editor separate from deleting a file.
- Visual Studio Code
Choose VS Code’s Command Palette or Quick Open
Shift-Command-P searches commands; Command-P searches files. Use the palette for an action and Quick Open for a destination.
- Visual Studio Code
Choose Step Over, Into or Out in the VS Code debugger
F10 steps over, F11 steps into and Shift-F11 steps out during a supported debugging session. The active debug configuration controls what is running.
- Visual Studio Code
Peek at a VS Code definition or open it as an editor
F12 opens a definition and Option-F12 peeks at one when language support is available. Choose whether the inspection should replace your current view.
- Visual Studio Code
Expand and shrink a structured VS Code selection
Control-Shift-Command-Right Arrow expands a smart selection; the Left Arrow variant shrinks it when the editor and language support that structure.
- Visual Studio Code
Find and replace text inside the current VS Code file
Command-F opens Find and Option-Command-F opens Replace in the current editor. Verify the file and matching options before replacing text.
- Visual Studio Code
Find a VS Code symbol in one file or across a workspace
Shift-Command-O searches symbols in the current file; Command-T searches symbols across the workspace when language support provides them.
- Visual Studio Code
Fold VS Code regions without forgetting what is hidden
Option-Command-[ folds a region and Option-Command-] unfolds it. Folding changes visibility, not which code exists in the file.
- Visual Studio Code
Format a VS Code document or only the selected code
Shift-Option-F formats the document; Command-K then Command-F formats the selection when an appropriate formatter is available.
- Visual Studio Code
Jump to a VS Code line and return to the previous edit location
Control-G opens Go to Line. Control-Minus and Control-Shift-Minus move backward and forward through editor navigation history.
- Visual Studio Code
Comment VS Code lines without confusing line and block comments
Command-/ toggles a line comment; Shift-Option-A toggles a block comment. The active language determines the comment syntax.
- Visual Studio Code
Reorder or duplicate VS Code lines without a cut-and-paste detour
Option-Up/Down moves a line; Shift-Option-Up/Down copies it. Adding Shift changes the result from relocation to duplication.
- Visual Studio Code
Move through VS Code errors and warnings with context
Shift-Command-M opens Problems. F8 goes to the next error or warning and Shift-F8 goes to the previous one.
- Visual Studio Code
Rename a VS Code symbol instead of replacing similar text
F2 starts a language-aware symbol rename when supported. Use it when you mean a code symbol, rather than every matching string.
- Visual Studio Code
Run a VS Code build task after checking what it executes
Shift-Command-B invokes Run Build Task. A task is executable configuration, so inspect the selected task and workspace before running it.
- Visual Studio Code
Edit selected repeated text with VS Code multi-cursors
Command-D adds the next matching occurrence to a selection. Command-U undoes the last cursor operation, giving you a way to correct the selection set.
- Visual Studio Code
Split VS Code editors and move focus between groups
Command-Backslash splits the editor. Command-1, Command-2 and Command-3 focus the corresponding editor groups.
- Visual Studio Code
Open the VS Code terminal or create a separate session
Control-` shows the integrated terminal; Control-Shift-` creates a new terminal. Confirm the shell and working directory before running anything.
- Visual Studio Code
Search a VS Code workspace with deliberate include and exclude rules
Shift-Command-F opens workspace search; Shift-Command-H opens replacement across files. Narrow the scope before applying changes.
- Visual Studio Code
Use VS Code Zen Mode and word wrap for different reading problems
Command-K then Z enters Zen Mode; Option-Z toggles word wrap. One changes workspace presentation, while the other changes how long lines are displayed.
See shortcuts for the app you’re using.
See how the Mac app works