VS Code Keyboard Shortcuts for Faster Coding Workflows
When you work in Visual Studio Code for hours at a time, the value of keyboard shortcuts is not simply that a keypress is faster than a click. The bigger benefit is being able to move between finding code, understanding it, editing it, fixing problems, and running commands without repeatedly breaking your train of thought.
VS Code includes hundreds of commands, but developers rarely need all of them equally. A useful shortcut setup should reflect the tasks you repeat throughout a real coding session. This guide therefore focuses on practical workflows first, with the default shortcuts for Windows, Linux, and macOS.
Learn shortcuts by connecting them to real coding tasks, not by memorizing a complete shortcut list.
Start With Four Shortcuts That Change How You Navigate VS Code

Four commands cover a surprising amount of everyday navigation: the Command Palette, Quick Open, file symbols, and workspace search.
| Action | Windows | Linux | macOS |
|---|---|---|---|
| Command Palette | Ctrl + Shift + P | Ctrl + Shift + P | Command + Shift + P |
| Quick Open | Ctrl + P | Ctrl + P | Command + P |
| Go to Symbol in File | Ctrl + Shift + O | Ctrl + Shift + O | Command + Shift + O |
| Search Workspace | Ctrl + Shift + F | Ctrl + Shift + F | Command + Shift + F |
The Command Palette is especially useful because it lets you search commands by name and shows available shortcuts beside many commands. This makes it a practical way to discover functionality while you work.
Quick Open solves a different problem. If you know the file you need, pressing Ctrl + P on Windows or Linux, or Command + P on macOS, is usually more direct than opening the Explorer and navigating through several folders.
Use the Right Navigation Tool for What You Know
One common source of wasted time is using text search for every kind of navigation. VS Code provides different tools depending on whether you know the text, filename, symbol, or code location you are looking for.
| What You Know | Windows / Linux | macOS |
|---|---|---|
| Text in current file | Ctrl + F | Command + F |
| Text somewhere in project | Ctrl + Shift + F | Command + Shift + F |
| Filename | Ctrl + P | Command + P |
| Symbol in current file | Ctrl + Shift + O | Command + Shift + O |
| Symbol across workspace | Ctrl + T | Command + T |
| Definition of current symbol | F12 | F12 |
| References to current symbol | Shift + F12 | Shift + F12 |
| Peek Definition | Alt + F12 | Option + F12 |
The useful habit is deciding what kind of information you already have. If you know the filename, use Quick Open. If you know the function or class, use symbol navigation. If your cursor is already on the code you want to investigate, Go to Definition or References is usually the shortest path.
Workflow 1: Understand Unfamiliar Code
Suppose you open a repository you did not write and need to understand how a function fits into the project. Start with Quick Open if you know the file, then place the cursor on an unfamiliar function and press F12 to inspect its definition. Use Shift + F12 when you need to see where the symbol is referenced elsewhere.
If opening another file would interrupt your context, use Alt + F12 on Windows or Linux, or Option + F12 on macOS, to open Peek Definition instead. This keeps the surrounding code visible while you inspect the definition.
The value comes from using these commands together. You stop treating a codebase as a directory tree and start navigating it through relationships between files, definitions, and references.
Edit Repeated Code With Fewer Manual Steps
Editing shortcuts become useful when they replace a sequence of selecting, cutting, clicking, moving, and pasting.
| Action | Windows | Linux | macOS |
|---|---|---|---|
| Delete Line | Ctrl + Shift + K | Ctrl + Shift + K | Command + Shift + K |
| Insert Line Below | Ctrl + Enter | Ctrl + Enter | Command + Enter |
| Move Line Up / Down | Alt + Up / Down | Alt + Up / Down | Option + Up / Down |
| Add Next Matching Selection | Ctrl + D | Ctrl + D | Command + D |
| Select All Occurrences of Selection | Ctrl + Shift + L | Ctrl + Shift + L | Command + Shift + L |
A good place to start is Ctrl + D or Command + D. Select a repeated variable or value, invoke the shortcut again, and VS Code adds the next matching occurrence to the selection. It is a simple way to make the same edit in several places without immediately moving into more complex multi-cursor techniques.

