# The Best Keyboard Shortcuts for Windows, Mac and Developers

Every time you reach for the mouse to copy a line, find a word or switch windows, you break your rhythm for a second or two. That sounds trivial until you count how often it happens in a day. Keyboard shortcuts remove those small interruptions, and the handful that matter most are easy to learn.

This guide covers the shortcuts that are worth knowing for almost everyone, on both Windows and macOS, followed by a dedicated section for developers: code editors such as VS Code and JetBrains IDEs, the terminal, browser developer tools and AI coding assistants. Each section explains what the shortcut does, where it behaves differently, and the related shortcuts that make it more useful. A quick reference table near the end collects the most important ones.

## How to read the shortcuts in this guide

A few conventions keep the lists short:

- **Ctrl on Windows is usually Cmd on Mac.** Ctrl+C becomes Cmd+C, Ctrl+F becomes Cmd+F, and so on. Where the Mac version is different in another way, it is listed separately.
- **Alt on Windows is Option on Mac.** Many editor shortcuts use Alt+arrow on Windows and Option+arrow on Mac.
- **Win** means the Windows logo key.
- **Defaults vary by app.** The general shortcuts below work in most applications. Editor shortcuts are the default bindings for VS Code unless another editor is named, and every major editor lets you change them.
- **Laptop function keys.** On many laptops, F1 to F12 control brightness or volume by default, so you may need to hold Fn to use shortcuts such as F3, F5 or F12.

## Copy, cut and paste

Copy (Ctrl+C), cut (Ctrl+X) and paste (Ctrl+V) are the most used shortcuts on any computer. Copy places the selection on the clipboard and leaves the original in place. Cut places it on the clipboard and removes the original, which is how you move text, files or code. Paste inserts whatever is on the clipboard at the cursor.

They work almost everywhere: documents, spreadsheets, code editors, file managers, browsers and chat apps. The cut, copy and paste idea came out of Xerox PARC in the 1970s, and Apple's Lisa and Macintosh helped make the short key combinations a standard that Windows then adopted.

**Related shortcuts worth knowing:**

| Action | Windows | Mac |
|---|---|---|
| Copy | Ctrl+C | Cmd+C |
| Cut | Ctrl+X | Cmd+X |
| Paste | Ctrl+V | Cmd+V |
| Paste without formatting | Ctrl+Shift+V (many apps and browsers) | Cmd+Option+Shift+V (many apps) |
| Clipboard history | Win+V | Not built in; use a clipboard manager |

**Tips:**

- **Paste as plain text** when moving text between a web page, a document and an email, so you do not drag fonts and colors along with it. Support for this varies by app.
- **Turn on clipboard history** on Windows with Win+V. It keeps a list of recent items so you can paste something you copied a few minutes ago. On a Mac, a clipboard manager app adds the same feature.
- **Copy the whole line in a code editor** by pressing Ctrl+C with nothing selected. VS Code and many other editors copy the current line.
- Some secure apps and websites block pasting into certain fields, such as password confirmations. That is a deliberate restriction, not a broken shortcut.

## Undo and redo

Undo (Ctrl+Z) reverses your last action, and pressing it repeatedly steps back through your recent history. Redo restores what you undid. On Windows, redo is usually Ctrl+Y, though some applications use Ctrl+Shift+Z. On a Mac, undo is Cmd+Z and redo is almost always Cmd+Shift+Z.

Undo is not limited to typing. In most apps it also reverses formatting changes, deleted cells, moved shapes and pasted content. In Windows File Explorer and the Mac Finder, it can reverse a file move, rename or deletion right after you make it.

Why it matters: undo makes experimenting cheap. You can try a different phrasing, a bold layout change or a quick code edit, knowing that a single keystroke puts things back.

**Limits to keep in mind:**

- The history length differs between apps, and some editors let you increase it in settings.
- Some actions cannot be undone, such as sending an email, saving over a file in some apps, or anything that runs on a server.
- The history is usually lost when you close the file or the app.
- For code, undo is no substitute for version control. Commit working states with Git so you can return to them long after the undo history is gone.

## Select all

Ctrl+A (Cmd+A on Mac) selects everything in the current context: all the text in a document or text box, all files in a folder, all cells in a spreadsheet, or all objects on a design canvas.

