Cover Image for Mac keyboard shortcuts for developers: the complete 2026 guide

Mac keyboard shortcuts for developers: the complete 2026 guide

Most shortcut lists ask you to memorise sixty key combinations. Nearly all of them come from one borrowed system, and once you know it the rest follows.

Ankit KumarAnkit KumarUpdated 17 min read

tldr: Mac keyboard shortcuts look like sixty unrelated key combinations. Most of them belong to one system that macOS borrowed from Emacs decades ago, which is why Control-A jumps to the start of a line in your editor, your terminal, Slack, and the Safari address bar. Learn that system, learn the dozen shortcuts that actually recover time, then build your own for whatever is left. All key combinations here were checked against Apple's documentation on 28 July 2026, on macOS Tahoe 26.6.

Why your Mac already knows Emacs

Keycap banner showing Control A, the Emacs derived binding macOS uses to jump to the start of a line

Open Apple's official shortcut reference and scroll to the text-editing section. Among the ordinary entries sit these:

  • Control-A: move to the beginning of the line or paragraph
  • Control-E: move to the end of a line or paragraph
  • Control-B and Control-F: move one character backward or forward
  • Control-P and Control-N: move up or down one line
  • Control-T: swap the character behind the insertion point with the one in front
  • Control-O: insert a new line after the insertion point
  • Control-H and Control-D: delete the character to the left or right

Apple lists all of them and never says where they came from. They are Emacs bindings, inherited through NeXTSTEP into the text system that every native macOS app draws its text fields from. The letters are mnemonic once you know: A for the start of a line, E for end, B back, F forward, P previous, N next, T transpose.

This matters more than any individual shortcut, because those keys are not a feature of your editor. They belong to the operating system's text layer, so they work in a Slack message, a Mail compose window, the Safari address bar, a Finder rename field, and a commit message box. One rule, learned once, applies in a hundred places.

Then there is the part that trips people up, and no shortcut list ever mentions it.

Where the rule breaks

The same letters do not mean the same things everywhere. Your terminal uses readline, which shares ancestry with the macOS text system but diverged, and Electron editors sit on top of a browser with its own opinions. The overlap is large enough to feel universal and incomplete enough to bite.

KeysNative macOS text fieldTerminal (zsh, readline)VS Code
Control-AStart of lineStart of lineStart of line
Control-EEnd of lineEnd of lineEnd of line
Control-B / Control-FBack / forward one characterBack / forward one characterUsually rebound to sidebar and find
Control-KDelete to end of lineKill to end of line, into the kill ringDelete to end of line
Control-DForward deleteSends EOF. On an empty prompt this closes the shellSelect next occurrence
Control-WNot boundDelete the previous wordCloses the window
Control-UNot boundKill the whole lineVaries by keymap
Control-TTranspose charactersTranspose charactersVaries by keymap

Two rows in that table are where people lose work. Control-D is a harmless forward delete in a text field and an instruction to end the session at an empty shell prompt. Control-W deletes a word in your terminal and closes the window in VS Code, which is a genuinely bad surprise mid-edit.

Note also that Apple's public reference documents Control-A through Control-T but omits Control-K and Control-Y, the kill and yank pair, even though the text system supports them. The list is not the system. That gap is precisely why learning the underlying model beats memorising a page.

The everyday set

Keycap banner showing Command C, the everyday Mac keyboard shortcut for copy

The shortcuts almost everyone already half-knows, worth stating once so the rest of this guide has a floor.

KeysWhat it does
Command-X / Command-C / Command-VCut, copy, paste, including files in the Finder
Command-Z / Shift-Command-ZUndo, redo
Command-ASelect all
Command-SSave
Command-FFind
Command-G / Shift-Command-GFind again, forwards or backwards
Command-PPrint
Command-W / Option-Command-WClose window, close all windows of the app
Command-QQuit the app
Command-CommaOpen settings for the front app
Command-YQuick Look the selected file

Command-G is the one developers most often miss. After a Command-F, it walks the matches without your hands returning to the mouse, and it works in browsers, editors, and Preview alike.