Let VS Code Understand the Code Before You Edit It
Some changes are better handled as code operations rather than plain-text operations.
| Action | Windows / Linux | macOS |
|---|---|---|
| Rename Symbol | F2 | F2 |
| Quick Fix | Ctrl + . | Command + . |
| Trigger Suggestions | Ctrl + Space | Control + Space |
| Parameter Hints | Ctrl + Shift + Space | Command + Shift + Space |
| Format Document | Shift + Alt + F | Shift + Option + F |
F2 is particularly valuable for refactoring. When the active language tooling supports Rename Symbol, VS Code can change the symbol based on its code relationship rather than blindly replacing every matching string in the workspace.
Quick Fix is useful when VS Code or a language extension has already identified a problem and provides an available code action. Instead of searching through menus, you can inspect the relevant fixes directly from the editor.
Workflow 2: Refactor Without Treating Code Like Plain Text
When renaming a function, variable, or class, start with F2 rather than project-wide Find and Replace. After the rename, use Ctrl + . on Windows or Linux, or Command + . on macOS, if VS Code reports an issue or offers another code action.
If formatting is needed after the structural edit, use Shift + Alt + F on Windows or Linux, or Shift + Option + F on macOS. The formatter still depends on the language and project configuration, but the workflow remains consistent: use language-aware tools for structural changes and formatting tools for presentation.
Keep the Integrated Terminal Within Reach
Developers frequently move between editing code and running tests, package commands, Git operations, builds, or development servers. VS Code's integrated terminal keeps that work inside the same workspace.
| Action | Windows | Linux | macOS |
|---|---|---|---|
| Toggle Integrated Terminal | Ctrl + ` | Ctrl + ` | Control + ` |
| Create New Terminal | Ctrl + Shift + ` | Ctrl + Shift + ` | Control + Shift + ` |
Notice that macOS uses Control rather than Command for the default integrated-terminal toggle. This distinction is easy to lose when Windows and macOS shortcuts are shown in simplified comparison tables.
Workflow 3: Fix Problems and Verify the Result
When working through compiler, linter, or language-service problems, use F8 to move to the next error or warning and Shift + F8 to return to the previous one. Once you reach the problem, use Quick Fix when an appropriate code action is available, make the change, and then open the integrated terminal to run the relevant test or build command.
If you need the full Problems panel instead of stepping through diagnostics one at a time, use Ctrl + Shift + M on Windows or Linux, or Command + Shift + M on macOS.
This creates a repeatable workflow: locate the problem, inspect the available fix, edit the code, and verify the result without constantly switching between different parts of the interface.
Work Across Multiple Files Without Losing Context
Splitting the editor is useful when one file needs to remain visible while you modify another, such as comparing a component with its test or a function with the code that calls it.
| Action | Windows | Linux | macOS |
|---|---|---|---|
| Split Editor | Ctrl + \ | Ctrl + \ | Command + \ |
| Focus Editor Group 1 | Ctrl + 1 | Ctrl + 1 | Command + 1 |
| Focus Editor Group 2 | Ctrl + 2 | Ctrl + 2 | Command + 2 |
| Toggle Sidebar | Ctrl + B | Ctrl + B | Command + B |
This is particularly useful when reading unfamiliar code because you can keep one implementation visible while following definitions or references in another editor group.
Why Isn't a VS Code Shortcut Working?
A shortcut can be correct and still behave differently on your machine. VS Code's keybinding system uses context rules, user overrides, extensions, and the current keyboard layout when deciding what command a keypress should trigger.
Check Whether It Is a Chord
For example, Ctrl + K followed by Ctrl + S on Windows or Linux, and Command + K followed by Command + S on macOS, opens the Keyboard Shortcuts editor.
This is a chord, meaning two separate keypress actions. You do not press all of the keys simultaneously. Complete the first combination, then enter the second.
Check for a Different Binding
Open the Keyboard Shortcuts editor and search for the command. VS Code lets you inspect, change, remove, and reset bindings. User settings and extensions can also introduce bindings that override or conflict with the defaults.
Check the Current Context
VS Code supports when clauses that activate a keybinding only under particular conditions. A shortcut can therefore work while the editor has focus but behave differently when the terminal, search box, or another interface element is active.
Check Your Keyboard Layout
The printable VS Code shortcut references generally assume a standard US English keyboard. The Keyboard Shortcuts editor adapts to the keyboard layout detected on your system, which matters especially for punctuation keys such as brackets, backslashes, semicolons, and backticks.
On Linux, changing the system keyboard layout may also require restarting VS Code before the detected layout updates correctly.
A 5-Day Plan for Making VS Code Shortcuts Stick
Instead of studying a shortcut list, connect a small group of commands to your normal coding actions over five days.
Day 1: Stop Browsing for Files
Use Quick Open every time you already know or partially know the filename. Use the Explorer only when you genuinely need to inspect the project structure. The goal is to make Ctrl + P or Command + P your automatic response to “I need another file.”
Day 2: Navigate Code by Meaning
Use F12 whenever you need to inspect where a symbol is defined and Shift + F12 whenever you need to see how it is used. If you catch yourself manually searching for a declaration that is already under your cursor, replace that action with symbol navigation.
Day 3: Replace Manual Refactoring
Use F2 for supported symbol renames and Quick Fix for available code actions. Reserve ordinary text replacement for situations where you actually want to replace matching text rather than change a code symbol.
Day 4: Keep the Test Loop on the Keyboard
Use F8 to move through problems and the integrated-terminal shortcut to run your normal tests, builds, or development commands. The objective is to create a repeatable edit-and-verify loop without repeatedly opening separate interface elements.
Day 5: Fix One Shortcut That Still Creates Friction
Open the Keyboard Shortcuts editor and identify one frequently used command whose default binding feels awkward in your workflow. Check for conflicts before changing it, then test whether the new combination is actually easier to use on your physical keyboard.
This approach gives each shortcut a job and a context. Muscle memory develops around something you already do rather than around a list you studied once.
Your Physical Keyboard Changes How Practical a Shortcut Feels
VS Code documentation describes software commands, but every shortcut still has to be performed on a physical keyboard. This matters in development because coding uses much more than letters. F2, F8, F12, arrow keys, brackets, backslashes, backticks, Ctrl or Command, Shift, and Alt or Option can all become part of a normal workday.
That is one reason we think keyboard layout should be chosen around the workflow rather than around size alone. A very compact layout can work well when you are comfortable with layers, but frequently placing F2, F8, or F12 behind another layer changes the physical effort required to use those VS Code commands.
Our NuPhy Air75 V3, for example, uses an 84-key 75% layout that keeps the function row and dedicated arrow keys within a compact footprint while supporting both Windows and macOS. Its configurable controls can also be adjusted through NuPhy IO when a workflow benefits from a different physical setup.
This does not mean developers need a specific keyboard size. It means a software shortcut should be evaluated together with how often you use it and how easily the required physical keys can be reached.
Customize the Keyboard Only After You Know the Workflow
The same principle applies to keyboard-level customization. Supported Air V3 models use NuPhy IO for key remapping, macros, and control configuration, while some other NuPhy generations use VIA or QMK.
For a developer, customization is most useful when it solves a known physical problem. If one VS Code command is used dozens of times per day but its default combination is uncomfortable on your layout, moving it may be worthwhile. If you rarely use the command, assigning a dedicated key only creates another mapping to remember.
VS Code itself should remain the first place to inspect shortcut conflicts and context behavior. Keyboard-level customization becomes the second layer when the software binding is correct but the physical access still does not fit the way you work.
Quick Reference: A Practical VS Code Starter Set
| Task | Windows | Linux | macOS |
|---|---|---|---|
| Command Palette | Ctrl + Shift + P | Ctrl + Shift + P | Command + Shift + P |
| Quick Open | Ctrl + P | Ctrl + P | Command + P |
| Workspace Search | Ctrl + Shift + F | Ctrl + Shift + F | Command + Shift + F |
| Go to Definition | F12 | F12 | F12 |
| Show References | Shift + F12 | Shift + F12 | Shift + F12 |
| Rename Symbol | F2 | F2 | F2 |
| Quick Fix | Ctrl + . | Ctrl + . | Command + . |
| Next Problem | F8 | F8 | F8 |
| Format Document | Shift + Alt + F | Shift + Alt + F | Shift + Option + F |
| Toggle Terminal | Ctrl + ` | Ctrl + ` | Control + ` |
| Open Keyboard Shortcuts | Ctrl + K, then Ctrl + S | Ctrl + K, then Ctrl + S | Command + K, then Command + S |
Final Thoughts
VS Code shortcuts become useful when they are attached to a real coding action. Quick Open helps you reach a file, F12 helps you understand a symbol, F2 helps you refactor it, F8 helps you locate problems, and the integrated terminal helps you verify the result.
Use those commands inside your normal workflow for several days before adding more. If a default binding creates friction, inspect it in VS Code first and customize it only when you know exactly what problem the change is solving.
At NuPhy, we look at the physical side of the same workflow as well. A shortcut may be efficient in software but inconvenient if the required function key, modifier, punctuation key, or navigation control is difficult to reach on your keyboard. The useful setup is the one where the editor's commands and the keyboard under your fingers work together without becoming something you have to think about.
FAQs
What VS Code shortcuts should I start with?
Start with Quick Open, Command Palette, Go to Definition, Show References, Rename Symbol, and Quick Fix. Together, they cover common file navigation, code exploration, and refactoring tasks.
What does Ctrl + K, then Ctrl + S mean in VS Code?
It is a keyboard chord on Windows and Linux. Press Ctrl + K first, then Ctrl + S. On macOS, the default is Command + K followed by Command + S. Both open the Keyboard Shortcuts editor.
What is the VS Code terminal shortcut on Mac?
The default macOS shortcut to toggle the integrated terminal is Control + `. On Windows and Linux, the default is Ctrl + `.