It is most useful as the first step in a sequence:

- Ctrl+A, then Ctrl+C copies an entire document or code file.
- Ctrl+A, then a new font or size reformats a whole document.
- Ctrl+A in a folder, then Ctrl+X and Ctrl+V moves every file at once.

After selecting all, you can hold Shift and press the arrow keys to shrink the selection from the end. In a spreadsheet, the first Ctrl+A often selects only the current block of data, and a second press selects the whole sheet.

Be careful pairing it with Delete. Select all plus Delete clears everything, so if you do it by accident, undo straight away.

## Find, find next and replace

Ctrl+F (Cmd+F) opens a search bar in nearly every application: browsers, documents, PDFs, spreadsheets, chat histories and code editors. Type a word and it highlights every match, usually with a count, so you can jump between them.

| Action | Windows | Mac |
|---|---|---|
| Find | Ctrl+F | Cmd+F |
| Find next | F3 or Enter in the search box | Cmd+G |
| Find previous | Shift+F3 or Shift+Enter | Cmd+Shift+G |
| Find and replace | Ctrl+H (most apps) | Varies; Cmd+Option+F in VS Code |

**Getting more out of search:**

- **Match case and whole word** options narrow results, so searching for "log" does not also find "catalog" and "login".
- **Regular expressions** are supported in code editors and some text editors, which lets you search for patterns rather than exact words. For example, `\bTODO\b` finds the word TODO on its own.
- **Find and replace** saves a lot of manual editing, but check a few matches before choosing "replace all".
- Ctrl+F searches the current page or file. Searching across many files is a different shortcut, covered in the developer section below.

## Switching between apps and windows

Alt+Tab on Windows and Cmd+Tab on Mac switch between open applications without the mouse. Hold the first key and tap Tab to move through the list; release both keys to jump to the highlighted app. The list is ordered by recent use, so a single quick Alt+Tab flips between your two most recent apps, which covers most real switching.

| Action | Windows | Mac |
|---|---|---|
| Switch apps | Alt+Tab | Cmd+Tab |
| Switch in reverse | Alt+Shift+Tab | Cmd+Shift+Tab |
| Switch windows of the same app | Not built in by default | Cmd+` (backtick) |
| Overview of all windows | Win+Tab (Task View) | Ctrl+Up arrow (Mission Control) |
| Hide the current app | Not applicable | Cmd+H |

On a Mac, Cmd+Tab switches between applications, not windows. If you have three browser windows open, Cmd+` cycles through them. On Windows, Win+Tab opens Task View, which shows all windows as large previews and also manages virtual desktops.

Alt+Tab is at its best when you keep two or three apps in rotation, such as a code editor and a browser, or a spreadsheet and a report. If you need to move between more than that, window snapping or virtual desktops usually work better than pressing Tab many times. The guide on [how to multitask effectively](/blog/how-to-multitask-effectively/) covers how to organize that kind of work.

## Snapping and arranging windows

Snapping places a window in a fixed part of the screen without dragging or resizing by hand. On Windows, it has been built in since Windows 7.

| Action | Windows |
|---|---|
| Snap to left or right half | Win+Left / Win+Right |
| Snap to a quarter | Win+Left or Win+Right, then Win+Up or Win+Down |
| Maximize | Win+Up |
| Restore or minimize | Win+Down |
| Move window to another monitor | Win+Shift+Left / Win+Shift+Right |
| Open snap layouts (Windows 11) | Win+Z |

After you snap one window to half the screen, Windows offers the remaining windows to fill the other half, which makes a side by side layout two keystrokes away. That is ideal for comparing two documents, writing while reading research, or keeping documentation next to code. For more on these layouts, see the guide to [split screen multitasking](/blog/split-screen-multitasking/).

On a Mac, recent versions of macOS include window tiling under the Window menu, and you can drag a window to a screen edge to tile it. Hovering over the green button in the corner of a window also offers tiling and full-screen options. For more control on either platform, tools such as Microsoft PowerToys FancyZones on Windows let you define custom layouts, which helps on ultrawide or multiple monitors.

## Show the desktop

Win+D on Windows minimizes every window to show the desktop, and pressing it again restores them all where they were. It is a quick way to reach a file on the desktop or to clear the screen when someone walks up to your desk.