Option-Command-V deserves a mention of its own: copy a file with Command-C, then Option-Command-V moves it instead of copying, which is the Finder's equivalent of cut and paste.

Finder and system navigation

Keycap banner showing Shift Command G, the Finder Go to Folder keyboard shortcut on Mac

KeysWhat it does
Shift-Command-GGo to Folder, which accepts a typed path
Shift-Command-NNew folder
Control-Command-NNew folder containing the selected items
Command-Up ArrowOpen the enclosing folder
Command-Down ArrowOpen the selected item
Command-Left Bracket / Command-Right BracketPrevious and next folder
Command-IGet Info
Command-DeleteMove to Trash
Shift-Command-DeleteEmpty the Trash
Command-1 through Command-4Icon, list, column, gallery view
Shift-Command-H / Shift-Command-D / Option-Command-LHome, Desktop, Downloads
Shift-Command-UUtilities, which is where Terminal lives

Shift-Command-G is the one that turns the Finder into something usable from the keyboard. It takes a path, it expands ~, and it will happily open a directory you would otherwise click through five times.

Windows, spaces, and switching

Keycap banner showing Command and backtick, the Mac shortcut for cycling between windows of one app

KeysWhat it does
Command-TabSwitch apps
Command-BacktickCycle windows within the current app
Control-Up ArrowMission Control
Control-Down ArrowShow all windows of the front app
Command-Mission Control or Fn-HShow the desktop
Command-M / Option-Command-MMinimise window, minimise all of the app's windows
Command-H / Option-Command-HHide app, hide every other app
Control-Command-FFull screen, where the app supports it
Option-Command-DShow or hide the Dock

The backtick one is the highest-value entry in this table and the least known. Command-Tab moves between apps, but if you have four terminal windows or three editor windows open, it only ever brings you to the most recent. Command-Backtick walks the windows inside the app you are already in. Anyone running several things in parallel uses it constantly.

Command-H is worth more than Command-M. Minimising sends a window to the Dock where you have to fish it back out; hiding leaves it in the app switcher where Command-Tab restores it.

Screenshots, capture, and hardware keys

Keycap banner showing Shift Command 5, the macOS screenshot and screen recording panel shortcut

KeysWhat it does
Shift-Command-5The capture panel: region, window, full screen, and screen recording
Shift-Command-3Whole screen, straight to a file
Shift-Command-4Region select, then space bar to switch to window capture
Add Control to any of the aboveSend to the clipboard instead of a file
Control-Command-Space or Fn-ECharacter Viewer, for emoji and symbols
Fn-QNew Quick Note
Press Fn twiceStart dictation
Option-Shift-Volume Up/DownAdjust volume in quarter steps
Option-Brightness UpJump straight to Displays settings
Option-Volume UpJump straight to Sound settings

The Option plus hardware key pattern generalises: holding Option while pressing a media or brightness key opens the settings pane that controls it, which is faster than any menu path.

One more that belongs here because nothing else covers it: hold Option while a menu is open and hidden commands appear in place of the ordinary ones. Close becomes Close All, Save becomes Save As in some apps, and the Wi-Fi menu turns into a diagnostic readout. There is a second menu hiding under most of the first one.

Text editing that works in every text field

Keycap banner showing Option and right arrow, the Mac shortcut to move the cursor one word forward

This is the section from the top of the article, applied. These are the keys worth putting in muscle memory first, because the return compounds across every app you type in.

KeysWhat it does
Option-Left Arrow / Option-Right ArrowMove by word
Command-Left Arrow / Command-Right ArrowStart and end of line
Option-DeleteDelete the word to the left
Control-KDelete from the cursor to the end of the line
Control-A / Control-EStart and end of line, the Emacs way
Fn-Delete or Control-DForward delete
Control-TTranspose two characters, which fixes a typo without a selection
Add Shift to any movementSelect instead of move

That last row is the multiplier. Every movement shortcut becomes a selection shortcut with Shift, so Shift-Option-Right Arrow selects the next word and Shift-Command-Left Arrow selects back to the start of the line. Learning eight movements gives you sixteen commands.

Sleep, lock, log out, and force quit

Keycap banner showing Control Command Q, the Mac keyboard shortcut to lock the screen