On a Mac, the equivalent is Cmd+F3 (on keyboards where F3 is the Mission Control key) or F11 (Fn+F11 on many laptops). On a trackpad, spreading your thumb and three fingers apart does the same.

On Windows you can also click the thin strip at the far right end of the taskbar. Win+M minimizes all windows without the toggle behavior, and Win+Shift+M restores them.

## Task Manager and force quit

When an app freezes or the computer slows to a crawl, the quickest fix is usually to see what is using the resources and end it.

- **Ctrl+Shift+Esc** opens Task Manager directly on Windows. It skips the security screen that Ctrl+Alt+Delete shows first, and it often works even when the rest of the interface is struggling. The Processes tab shows CPU, memory, disk and network use per app, and you can select a frozen program and choose End task. The Startup tab controls what launches when you sign in.
- **Cmd+Option+Esc** opens the Force Quit window on a Mac, where you can close an unresponsive app. For detailed resource use, open Activity Monitor through Spotlight (Cmd+Space, then type "Activity").

For deeper investigation on Windows, Microsoft's free Sysinternals Process Explorer shows which process owns which files and threads. Ending system processes may require administrator rights, and ending the wrong one can sign you out or crash Windows, so stick to apps you recognize.

## Browser shortcuts

Most people spend a large part of the day in a browser, and these shortcuts work in Chrome, Edge, Firefox and Safari with only small differences:

| Action | Windows | Mac |
|---|---|---|
| Reopen last closed tab | Ctrl+Shift+T | Cmd+Shift+T |
| New tab | Ctrl+T | Cmd+T |
| Close tab | Ctrl+W | Cmd+W |
| Next / previous tab | Ctrl+Tab / Ctrl+Shift+Tab | Ctrl+Tab / Ctrl+Shift+Tab |
| Jump to tab 1 to 8 | Ctrl+1 to Ctrl+8 | Cmd+1 to Cmd+8 |
| Jump to last tab | Ctrl+9 | Cmd+9 |
| Focus the address bar | Ctrl+L or Alt+D | Cmd+L |
| Reload, bypassing the cache | Ctrl+Shift+R or Ctrl+F5 | Cmd+Shift+R |
| Open link in new tab | Ctrl+Click | Cmd+Click |
| Zoom in / out / reset | Ctrl+Plus / Ctrl+Minus / Ctrl+0 | Cmd+Plus / Cmd+Minus / Cmd+0 |

**Reopen closed tab** is the one to learn first. Pressing it repeatedly reopens tabs in the reverse order you closed them, usually with their back history intact, and it can even bring back a whole window you closed. Text you typed into a form may or may not survive, depending on the site and the browser. If the tab you need was closed long ago, look in the History menu, which keeps a list of recently closed tabs and windows. Most browsers can also restore your previous session when you restart.

## Closing windows and apps

Alt+F4 closes the active window on Windows. For most apps that also quits the app, and well-behaved apps ask you to save first. Pressed on the desktop with no window active, Alt+F4 opens the shut down dialog.

On a Mac, closing and quitting are separate: Cmd+W closes the current window or tab, and Cmd+Q quits the whole application. On Windows, Ctrl+W closes a tab or document inside many apps without closing the app itself.

Alt+F4 is not a reliable force quit. If an app is badly frozen, use Task Manager or the Force Quit window instead. And because Alt+F4 acts instantly, read save prompts before dismissing them.

## Other system shortcuts worth knowing

A few more shortcuts save time daily:

| Action | Windows | Mac |
|---|---|---|
| Search and launch apps | Win, then type | Cmd+Space (Spotlight) |
| Lock the screen | Win+L | Ctrl+Cmd+Q |
| Screenshot of an area | Win+Shift+S | Cmd+Shift+4 |
| Screenshot of the whole screen | Win+Print Screen | Cmd+Shift+3 |
| Open file manager | Win+E | Cmd+Option+Space (Finder search) |
| System settings | Win+I | Open via Spotlight |
| App settings or preferences | Varies | Cmd+Comma |
| Emoji and symbol picker | Win+Period | Ctrl+Cmd+Space |
| Rename selected file | F2 | Enter |

Launching apps by typing their name is often faster than any pinned icon. Lock the screen every time you step away from a shared office; it takes a second and protects whatever you have open.

## Keyboard shortcuts for developers

Developers repeat the same handful of actions hundreds of times a day: open a file, jump to a definition, edit a line, search the project, run the debugger. The shortcuts in this section remove most of the mouse travel from that loop. They use VS Code's default bindings unless noted, with JetBrains equivalents (IntelliJ IDEA, PyCharm, WebStorm and others) where they differ. Most editors, including Cursor and Windsurf, which are built on VS Code, share these bindings.

### Save and save all

Ctrl+S (Cmd+S) saves the current file. Many editors now auto-save, but saving still matters because it often triggers other tools: format on save, linters, test watchers, hot reload and live previews. Ctrl+K S in VS Code (Cmd+Option+S on Mac) saves all open files, and Ctrl+Shift+S is Save As in most apps.

Save at logical points, such as after finishing a function, rather than after every line. If saving triggers a slow rebuild, configure the watcher instead of saving less.

### Quick open and the command palette

**Ctrl+P (Cmd+P) opens any file in the project by typing part of its name.** The search is fuzzy, so typing `usrcmp` can find `UserComponent.tsx`, and recently opened files appear first. In a large project, this replaces almost all clicking through folders. Add a slash to narrow by folder, such as `api/user`.

In VS Code, the same box accepts prefixes:

- `>` runs a command, the same as the command palette (Ctrl+Shift+P or Cmd+Shift+P).
- `@` jumps to a symbol in the current file.
- `#` searches symbols across the workspace.
- `:` goes to a line number (Ctrl+G does this directly).

The command palette is the one shortcut that teaches you the others: every command it lists shows its key binding next to it.

In JetBrains IDEs, press Shift twice for Search Everywhere, Ctrl+Shift+N (Cmd+Shift+O) to go to a file, and Ctrl+Shift+A (Cmd+Shift+A) to find any action.

### Go to definition and back

F12 in VS Code, or Ctrl+Click (Cmd+Click), jumps to the definition of the function, variable or class under the cursor, even when it lives in another file or in a library. It is the fastest way to understand unfamiliar code: see a call to `calculateRevenue()`, press F12, and read the implementation.

| Action | VS Code (Windows) | VS Code (Mac) | JetBrains |
|---|---|---|---|
| Go to definition | F12 | F12 | Ctrl+B / Cmd+B |
| Peek definition | Alt+F12 | Option+F12 | Ctrl+Shift+I / Option+Space |
| Find all references | Shift+F12 | Shift+F12 | Alt+F7 / Option+F7 |
| Go to implementation | Ctrl+F12 | Cmd+F12 | Ctrl+Alt+B / Cmd+Option+B |
| Go back | Alt+Left | Ctrl+Minus | Ctrl+Alt+Left / Cmd+[ |
| Go forward | Alt+Right | Ctrl+Shift+Minus | Ctrl+Alt+Right / Cmd+] |

Peek definition shows the code in an inline panel so you do not lose your place. Going back after a jump is just as important as the jump itself; learn both together. These features depend on the language service, so they are most reliable in typed languages and can be slow or incomplete in very large or highly dynamic codebases.

### Code completion

Ctrl+Space opens the suggestion list (often called IntelliSense or autocomplete) when it has not appeared on its own. Suggestions are context aware: after `user.` you see the properties and methods of that object, with types and short documentation. When you are inside a function call, Ctrl+Shift+Space (Cmd+Shift+Space on Mac) shows the parameter hints again.

Accept a suggestion with Tab or Enter, and keep reading the list rather than taking the first item. On a Mac, Ctrl+Space can clash with the system shortcut for switching input languages; if nothing happens, change one of the two bindings.

Completion is great for discovering APIs and avoiding typos, but it is not a replacement for knowing the language. Check that the suggestion is the method you meant, not just one with a similar name.

### Comment and uncomment

Ctrl+/ (Cmd+/) toggles a line comment on the current line or every selected line. The editor uses the right syntax for the file type, such as `//` in JavaScript or `#` in Python, and pressing it again removes the comments. Block comments have their own shortcut: Shift+Alt+A in VS Code (Shift+Option+A on Mac) and Ctrl+Shift+/ (Cmd+Option+/) in JetBrains.

Commenting out code is handy for isolating a bug or quickly comparing two implementations. Do not leave large blocks of commented-out code behind, though. Delete them once you are done; version control keeps the history.