KeysWhat it does
Control-Command-QLock the screen
Shift-Command-QLog out, with confirmation
Option-Shift-Command-QLog out immediately, no confirmation
Option-Command-EscForce Quit window
Option-Command-PowerPut the Mac to sleep
Control-Command-PowerForce restart, without prompting to save

Hold Option while choosing Log Out, Shut Down, or Restart from the Apple menu and the confirmation dialog is skipped. The Control-Command-Power entry is worth knowing and worth respecting, since it restarts without offering to save anything.

Accessibility shortcuts

Keycap banner showing Option Command F5, which opens the macOS Accessibility Shortcuts panel

Apple documents these thoroughly and every other guide on the subject ignores them. They are useful well beyond their name, and one of them is a frequent cause of shortcuts appearing to break, which the next section returns to.

KeysWhat it does
Option-Command-F5, or triple-press Touch IDAccessibility Shortcuts panel, which is where VoiceOver and Zoom are toggled
Control-Option-Command-8Invert colours
Control-Option-Command-Comma / PeriodDecrease or increase contrast
Control-F3Move focus to the Dock
Control-F4Move focus to the active or next window
Control-F5Move focus to the window toolbar
Control-F8Move focus to the status menus in the menu bar
Control-F7Change what Tab moves between: all controls, or only text boxes and lists
Control-TabMove to the next control when a text field is selected

Control-F7 is the sleeper. It changes whether Tab cycles through every control in a window or only text fields, which is the difference between a dialog you can drive entirely from the keyboard and one where Tab seems to skip the buttons.

Driving the terminal

Keycap banner showing Control R, the terminal keyboard shortcut for reverse history search

The terminal is where most developer time goes and where every background agent session ends up, and it is absent from every general Mac shortcut guide because it is not an operating system feature. It runs on readline, so the Emacs lineage from the top of this article applies directly.

KeysWhat it does
Control-RReverse search through command history. Press again to walk further back
Control-A / Control-EStart and end of the line
Control-UDelete the whole line
Control-WDelete the previous word
Control-KDelete to the end of the line
Control-YPaste back whatever you last killed
Control-LClear the screen without losing scrollback
Control-CInterrupt the running command
Control-DSend EOF. On an empty prompt, this exits the shell
Control-Z, then fgSuspend a process, then resume it in the foreground

Control-R is the one that changes how you work. Most people retype commands or press the up arrow repeatedly; reverse search finds a command from three days ago by typing four characters of it.

Control-Z followed by fg is the other. A long-running process can be pushed into the background, leaving the prompt free, and pulled back when you want it. It beats opening a new tab for a task you are going to return to in ninety seconds.

Reading a diff you did not write

Keycap banner showing a plus minus symbol, for navigating changes in a diff from the keyboard

Something has changed about which keystrokes are expensive. When you write every character yourself, the valuable shortcuts are the ones that produce text faster: multi-cursor selection, delete to end of line, move by word. When a coding agent produces the first draft, the work moves to reading, and the shortcuts that matter move with it.

These are editor-level rather than system-level, so the exact bindings depend on your setup, but the categories are what to look for:

  • Next and previous change. Walking hunks in a diff view without scrolling. In VS Code this is Option-F5 and Shift-Option-F5 for changes in a file, and the Source Control view has its own navigation.
  • Jump to the next problem. F8 and Shift-F8 walk errors and warnings across the project, and Option-F8 scopes the same movement to the current file. This is the fastest way to triage what a generated change broke.
  • Stage and revert from the keyboard. Reviewing a hunk and accepting or rejecting it without reaching for a mouse is the difference between reviewing forty files and skimming them.
  • Go to definition and back. F12 to follow a symbol, Control-Minus to return. Reading unfamiliar code is a lot of following and returning.
  • Jump between review comments in whatever tool holds them.

None of that is exotic. It is just a different set from the one every shortcut listicle teaches, because the listicles were written for a job where a human typed the code. If you want the broader picture of how that job changed, our comparison of Codex and Claude Code covers where the time actually goes now.

Making your own shortcuts

Keycap banner showing a plus symbol, for creating custom keyboard shortcuts on Mac