### Format document

Format Document applies your formatter to the whole file, or to a selection, so indentation, spacing and line breaks follow one consistent style.

| Editor | Windows | Mac | Linux |
|---|---|---|---|
| VS Code: format document | Shift+Alt+F | Shift+Option+F | Ctrl+Shift+I |
| VS Code: format selection | Ctrl+K Ctrl+F | Cmd+K Cmd+F | Ctrl+K Ctrl+F |
| JetBrains: reformat code | Ctrl+Alt+L | Cmd+Option+L | Ctrl+Alt+L |

Formatting is most useful when the rules live in the project, not in each person's editor. Commit a formatter configuration (for example Prettier for JavaScript and TypeScript, Black or Ruff for Python, gofmt for Go) and an `.editorconfig`, then turn on format on save so nobody has to think about it. In a legacy codebase, format the whole project in one separate commit; mixing reformatting with real changes makes code review painful.

### Line editing: delete, move, duplicate

These are the shortcuts that make editing code feel fast:

| Action | VS Code (Windows) | VS Code (Mac) |
|---|---|---|
| Delete line | Ctrl+Shift+K | Cmd+Shift+K |
| Move line up / down | Alt+Up / Alt+Down | Option+Up / Option+Down |
| Copy line up / down | Shift+Alt+Up / Shift+Alt+Down | Shift+Option+Up / Shift+Option+Down |
| Insert line below | Ctrl+Enter | Cmd+Enter |
| Insert line above | Ctrl+Shift+Enter | Cmd+Shift+Enter |
| Indent / outdent | Ctrl+] / Ctrl+[ | Cmd+] / Cmd+[ |
| Fold / unfold block | Ctrl+Shift+[ / Ctrl+Shift+] | Cmd+Option+[ / Cmd+Option+] |

Delete line removes the whole line without selecting it first, which is ideal for cleaning out temporary `print()` or `console.log()` statements after debugging. If you might need the line again, use cut (Ctrl+X with nothing selected) instead, because delete does not put it on the clipboard. Moving lines with Alt+arrow is much faster and safer than cutting and pasting when you reorder statements. In JetBrains IDEs, Ctrl+Y (Cmd+Backspace) deletes a line and Ctrl+D (Cmd+D) duplicates it.

### Multiple cursors

Multiple cursors let you make the same edit in several places at once:

- **Ctrl+D (Cmd+D)** selects the next occurrence of the current word. Press it repeatedly to add more, then type to change them all.
- **Ctrl+Shift+L (Cmd+Shift+L)** selects every occurrence in the file.
- **Alt+Click (Option+Click)** adds a cursor wherever you click.
- **Ctrl+Alt+Up/Down (Cmd+Option+Up/Down)** adds a cursor on the line above or below.

Multiple cursors are perfect for renaming a few local variables, adding quotes around a list of values or editing aligned lines. For renaming a symbol across files, use rename instead.

### Search across files and rename symbol

- **Ctrl+Shift+F (Cmd+Shift+F)** searches the whole project, with options for case, whole word, regular expressions and include or exclude patterns. Ctrl+Shift+H (Cmd+Shift+H) adds replace across files.
- **F2** renames a symbol everywhere it is used, through the language service. Unlike find and replace, it understands scope, so renaming a local `data` variable does not touch every other `data` in the project. In JetBrains IDEs, rename is Shift+F6.
- **Ctrl+. (Cmd+.)** opens quick fixes and refactorings for the code under the cursor, such as adding a missing import or extracting a function. JetBrains uses Alt+Enter (Option+Enter).

### Debugging

Debugger shortcuts are where editors differ most, so check the Run or Debug menu of your editor. The VS Code defaults are:

| Action | VS Code | JetBrains (Windows) | JetBrains (Mac) |
|---|---|---|---|
| Start or continue | F5 | Shift+F9 (start), F9 (resume) | Ctrl+D (start), Cmd+Option+R (resume) |
| Toggle breakpoint | F9 | Ctrl+F8 | Cmd+F8 |
| Step over | F10 | F8 | F8 |
| Step into | F11 | F7 | F7 |
| Step out | Shift+F11 | Shift+F8 | Shift+F8 |
| Stop | Shift+F5 | Ctrl+F2 | Cmd+F2 |

Learning step over, step into and step out by touch changes debugging from a chore into a fast loop: run to a breakpoint, step through, inspect a variable, adjust and continue.

### Terminal shortcuts

Most terminals on macOS and Linux run bash or zsh, which share a set of line editing shortcuts. Many also work in Git Bash and in Windows Terminal with WSL:

| Action | Shortcut |
|---|---|
| Search command history | Ctrl+R, then type |
| Jump to start / end of line | Ctrl+A / Ctrl+E |
| Delete word before cursor | Ctrl+W |
| Delete to start of line | Ctrl+U |
| Clear the screen | Ctrl+L |
| Stop the running command | Ctrl+C |
| End input or close the shell | Ctrl+D |
| Complete a command or path | Tab |
| Previous / next command | Up / Down |

Ctrl+R alone saves a remarkable amount of retyping: press it, type a fragment such as `docker run`, and the shell finds the most recent matching command. Press Ctrl+R again to go further back.

In VS Code, Ctrl+` (backtick) toggles the integrated terminal, and Ctrl+B (Cmd+B) toggles the sidebar, which together give you a full-width editor with a terminal a keystroke away.

### Browser developer tools

For front-end work, these shortcuts work in Chrome and Edge, and mostly in Firefox:

| Action | Windows | Mac |
|---|---|---|
| Open developer tools | F12 or Ctrl+Shift+I | Cmd+Option+I |
| Inspect an element | Ctrl+Shift+C | Cmd+Shift+C |
| Open the console | Ctrl+Shift+J | Cmd+Option+J |
| Command menu in DevTools | Ctrl+Shift+P | Cmd+Shift+P |
| Toggle device emulation | Ctrl+Shift+M | Cmd+Shift+M |
| Hard reload | Ctrl+Shift+R | Cmd+Shift+R |

The DevTools command menu works like the editor command palette: type "screenshot", "disable JavaScript" or "coverage" to reach features buried in menus.

## Shortcuts in AI coding assistants and chat apps

AI assistants add their own shortcuts, and learning a few makes them feel much less like a separate tool. Bindings change between versions, so treat these as a starting point and check each tool's shortcut list.

**GitHub Copilot in VS Code:**

- **Tab** accepts an inline suggestion and **Esc** dismisses it.
- **Alt+] and Alt+[** (Option+] and Option+[ on Mac) cycle through alternative suggestions.
- **Ctrl+I** (Cmd+I) opens inline chat in the editor, which is useful for "explain this" or "add error handling" on a selection.

**Cursor and other VS Code based AI editors** keep the standard VS Code shortcuts and add their own for inline edits and the chat or agent panel, usually on Ctrl or Cmd plus K, L or I. Open the command palette and search for "chat" or "edit" to see the current bindings.

**Chat apps in the browser:**

- **Enter** sends a message and **Shift+Enter** adds a new line, in ChatGPT, Claude, Gemini and most others.
- ChatGPT shows its full shortcut list with Ctrl+/ (Cmd+/).
- The general shortcuts still do a lot of work: Ctrl+F to find something in a long conversation, Ctrl+A and Ctrl+C to grab a prompt, and Ctrl+Shift+V to paste text into a prompt without formatting.

**Command-line agents** such as Claude Code, Codex CLI and Gemini CLI run in your terminal, so the terminal shortcuts above apply, and each tool lists its own keys in its help output.

## Letting an AI agent handle the repetitive steps

Shortcuts make each manual step faster. Some steps you can stop doing manually altogether. Checking a DNS record, decoding a JWT, validating a regular expression, converting a timestamp or repairing a broken JSON file usually means switching to a browser, finding a website, pasting, copying the result and switching back. That is several shortcuts' worth of context switching for one small answer.

If you already work with an AI assistant in your editor or terminal, it can do those steps for you when it has the right tools. The Model Context Protocol (MCP) is the open standard for connecting assistants to tools, and an [MCP server](/blog/what-is-an-mcp-server/) exposes them through one endpoint. MultitaskAI is a remote MCP server that gives agents a catalog of exact [tools](/tools/) for jobs like DNS, WHOIS and SSL lookups, JSON repair, regex testing, conversions and image resizing. It works in Claude Code, Cursor, VS Code, Windsurf, Gemini CLI, Codex CLI, Claude, ChatGPT and other [MCP clients](/clients/), and every signed-in account gets 100 free requests a day. The [docs](/docs.md) explain how to connect it.

The result is that "check whether this certificate expires soon" or "test this regex against these sample lines" becomes one prompt in the window you are already in, with an exact answer instead of a guess.

## Quick reference: the shortcuts to learn first

If you only learn a few, start here:

| Shortcut | Windows | Mac | What it does |
|---|---|---|---|
| Copy, cut, paste | Ctrl+C, X, V | Cmd+C, X, V | Duplicate or move content |
| Undo / redo | Ctrl+Z / Ctrl+Y | Cmd+Z / Cmd+Shift+Z | Reverse or restore actions |
| Select all | Ctrl+A | Cmd+A | Select everything in context |
| Find | Ctrl+F | Cmd+F | Search the page or file |
| Switch apps | Alt+Tab | Cmd+Tab | Jump between open apps |
| Snap window | Win+Arrow | Window menu tiling | Arrange windows side by side |
| Show desktop | Win+D | Cmd+F3 or F11 | Clear the screen and restore |
| Task Manager / Force Quit | Ctrl+Shift+Esc | Cmd+Option+Esc | Deal with frozen apps |
| Reopen closed tab | Ctrl+Shift+T | Cmd+Shift+T | Bring back a closed tab |
| Close window / quit app | Alt+F4 | Cmd+W / Cmd+Q | Close without the mouse |
| Quick open file | Ctrl+P | Cmd+P | Open any project file by name |
| Command palette | Ctrl+Shift+P | Cmd+Shift+P | Run any editor command |
| Go to definition | F12 | F12 | Jump to where code is defined |
| Toggle comment | Ctrl+/ | Cmd+/ | Comment or uncomment lines |
| Format document | Shift+Alt+F | Shift+Option+F | Apply the formatter |
| Delete line | Ctrl+Shift+K | Cmd+Shift+K | Remove the current line |
| Search project | Ctrl+Shift+F | Cmd+Shift+F | Find text across files |
| Search shell history | Ctrl+R | Ctrl+R | Find a previous command |

## How to actually learn shortcuts

Reading a list does not make shortcuts stick. Using them does. A few habits help:

1. **Pick two or three at a time.** Learn them until you use them without thinking, then add the next few. Trying to learn twenty at once rarely works.
2. **Notice the mouse.** Each time you reach for a menu to do something you do often, look up the shortcut and use it for the rest of the week.
3. **Use the command palette as a teacher.** In editors, the palette shows the binding next to every command. Search for the action, then use the key next time.
4. **Keep a short cheat sheet** next to your screen for the current batch, and remove items once they are automatic.
5. **Customize carefully.** Rebinding a shortcut that clashes with your system or another tool is worthwhile. Rebinding everything makes it hard to work on any other machine. VS Code and JetBrains IDEs both offer keymaps that copy other editors if you are switching.
6. **Review your editor's release notes** now and then. Editors add useful commands regularly, and many come with new shortcuts.

## Frequently asked questions

### What are the most important keyboard shortcuts to learn first?

Copy, cut and paste, undo and redo, select all, find, switching apps with Alt+Tab or Cmd+Tab, and reopening a closed browser tab. Those cover most everyday work. Developers should add quick open (Ctrl+P), the command palette and go to definition.

### Are Windows shortcuts the same on a Mac?

Most general shortcuts are the same with Cmd in place of Ctrl. The differences are in system features: window snapping, Task Manager versus Force Quit, closing versus quitting apps, and find and replace, which is Ctrl+H on Windows but varies on Mac because Cmd+H hides the app.

### Why does a shortcut not work for me?

The usual causes are a laptop that needs Fn for function keys, a conflict with another app or a system shortcut, a different keyboard layout, or an editor that uses a different keymap. Check the app's keyboard settings, where you can see and change every binding.

### Do VS Code shortcuts work in Cursor and Windsurf?

Yes, for the most part. Both editors are built on VS Code and keep its default key bindings, then add their own shortcuts for AI features.

### How can I see all shortcuts in VS Code?

Press Ctrl+K Ctrl+S (Cmd+K Cmd+S on Mac) to open the keyboard shortcuts editor, where you can search, see and change every binding.