Any menu command in any app can be given a keyboard shortcut, and this is underused.

Go to Apple menu, then System Settings, then Keyboard, then Keyboard Shortcuts, then App Shortcuts in the sidebar, then the Add button.

The rule that catches everyone: the menu title must be typed exactly as it appears in the app. That includes punctuation. An ellipsis is three periods with no spaces. A submenu arrow is typed as ->. So a nested command is entered as:

Format->Font->Ligatures->Use Default

Get a character wrong and the shortcut silently does nothing, with no error to tell you why.

Beyond that, consider remapping rather than memorising. Once you are past forty or so shortcuts, adding more chords has diminishing returns, and the better move is changing what the keys under your fingers do. Karabiner-Elements remaps at the system level, and a common setup turns Caps Lock into a fifth modifier, sometimes called a hyper key, which gives you an entire layer that no app has claimed. That is a more durable answer than learning another twenty combinations.

When a shortcut stops working

Keycap banner showing an exclamation mark, for troubleshooting Mac keyboard shortcuts that stop working

In the order that resolves fastest:

  1. An app binding is overriding the system one. App shortcuts win over system shortcuts. Check the app's own settings first.
  2. Input Sources is stealing it. Control-Space and Control-Option-Space switch keyboard input sources by default, which is why they so often fail to reach an app. System Settings, Keyboard, Keyboard Shortcuts, Input Sources.
  3. Two of your custom shortcuts collide. macOS does not warn you when you assign the same combination twice. The later one usually loses.
  4. The menu title does not match. For custom App Shortcuts, this is the single most common cause. Re-read the exact string, including the ellipsis.
  5. Control-F7 changed the focus mode, so Tab is moving between different things than you expect and buttons appear to be skipped.
  6. Accessibility permissions are not granted. Any tool that intercepts keys, including Karabiner and most window managers, needs Privacy and Security, Accessibility permission, and quietly does nothing without it.
  7. A remapper is intercepting first. If you run one, it sees the key before the app does. Disable it to test.

FAQ

Keycap banner showing a question mark, for frequently asked questions about Mac keyboard shortcuts

How do I see every shortcut an app supports?

Open the app's menus and read the right-hand column, which is the only complete and current list, because it comes from the app itself. For system-wide bindings, System Settings, Keyboard, Keyboard Shortcuts shows what is assigned and lets you change it. Help menu search is a useful fallback: type a command name and macOS shows you where it lives in the menus.

Which shortcuts should I learn first?

The movement set from the text editing section, because it pays off in every app rather than one. After that, Command-Backtick, Control-R in the terminal, and Shift-Command-G in the Finder. Those four change how a day feels more than any other four on this page.

Do Mac shortcuts work on an external Windows keyboard?

Yes, with the modifiers remapped. macOS maps the Windows key to Command and Alt to Option, which puts them in the opposite physical order from an Apple keyboard. System Settings, Keyboard, Keyboard Shortcuts, Modifier Keys lets you swap them per keyboard, so you can fix it for the external board without affecting the built-in one.

Can I sync custom shortcuts to another Mac?

Not through iCloud. App Shortcuts live in each app's preferences domain on the local machine, so moving them means copying preferences or, more practically, keeping your remapping in a tool with an exportable config. This is a further argument for Karabiner over dozens of hand-made App Shortcuts: one file, version controlled, moves with you.

Why does a shortcut work in one app but not another?

Because most shortcuts are not global. Menu-bound commands only exist while the app that defines them is in front, and the Emacs-derived text bindings only apply inside a native text field. An Electron app draws its own text fields and often rebinds those keys, which is why Control-W deletes a word in Terminal and closes the window in VS Code.

Written by

Software Engineer @Bug0, contributing writer to The Foreword by Hashnode

More from The foreword

Comments (2)

Leave a comment
  1. Farhana Yasmin
    Farhana YasminSoftware Engineer

    Bookmarked!

  2. Syed Fazle Rahman
    Syed Fazle RahmanBuilding Bug0, an AI-native E2E testing platform for modern apps - co-founder & ceo @ Hashnode

    nice list, Ankit!