🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 22 (from laksa167)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

📄
INDEXABLE
CRAWLED
3 hours ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://code.visualstudio.com/docs/configure/keybindings
Last Crawled2026-04-08 06:15:33 (3 hours ago)
First Indexed2025-03-24 18:04:06 (1 year ago)
HTTP Status Code200
Meta TitleKeyboard shortcuts for Visual Studio Code
Meta DescriptionHere you will find the complete list of keyboard shortcuts for Visual Studio Code and how to change them.
Meta Canonicalnull
Boilerpipe Text
Visual Studio Code lets you perform most tasks directly from the keyboard. This article explains how you can modify the default keyboard shortcuts that come with VS Code. Note If you visit this page on a Mac, you will see the keyboard shortcuts for the Mac. If you visit using Windows or Linux, you will see the keys for that platform. If you need the keyboard shortcuts for another platform, hover your mouse over the key you are interested in. Keyboard Shortcuts editor VS Code provides a rich keyboard shortcut editing experience with the Keyboard Shortcuts editor. The editor lists all available commands with and without keyboard shortcuts, and enables you to change, remove, or reset their keyboard shortcuts using the available actions. To find commands or keyboard shortcuts, use the search box and enter a command or shortcut to filter the list. To open the Keyboard Shortcuts editor, select the File > Preferences > Keyboard Shortcuts menu, or use the Preferences: Open Keyboard Shortcuts command ( ⌘K ⌘S (Windows, Linux Ctrl+K Ctrl+S ) ) in the Command Palette. The Keyboard Shortcuts editor opens by default in a modal overlay on top of the editor area. Note The keyboard shortcuts match your current keyboard layout. For example, keyboard shortcut Cmd+\ in US keyboard layout will be shown as Ctrl+Shift+Alt+Cmd+7 when the layout is changed to German. The dialog to change a keyboard shortcut assigns the correct and desired keyboard shortcut according to your keyboard layout. Customize shortcuts for UI actions To customize a keyboard shortcut for a UI action, right-click on any action item in your workbench, and select Configure Keybinding . This opens the Keyboard Shortcuts editor, filtered to the corresponding command. If the action has a when clause, it's automatically included, making it easier to set up your keyboard shortcuts just the way you need them. Keymap extensions Keymap extensions modify the VS Code shortcuts to match those of other editors, so you don't need to learn new keyboard shortcuts. Select the File > Preferences > Migrate Keyboard Shortcuts from... menu to get a list of popular keymap extensions. There is also a Keymaps category of extensions in the Marketplace. Keyboard Shortcuts reference We have a printable version of the default keyboard shortcuts. Select Help > Keyboard Shortcut Reference to display a condensed PDF version suitable for printing as an easy reference. The following links provide access to the three platform-specific versions (US English keyboard): Windows macOS Linux Detecting keyboard shortcut conflicts If you have many extensions installed or you have modified your keyboard shortcuts, there might be keyboard shortcut conflicts, where the same keyboard shortcut is mapped to multiple commands. This can result in confusing behavior, especially if different keyboard shortcuts are going in and out of scope as you move around the editor. Right-click on an item in the list of keyboard shortcuts, and select Show Same Keybindings to view all entries with the same keyboard shortcut. Troubleshooting keyboard shortcuts To troubleshoot keyboard shortcut problems, you can execute the command Developer: Toggle Keyboard Shortcuts Troubleshooting . This activates logging of dispatched keyboard shortcuts and opens the Output panel with the corresponding log file. You can then press your desired keyboard shortcut and check what keyboard shortcut VS Code detects and what command is invoked. For example, when pressing cmd+/ in a code editor on macOS, the logging output would be: [KeybindingService]: / Received keydown event - modifiers: [meta], code: MetaLeft, keyCode: 91, key: Meta [KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta') [KeybindingService]: \ Keyboard event cannot be dispatched. [KeybindingService]: / Received keydown event - modifiers: [meta], code: Slash, keyCode: 191, key: / [KeybindingService]: | Converted keydown event - modifiers: [meta], code: Slash, keyCode: 85 ('/') [KeybindingService]: | Resolving meta+[Slash] [KeybindingService]: \ From 2 keybinding entries, matched editor.action.commentLine, when: editorTextFocus && !editorReadonly, source: built-in. In the example log, the first keydown event is for the MetaLeft key ( cmd ) and cannot be dispatched. The second keydown event is for the Slash key ( / ) and is dispatched as meta+[Slash] . There were two keyboard shortcut entries mapped from meta+[Slash] and the one that matched was for the command editor.action.commentLine , which has the when condition editorTextFocus && !editorReadonly and is a built-in keyboard shortcut entry. Viewing modified keyboard shortcuts To filter the list to only show the shortcuts you have modified, select the Show User Keybindings command in the More Actions ( ... ) menu. This applies the @source:user filter to the Keyboard Shortcuts editor ( Source is 'User'). Advanced customization VS Code keeps track of the keyboard shortcuts you have customized in the keybindings.json file. For advanced customization, you can also directly modify the keybindings.json file. To open the keybindings.json file: Open Keyboard Shortcuts editor, and then select the Open Keyboard Shortcuts (JSON) button on the right of the editor title bar. Alternatively, use the Open Default Keyboard Shortcuts (JSON) command in the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ). Keyboard rules A keyboard shortcut configuration in VS Code is also known as a keyboard rule . Each rule consists of the following attributes: key : describes the pressed key(s), for example ⌘F (Windows, Linux Ctrl+F ) . command : the identifier of the VS Code command to execute, for example workbench.view.explorer to open the Explorer view. when : (optional) clause containing a boolean expression that is evaluated depending on the current context . Chords (two separate keypress actions) are described by separating the two keypresses with a space. For example, Ctrl+K Ctrl+C . When a key is pressed, the following evaluation rules are applied: Rules are evaluated from bottom to top . The first rule that matches both the key and when clause, is accepted. If a rule is found, no more rules are processed. If a rule is found and has a command set, the command is executed. The additional keybindings.json rules are appended at runtime to the bottom of the default rules, thus allowing them to overwrite the default rules. The keybindings.json file is watched by VS Code, so editing it while VS Code is running will update the rules at run-time. The keyboard shortcuts dispatching is done by analyzing a list of rules that are expressed in JSON. Here are some examples: // Keyboard shortcuts that are active when the focus is in the editor { "key" : "home" , "command" : "cursorHome" , "when" : "editorTextFocus" }, { "key" : "shift+home" , "command" : "cursorHomeSelect" , "when" : "editorTextFocus" }, // Keyboard shortcuts that are complementary { "key" : "f5" , "command" : "workbench.action.debug.continue" , "when" : "inDebugMode" }, { "key" : "f5" , "command" : "workbench.action.debug.start" , "when" : "!inDebugMode" }, // Global keyboard shortcuts { "key" : "ctrl+f" , "command" : "actions.find" }, { "key" : "alt+left" , "command" : "workbench.action.navigateBack" }, { "key" : "alt+right" , "command" : "workbench.action.navigateForward" }, // Global keyboard shortcuts using chords (two separate keypress actions) { "key" : "ctrl+k enter" , "command" : "workbench.action.keepEditor" }, { "key" : "ctrl+k ctrl+w" , "command" : "workbench.action.closeAllEditors" }, Accepted keys The key is made up of modifiers and the key itself. The following modifiers are accepted: Platform Modifiers macOS Ctrl+ , Shift+ , Alt+ , Cmd+ Windows Ctrl+ , Shift+ , Alt+ , Win+ Linux Ctrl+ , Shift+ , Alt+ , Meta+ The following keys are accepted: f1-f19 , a-z , 0-9 ` , - , = , [ , ] , \ , ; , ' , , , . , / left , up , right , down , pageup , pagedown , end , home tab , enter , escape , space , backspace , delete pausebreak , capslock , insert numpad0-numpad9 , numpad_multiply , numpad_add , numpad_separator numpad_subtract , numpad_decimal , numpad_divide Command arguments You can invoke a command with arguments. This is useful if you often perform the same operation on a specific file or folder. You can add a custom keyboard shortcut to do exactly what you want. The following is an example overriding the Enter key to print some text: { "key" : "enter" , "command" : "type" , "args" : { "text" : "Hello World" }, "when" : "editorTextFocus" } The type command will receive {"text": "Hello World"} as its first argument, and add "Hello World" to the file instead of producing the default command. For more information on commands that take arguments, refer to Built-in Commands . Running multiple commands A keyboard shortcut can be configured to run multiple commands sequentially by using the command runCommands . Run several commands without arguments: The following example copies the current line down, marks the current line as a comment, and moves the cursor to the copied line. { "key" : "ctrl+alt+c" , "command" : "runCommands" , "args" : { "commands" : [ "editor.action.copyLinesDownAction" , "cursorUp" , "editor.action.addCommentLine" , "cursorDown" ] } }, To pass arguments to commands: This example creates a new untitled TypeScript file and inserts a custom snippet. { "key" : "ctrl+n" , "command" : "runCommands" , "args" : { "commands" : [ { "command" : "workbench.action.files.newUntitledFile" , "args" : { "languageId" : "typescript" } }, { "command" : "editor.action.insertSnippet" , "args" : { "langId" : "typescript" , "snippet" : "class ${1:ClassName} { \n\t constructor() { \n\t\t $0 \n\t } \n }" } } ] } }, Note that commands run by runCommands receive the value of "args" as the first argument. In the previous example, workbench.action.files.newUntitledFile receives {"languageId": "typescript" } as its first and only argument. To pass several arguments, you need to have "args" as an array: { "key" : "ctrl+shift+e" , "command" : "runCommands" , "args" : { "commands" : [ { // command invoked with 2 arguments: vscode.executeCommand("myCommand", "arg1", "arg2") "command" : "myCommand" , "args" : [ "arg1" , "arg2" ] } ] } } To pass an array as the first argument, wrap the array in another array: "args": [ [1, 2, 3] ] . Removing a keyboard shortcut To remove a keyboard shortcut, right-click on the entry in the Keyboard Shortcuts editor, and select Remove Keybinding . To remove a keyboard shortcut by using the keybindings.json file, add a - to the command and the rule will be a removal rule. Here is an example: // In Default Keyboard Shortcuts ... { "key" : "tab" , "command" : "tab" , "when" : ... }, { "key" : "tab" , "command" : "jumpToNextSnippetPlaceholder" , "when" : ... }, { "key" : "tab" , "command" : "acceptSelectedSuggestion" , "when" : ... }, ... // To remove the second rule, for example, add in keybindings.json: { "key" : "tab" , "command" : "-jumpToNextSnippetPlaceholder" } To override a specific keyboard shortcut rule with an empty action, you can specify an empty command: // To override and disable any `tab` keyboard shortcut, for example, add in keybindings.json: { "key" : "tab" , "command" : "" } Keyboard layouts Note This section relates only to keyboard shortcuts, not to typing in the editor. Keys are string representations for virtual keys and do not necessarily relate to the produced character when they are pressed. More precisely: Reference: Virtual-Key Codes (Windows) tab for VK_TAB ( 0x09 ) ; for VK_OEM_1 ( 0xBA ) = for VK_OEM_PLUS ( 0xBB ) , for VK_OEM_COMMA ( 0xBC ) - for VK_OEM_MINUS ( 0xBD ) . for VK_OEM_PERIOD ( 0xBE ) / for VK_OEM_2 ( 0xBF ) ` for VK_OEM_3 ( 0xC0 ) [ for VK_OEM_4 ( 0xDB ) \ for VK_OEM_5 ( 0xDC ) ] for VK_OEM_6 ( 0xDD ) ' for VK_OEM_7 ( 0xDE ) etc. Different keyboard layouts usually reposition these virtual keys or change the characters produced when they are pressed. When using a different keyboard layout than the standard US, Visual Studio Code does the following: All the keyboard shortcuts are rendered in the UI using the current system's keyboard layout. For example, Split Editor when using a French (France) keyboard layout is now rendered as Ctrl+* : When editing keybindings.json , VS Code highlights misleading keyboard shortcuts, those that are represented in the file with the character produced under the standard US keyboard layout, but that need pressing keys with different labels under the current system's keyboard layout. For example, here is how the default keyboard shortcut rules look like when using a French (France) keyboard layout: There is also a UI control that helps input the keyboard shortcut rule when editing keybindings.json . To launch the Define Keybinding control, press ⌘K ⌘K (Windows, Linux Ctrl+K Ctrl+K ) . The control listens for key presses and renders the serialized JSON representation in the text box and below it, the keys that VS Code has detected under your current keyboard layout. Once you've typed the key combination you want, you can press Enter and a rule snippet is inserted. Note On Linux, VS Code detects your current keyboard layout on startup, and then caches this information. We recommend that you restart VS Code when you change your keyboard layout. Keyboard layout-independent bindings Using scan codes, it is possible to define keyboard shortcuts that do not change with the change of the keyboard layout. For example: { "key" : "cmd+[Slash]" , "command" : "editor.action.commentLine" , "when" : "editorTextFocus" } Accepted scan codes: [F1]-[F19] , [KeyA]-[KeyZ] , [Digit0]-[Digit9] [Backquote] , [Minus] , [Equal] , [BracketLeft] , [BracketRight] , [Backslash] , [Semicolon] , [Quote] , [Comma] , [Period] , [Slash] [ArrowLeft] , [ArrowUp] , [ArrowRight] , [ArrowDown] , [PageUp] , [PageDown] , [End] , [Home] [Tab] , [Enter] , [Escape] , [Space] , [Backspace] , [Delete] [Pause] , [CapsLock] , [Insert] [Numpad0]-[Numpad9] , [NumpadMultiply] , [NumpadAdd] , [NumpadComma] [NumpadSubtract] , [NumpadDecimal] , [NumpadDivide] when clause contexts VS Code gives you precise control over when your keyboard shortcuts are enabled through the optional when clause. If your keyboard shortcut doesn't have a when clause, the keyboard shortcut is globally available at all times. A when clause evaluates to either true or false for enabling keyboard shortcuts. VS Code sets various context keys and specific values depending on what elements are visible and active in the VS Code UI. For example, the built-in Start Debugging command has the keyboard shortcut F5 , which is only enabled when there is an appropriate debugger available (context debuggersAvailable is true) and the editor isn't in debug mode (context inDebugMode is false): You can also view a keyboard shortcut's when clause directly in the default keybinding.json ( Preferences: Open Default Keyboard Shortcuts (JSON) ): { "key" : "f5" , "command" : "workbench.action.debug.start" , "when" : "debuggersAvailable && !inDebugMode" }, Conditional operators For when clause conditional expressions, the following conditional operators are useful for keyboard shortcuts: Operator Symbol Example Equality == "editorLangId == typescript" Inequality != "resourceExtname != .js" Or || "isLinux || isWindows" And && "textInputFocus && !editorReadonly" Matches =~ "resourceScheme =~ /^untitled$|^file$/" You can find the full list of when clause conditional operators in the when clause contexts reference. Available contexts You can find some of the available when clause contexts in the when clause context reference . The list there isn't exhaustive and you can find other when clause contexts by searching and filtering in the Keyboard Shortcuts editor ( Preferences: Open Keyboard Shortcuts ) or reviewing the default keybindings.json file ( Preferences: Open Default Keyboard Shortcuts (JSON) ). Custom keyboard shortcuts for refactorings The editor.action.codeAction command lets you configure keyboard shortcuts for specific Refactorings (Code Actions). For example, the keyboard shortcut below triggers the Extract function refactoring Code Action: { "key" : "ctrl+shift+r ctrl+e" , "command" : "editor.action.codeAction" , "args" : { "kind" : "refactor.extract.function" } } This is covered in depth in the Refactoring article, where you can learn about different kinds of Code Actions and how to prioritize them in the case of multiple possible refactorings. VS Code default keyboard shortcuts reference Common questions How can I find out what command is bound to a specific key? In the Keyboard Shortcuts editor, you can filter on specific keystrokes to see which commands are bound to which keys. In the following screenshot, you can see that Ctrl+Shift+P is bound to Show All Commands to bring up the Command Palette. How to add a keyboard shortcut to an action, for example, add Ctrl+D to Delete Lines Find a rule that triggers the action in the Default Keyboard Shortcuts and write a modified version of it in your keybindings.json file: // Original, in Default Keyboard Shortcuts { "key" : "ctrl+shift+k" , "command" : "editor.action.deleteLines" , "when" : "editorTextFocus" }, // Modified, in User/keybindings.json, Ctrl+D now will also trigger this action { "key" : "ctrl+d" , "command" : "editor.action.deleteLines" , "when" : "editorTextFocus" }, How can I add a keyboard shortcut for only certain file types? Use the editorLangId context key in your when clause: { "key" : "shift+alt+a" , "command" : "editor.action.blockComment" , "when" : "editorTextFocus && editorLangId == csharp" }, I have modified my keyboard shortcuts in keybindings.json; why don't they work? The most common problem is a syntax error in the file. Otherwise, try removing the when clause or picking a different key . Unfortunately, at this point, it is a trial and error process. 02/04/2026
Markdown
[Visual Studio Code](https://code.visualstudio.com/) - [Docs](https://code.visualstudio.com/docs) - [Updates](https://code.visualstudio.com/updates) - [Blog](https://code.visualstudio.com/blogs) - [API](https://code.visualstudio.com/api) - [Extensions](https://marketplace.visualstudio.com/VSCode) - [MCP](https://code.visualstudio.com/mcp) - [FAQ](https://code.visualstudio.com/docs/supporting/faq) - [Learn](https://code.visualstudio.com/learn) - [Events](https://aka.ms/vscode/live) - [Download](https://code.visualstudio.com/Download) ![](https://code.visualstudio.com/assets/icons/search-dark.svg) ![](https://code.visualstudio.com/assets/icons/search.svg) Search Ctrl+Shift+P ![Switch to the dark theme](https://code.visualstudio.com/assets/icons/theme-light.svg) ![Switch to the light theme](https://code.visualstudio.com/assets/icons/theme-dark.svg) [Download](https://code.visualstudio.com/Download) Explore Agentic Development - [Join a GitHub Copilot Dev Day near you\!](https://aka.ms/githubcopilotdevdays) Dismiss this update #### Documentation - [Overview](https://code.visualstudio.com/docs) - [Setup](https://code.visualstudio.com/docs/configure/keybindings#setup-articles) - [Overview](https://code.visualstudio.com/docs/setup/setup-overview) - [Linux](https://code.visualstudio.com/docs/setup/linux) - [macOS](https://code.visualstudio.com/docs/setup/mac) - [Windows](https://code.visualstudio.com/docs/setup/windows) - [VS Code for the Web](https://code.visualstudio.com/docs/setup/vscode-web) - [Raspberry Pi](https://code.visualstudio.com/docs/setup/raspberry-pi) - [Network](https://code.visualstudio.com/docs/setup/network) - [Additional Components](https://code.visualstudio.com/docs/setup/additional-components) - [Uninstall](https://code.visualstudio.com/docs/setup/uninstall) - [Get Started](https://code.visualstudio.com/docs/configure/keybindings#getstarted-articles) - [VS Code Tutorial](https://code.visualstudio.com/docs/getstarted/getting-started) - [Copilot Quickstart](https://code.visualstudio.com/docs/getstarted/copilot-quickstart) - [User Interface](https://code.visualstudio.com/docs/getstarted/userinterface) - [Personalize VS Code](https://code.visualstudio.com/docs/getstarted/personalize-vscode) - [Install Extensions](https://code.visualstudio.com/docs/getstarted/extensions) - [Tips and Tricks](https://code.visualstudio.com/docs/getstarted/tips-and-tricks) - [Intro Videos](https://code.visualstudio.com/docs/getstarted/introvideos) - [GitHub Copilot](https://code.visualstudio.com/docs/configure/keybindings#copilot-articles) - [Overview](https://code.visualstudio.com/docs/copilot/overview) - [Setup](https://code.visualstudio.com/docs/copilot/setup) - [Quickstart](https://code.visualstudio.com/docs/copilot/getting-started) - [Concepts](https://code.visualstudio.com/docs/configure/keybindings#copilot-concepts-articles) - [Overview](https://code.visualstudio.com/docs/copilot/concepts/overview) - [Language Models](https://code.visualstudio.com/docs/copilot/concepts/language-models) - [Context](https://code.visualstudio.com/docs/copilot/concepts/context) - [Tools](https://code.visualstudio.com/docs/copilot/concepts/tools) - [Agents](https://code.visualstudio.com/docs/copilot/concepts/agents) - [Customization](https://code.visualstudio.com/docs/copilot/concepts/customization) - [Trust & Safety](https://code.visualstudio.com/docs/copilot/concepts/trust-and-safety) - [Agents](https://code.visualstudio.com/docs/configure/keybindings#copilot-agents-articles) - [Overview](https://code.visualstudio.com/docs/copilot/agents/overview) - [Agents Tutorial](https://code.visualstudio.com/docs/copilot/agents/agents-tutorial) - [Planning](https://code.visualstudio.com/docs/copilot/agents/planning) - [Memory](https://code.visualstudio.com/docs/copilot/agents/memory) - [Tools](https://code.visualstudio.com/docs/copilot/agents/agent-tools) - [Subagents](https://code.visualstudio.com/docs/copilot/agents/subagents) - [Local Agents](https://code.visualstudio.com/docs/copilot/agents/local-agents) - [Copilot CLI](https://code.visualstudio.com/docs/copilot/agents/copilot-cli) - [Cloud Agents](https://code.visualstudio.com/docs/copilot/agents/cloud-agents) - [Third-Party Agents](https://code.visualstudio.com/docs/copilot/agents/third-party-agents) - [Chat](https://code.visualstudio.com/docs/configure/keybindings#copilot-chat-articles) - [Overview](https://code.visualstudio.com/docs/copilot/chat/copilot-chat) - [Chat Sessions](https://code.visualstudio.com/docs/copilot/chat/chat-sessions) - [Add Context](https://code.visualstudio.com/docs/copilot/chat/copilot-chat-context) - [Inline Chat](https://code.visualstudio.com/docs/copilot/chat/inline-chat) - [Review Edits](https://code.visualstudio.com/docs/copilot/chat/review-code-edits) - [Checkpoints](https://code.visualstudio.com/docs/copilot/chat/chat-checkpoints) - [Debug Chat Interactions](https://code.visualstudio.com/docs/copilot/chat/chat-debug-view) - [Prompt Examples](https://code.visualstudio.com/docs/copilot/chat/prompt-examples) - [Customization](https://code.visualstudio.com/docs/configure/keybindings#copilot-customization-articles) - [Overview](https://code.visualstudio.com/docs/copilot/customization/overview) - [Instructions](https://code.visualstudio.com/docs/copilot/customization/custom-instructions) - [Prompt Files](https://code.visualstudio.com/docs/copilot/customization/prompt-files) - [Custom Agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents) - [Agent Skills](https://code.visualstudio.com/docs/copilot/customization/agent-skills) - [Language Models](https://code.visualstudio.com/docs/copilot/customization/language-models) - [MCP](https://code.visualstudio.com/docs/copilot/customization/mcp-servers) - [Hooks](https://code.visualstudio.com/docs/copilot/customization/hooks) - [Plugins](https://code.visualstudio.com/docs/copilot/customization/agent-plugins) - [Guides & Tutorials](https://code.visualstudio.com/docs/configure/keybindings#copilot-guides-articles) - [Context Engineering](https://code.visualstudio.com/docs/copilot/guides/context-engineering-guide) - [Customize AI](https://code.visualstudio.com/docs/copilot/guides/customize-copilot-guide) - [Test-Driven Development](https://code.visualstudio.com/docs/copilot/guides/test-driven-development-guide) - [Edit Notebooks with AI](https://code.visualstudio.com/docs/copilot/guides/notebooks-with-ai) - [Test with AI](https://code.visualstudio.com/docs/copilot/guides/test-with-copilot) - [Test Web Apps with Browser Tools](https://code.visualstudio.com/docs/copilot/guides/browser-agent-testing-guide) - [Debug with AI](https://code.visualstudio.com/docs/copilot/guides/debug-with-copilot) - [MCP Dev Guide](https://code.visualstudio.com/docs/copilot/guides/mcp-developer-guide) - [Monitoring](https://code.visualstudio.com/docs/copilot/guides/monitoring-agents) - [Inline Suggestions](https://code.visualstudio.com/docs/copilot/ai-powered-suggestions) - [Smart Actions](https://code.visualstudio.com/docs/copilot/copilot-smart-actions) - [Best Practices](https://code.visualstudio.com/docs/copilot/best-practices) - [Security](https://code.visualstudio.com/docs/copilot/security) - [Troubleshooting](https://code.visualstudio.com/docs/copilot/troubleshooting) - [FAQ](https://code.visualstudio.com/docs/copilot/faq) - [Reference](https://code.visualstudio.com/docs/configure/keybindings#copilot-reference-articles) - [Cheat Sheet](https://code.visualstudio.com/docs/copilot/reference/copilot-vscode-features) - [Settings Reference](https://code.visualstudio.com/docs/copilot/reference/copilot-settings) - [MCP Configuration](https://code.visualstudio.com/docs/copilot/reference/mcp-configuration) - [Workspace Context](https://code.visualstudio.com/docs/copilot/reference/workspace-context) - [Configure](https://code.visualstudio.com/docs/configure/keybindings#configure-articles) - [Display Language](https://code.visualstudio.com/docs/configure/locales) - [Layout](https://code.visualstudio.com/docs/configure/custom-layout) - [Keyboard Shortcuts](https://code.visualstudio.com/docs/configure/keybindings) - [Settings](https://code.visualstudio.com/docs/configure/settings) - [Settings Sync](https://code.visualstudio.com/docs/configure/settings-sync) - [Extensions](https://code.visualstudio.com/docs/configure/keybindings#configure-extensions-articles) - [Extension Marketplace](https://code.visualstudio.com/docs/configure/extensions/extension-marketplace) - [Extension Runtime Security](https://code.visualstudio.com/docs/configure/extensions/extension-runtime-security) - [Themes](https://code.visualstudio.com/docs/configure/themes) - [Profiles](https://code.visualstudio.com/docs/configure/profiles) - [Accessibility](https://code.visualstudio.com/docs/configure/keybindings#configure-accessibility-articles) - [Overview](https://code.visualstudio.com/docs/configure/accessibility/accessibility) - [Voice Interactions](https://code.visualstudio.com/docs/configure/accessibility/voice) - [Command Line Interface](https://code.visualstudio.com/docs/configure/command-line) - [Telemetry](https://code.visualstudio.com/docs/configure/telemetry) - [Edit Code](https://code.visualstudio.com/docs/configure/keybindings#editing-articles) - [Basic Editing](https://code.visualstudio.com/docs/editing/codebasics) - [IntelliSense](https://code.visualstudio.com/docs/editing/intellisense) - [Code Navigation](https://code.visualstudio.com/docs/editing/editingevolved) - [Refactoring](https://code.visualstudio.com/docs/editing/refactoring) - [Snippets](https://code.visualstudio.com/docs/editing/userdefinedsnippets) - [Workspaces](https://code.visualstudio.com/docs/configure/keybindings#editing-workspaces-articles) - [Overview](https://code.visualstudio.com/docs/editing/workspaces/workspaces) - [Multi-Root Workspaces](https://code.visualstudio.com/docs/editing/workspaces/multi-root-workspaces) - [Workspace Trust](https://code.visualstudio.com/docs/editing/workspaces/workspace-trust) - [Build, Debug, Test](https://code.visualstudio.com/docs/configure/keybindings#debugtest-articles) - [Tasks](https://code.visualstudio.com/docs/debugtest/tasks) - [Debugging](https://code.visualstudio.com/docs/debugtest/debugging) - [Debug Configuration](https://code.visualstudio.com/docs/debugtest/debugging-configuration) - [Testing](https://code.visualstudio.com/docs/debugtest/testing) - [Port Forwarding](https://code.visualstudio.com/docs/debugtest/port-forwarding) - [Integrated Browser](https://code.visualstudio.com/docs/debugtest/integrated-browser) - [Source Control](https://code.visualstudio.com/docs/configure/keybindings#sourcecontrol-articles) - [Overview](https://code.visualstudio.com/docs/sourcecontrol/overview) - [Quickstart](https://code.visualstudio.com/docs/sourcecontrol/quickstart) - [Staging & Committing](https://code.visualstudio.com/docs/sourcecontrol/staging-commits) - [Branches & Worktrees](https://code.visualstudio.com/docs/sourcecontrol/branches-worktrees) - [Repositories & Remotes](https://code.visualstudio.com/docs/sourcecontrol/repos-remotes) - [Merge Conflicts](https://code.visualstudio.com/docs/sourcecontrol/merge-conflicts) - [Collaborate on GitHub](https://code.visualstudio.com/docs/sourcecontrol/github) - [Troubleshooting](https://code.visualstudio.com/docs/sourcecontrol/troubleshooting) - [FAQ](https://code.visualstudio.com/docs/sourcecontrol/faq) - [Terminal](https://code.visualstudio.com/docs/configure/keybindings#terminal-articles) - [Getting Started Tutorial](https://code.visualstudio.com/docs/terminal/getting-started) - [Terminal Basics](https://code.visualstudio.com/docs/terminal/basics) - [Terminal Profiles](https://code.visualstudio.com/docs/terminal/profiles) - [Shell Integration](https://code.visualstudio.com/docs/terminal/shell-integration) - [Appearance](https://code.visualstudio.com/docs/terminal/appearance) - [Advanced](https://code.visualstudio.com/docs/terminal/advanced) - [Enterprise](https://code.visualstudio.com/docs/configure/keybindings#enterprise-articles) - [Overview](https://code.visualstudio.com/docs/enterprise/overview) - [Enterprise Policies](https://code.visualstudio.com/docs/enterprise/policies) - [AI Settings](https://code.visualstudio.com/docs/enterprise/ai-settings) - [Extensions](https://code.visualstudio.com/docs/enterprise/extensions) - [Telemetry](https://code.visualstudio.com/docs/enterprise/telemetry) - [Updates](https://code.visualstudio.com/docs/enterprise/updates) - [Languages](https://code.visualstudio.com/docs/configure/keybindings#languages-articles) - [Overview](https://code.visualstudio.com/docs/languages/overview) - [JavaScript](https://code.visualstudio.com/docs/languages/javascript) - [JSON](https://code.visualstudio.com/docs/languages/json) - [HTML](https://code.visualstudio.com/docs/languages/html) - [Emmet](https://code.visualstudio.com/docs/languages/emmet) - [CSS, SCSS and Less](https://code.visualstudio.com/docs/languages/css) - [TypeScript](https://code.visualstudio.com/docs/languages/typescript) - [Markdown](https://code.visualstudio.com/docs/languages/markdown) - [PowerShell](https://code.visualstudio.com/docs/languages/powershell) - [C++](https://code.visualstudio.com/docs/languages/cpp) - [Java](https://code.visualstudio.com/docs/languages/java) - [PHP](https://code.visualstudio.com/docs/languages/php) - [Python](https://code.visualstudio.com/docs/languages/python) - [Julia](https://code.visualstudio.com/docs/languages/julia) - [R](https://code.visualstudio.com/docs/languages/r) - [Ruby](https://code.visualstudio.com/docs/languages/ruby) - [Rust](https://code.visualstudio.com/docs/languages/rust) - [Go](https://code.visualstudio.com/docs/languages/go) - [T-SQL](https://code.visualstudio.com/docs/languages/tsql) - [C\#](https://code.visualstudio.com/docs/languages/csharp) - [.NET](https://code.visualstudio.com/docs/languages/dotnet) - [Swift](https://code.visualstudio.com/docs/languages/swift) - [Node.js / JavaScript](https://code.visualstudio.com/docs/configure/keybindings#nodejs-articles) - [Working with JavaScript](https://code.visualstudio.com/docs/nodejs/working-with-javascript) - [Node.js Tutorial](https://code.visualstudio.com/docs/nodejs/nodejs-tutorial) - [Node.js Debugging](https://code.visualstudio.com/docs/nodejs/nodejs-debugging) - [Deploy Node.js Apps](https://code.visualstudio.com/docs/nodejs/nodejs-deployment) - [Browser Debugging](https://code.visualstudio.com/docs/nodejs/browser-debugging) - [Angular Tutorial](https://code.visualstudio.com/docs/nodejs/angular-tutorial) - [React Tutorial](https://code.visualstudio.com/docs/nodejs/reactjs-tutorial) - [Vue Tutorial](https://code.visualstudio.com/docs/nodejs/vuejs-tutorial) - [Debugging Recipes](https://code.visualstudio.com/docs/nodejs/debugging-recipes) - [Performance Profiling](https://code.visualstudio.com/docs/nodejs/profiling) - [Extensions](https://code.visualstudio.com/docs/nodejs/extensions) - [TypeScript](https://code.visualstudio.com/docs/configure/keybindings#typescript-articles) - [Tutorial](https://code.visualstudio.com/docs/typescript/typescript-tutorial) - [Transpiling](https://code.visualstudio.com/docs/typescript/typescript-transpiling) - [Editing](https://code.visualstudio.com/docs/typescript/typescript-editing) - [Refactoring](https://code.visualstudio.com/docs/typescript/typescript-refactoring) - [Debugging](https://code.visualstudio.com/docs/typescript/typescript-debugging) - [Python](https://code.visualstudio.com/docs/configure/keybindings#python-articles) - [Quick Start](https://code.visualstudio.com/docs/python/python-quick-start) - [Tutorial](https://code.visualstudio.com/docs/python/python-tutorial) - [Run Python Code](https://code.visualstudio.com/docs/python/run) - [Editing](https://code.visualstudio.com/docs/python/editing) - [Linting](https://code.visualstudio.com/docs/python/linting) - [Formatting](https://code.visualstudio.com/docs/python/formatting) - [Debugging](https://code.visualstudio.com/docs/python/debugging) - [Environments](https://code.visualstudio.com/docs/python/environments) - [Testing](https://code.visualstudio.com/docs/python/testing) - [Python Interactive](https://code.visualstudio.com/docs/python/jupyter-support-py) - [Django Tutorial](https://code.visualstudio.com/docs/python/tutorial-django) - [FastAPI Tutorial](https://code.visualstudio.com/docs/python/tutorial-fastapi) - [Flask Tutorial](https://code.visualstudio.com/docs/python/tutorial-flask) - [Create Containers](https://code.visualstudio.com/docs/python/tutorial-create-containers) - [Deploy Python Apps](https://code.visualstudio.com/docs/python/python-on-azure) - [Python in the Web](https://code.visualstudio.com/docs/python/python-web) - [Settings Reference](https://code.visualstudio.com/docs/python/settings-reference) - [Java](https://code.visualstudio.com/docs/configure/keybindings#java-articles) - [Getting Started](https://code.visualstudio.com/docs/java/java-tutorial) - [Navigate and Edit](https://code.visualstudio.com/docs/java/java-editing) - [Refactoring](https://code.visualstudio.com/docs/java/java-refactoring) - [Formatting and Linting](https://code.visualstudio.com/docs/java/java-linting) - [Project Management](https://code.visualstudio.com/docs/java/java-project) - [Build Tools](https://code.visualstudio.com/docs/java/java-build) - [Run and Debug](https://code.visualstudio.com/docs/java/java-debugging) - [Testing](https://code.visualstudio.com/docs/java/java-testing) - [Spring Boot](https://code.visualstudio.com/docs/java/java-spring-boot) - [Modernizing Java Apps](https://code.visualstudio.com/docs/java/java-app-mod) - [Application Servers](https://code.visualstudio.com/docs/java/java-tomcat-jetty) - [Deploy Java Apps](https://code.visualstudio.com/docs/java/java-on-azure) - [GUI Applications](https://code.visualstudio.com/docs/java/java-gui) - [Extensions](https://code.visualstudio.com/docs/java/extensions) - [FAQ](https://code.visualstudio.com/docs/java/java-faq) - [C++](https://code.visualstudio.com/docs/configure/keybindings#cpp-articles) - [Intro Videos](https://code.visualstudio.com/docs/cpp/introvideos-cpp) - [GCC on Linux](https://code.visualstudio.com/docs/cpp/config-linux) - [GCC on Windows](https://code.visualstudio.com/docs/cpp/config-mingw) - [GCC on Windows Subsystem for Linux](https://code.visualstudio.com/docs/cpp/config-wsl) - [Clang on macOS](https://code.visualstudio.com/docs/cpp/config-clang-mac) - [Microsoft C++ on Windows](https://code.visualstudio.com/docs/cpp/config-msvc) - [Build with CMake](https://code.visualstudio.com/docs/cpp/build-with-cmake) - [CMake Tools on Linux](https://code.visualstudio.com/docs/cpp/cmake-linux) - [CMake Quick Start](https://code.visualstudio.com/docs/cpp/cmake-quickstart) - [C++ Dev Tools for Copilot](https://code.visualstudio.com/docs/cpp/cpp-devtools) - [Editing and Navigating](https://code.visualstudio.com/docs/cpp/cpp-ide) - [Debugging](https://code.visualstudio.com/docs/cpp/cpp-debug) - [Configure Debugging](https://code.visualstudio.com/docs/cpp/launch-json-reference) - [Refactoring](https://code.visualstudio.com/docs/cpp/cpp-refactoring) - [Settings Reference](https://code.visualstudio.com/docs/cpp/customize-cpp-settings) - [Configure IntelliSense](https://code.visualstudio.com/docs/cpp/configure-intellisense) - [Configure IntelliSense for Cross-Compiling](https://code.visualstudio.com/docs/cpp/configure-intellisense-crosscompilation) - [FAQ](https://code.visualstudio.com/docs/cpp/faq-cpp) - [C\#](https://code.visualstudio.com/docs/configure/keybindings#csharp-articles) - [Intro Videos](https://code.visualstudio.com/docs/csharp/introvideos-csharp) - [Get Started](https://code.visualstudio.com/docs/csharp/get-started) - [Navigate and Edit](https://code.visualstudio.com/docs/csharp/navigate-edit) - [IntelliCode](https://code.visualstudio.com/docs/csharp/intellicode) - [Refactoring](https://code.visualstudio.com/docs/csharp/refactoring) - [Formatting and Linting](https://code.visualstudio.com/docs/csharp/formatting-linting) - [Project Management](https://code.visualstudio.com/docs/csharp/project-management) - [Build Tools](https://code.visualstudio.com/docs/csharp/build-tools) - [Package Management](https://code.visualstudio.com/docs/csharp/package-management) - [Run and Debug](https://code.visualstudio.com/docs/csharp/debugging) - [Testing](https://code.visualstudio.com/docs/csharp/testing) - [FAQ](https://code.visualstudio.com/docs/csharp/cs-dev-kit-faq) - [Container Tools](https://code.visualstudio.com/docs/configure/keybindings#containers-articles) - [Overview](https://code.visualstudio.com/docs/containers/overview) - [Node.js](https://code.visualstudio.com/docs/containers/quickstart-node) - [Python](https://code.visualstudio.com/docs/containers/quickstart-python) - [ASP.NET Core](https://code.visualstudio.com/docs/containers/quickstart-aspnet-core) - [Debug](https://code.visualstudio.com/docs/containers/debug-common) - [Docker Compose](https://code.visualstudio.com/docs/containers/docker-compose) - [Registries](https://code.visualstudio.com/docs/containers/quickstart-container-registries) - [Deploy to Azure](https://code.visualstudio.com/docs/containers/app-service) - [Choose a Dev Environment](https://code.visualstudio.com/docs/containers/choosing-dev-environment) - [Customize](https://code.visualstudio.com/docs/containers/reference) - [Develop with Kubernetes](https://code.visualstudio.com/docs/containers/bridge-to-kubernetes) - [Tips and Tricks](https://code.visualstudio.com/docs/containers/troubleshooting) - [Data Science](https://code.visualstudio.com/docs/configure/keybindings#datascience-articles) - [Overview](https://code.visualstudio.com/docs/datascience/overview) - [Jupyter Notebooks](https://code.visualstudio.com/docs/datascience/jupyter-notebooks) - [Data Science Tutorial](https://code.visualstudio.com/docs/datascience/data-science-tutorial) - [Python Interactive](https://code.visualstudio.com/docs/datascience/python-interactive) - [Data Wrangler Quick Start](https://code.visualstudio.com/docs/datascience/data-wrangler-quick-start) - [Data Wrangler](https://code.visualstudio.com/docs/datascience/data-wrangler) - [PyTorch Support](https://code.visualstudio.com/docs/datascience/pytorch-support) - [Azure Machine Learning](https://code.visualstudio.com/docs/datascience/azure-machine-learning) - [Manage Jupyter Kernels](https://code.visualstudio.com/docs/datascience/jupyter-kernel-management) - [Jupyter Notebooks on the Web](https://code.visualstudio.com/docs/datascience/notebooks-web) - [Data Science in Microsoft Fabric](https://code.visualstudio.com/docs/datascience/microsoft-fabric-quickstart) - [Intelligent Apps](https://code.visualstudio.com/docs/configure/keybindings#intelligentapps-articles) - [AI Toolkit Overview](https://code.visualstudio.com/docs/intelligentapps/overview) - [AI Toolkit Copilot Tools](https://code.visualstudio.com/docs/intelligentapps/copilot-tools) - [Models](https://code.visualstudio.com/docs/intelligentapps/models) - [Playground](https://code.visualstudio.com/docs/intelligentapps/playground) - [Agent Builder](https://code.visualstudio.com/docs/intelligentapps/agentbuilder) - [Agent Inspector](https://code.visualstudio.com/docs/intelligentapps/agent-inspector) - [Migrating from Visualizer to Agent Inspector](https://code.visualstudio.com/docs/intelligentapps/migrate-from-visualizer) - [Bulk Run](https://code.visualstudio.com/docs/intelligentapps/bulkrun) - [Evaluation](https://code.visualstudio.com/docs/intelligentapps/evaluation) - [Fine-Tuning (Automated Setup)](https://code.visualstudio.com/docs/intelligentapps/finetune) - [Fine-Tuning (Project Template)](https://code.visualstudio.com/docs/intelligentapps/finetune-legacy) - [Model Conversion](https://code.visualstudio.com/docs/intelligentapps/modelconversion) - [Tracing](https://code.visualstudio.com/docs/intelligentapps/tracing) - [Profiling (Windows ML)](https://code.visualstudio.com/docs/intelligentapps/profiling) - [FAQ](https://code.visualstudio.com/docs/intelligentapps/faq) - [Reference](https://code.visualstudio.com/docs/configure/keybindings#intelligentapps-reference-articles) - [File Structure](https://code.visualstudio.com/docs/intelligentapps/reference/FileStructure) - [Manual Model Conversion](https://code.visualstudio.com/docs/intelligentapps/reference/ManualModelConversion) - [Manual Model Conversion on GPU](https://code.visualstudio.com/docs/intelligentapps/reference/ManualConversionOnGPU) - [Setup Environment Without AI Toolkit](https://code.visualstudio.com/docs/intelligentapps/reference/SetupWithoutAITK) - [Template Project](https://code.visualstudio.com/docs/intelligentapps/reference/TemplateProject) - [Azure](https://code.visualstudio.com/docs/configure/keybindings#azure-articles) - [Overview](https://code.visualstudio.com/docs/azure/overview) - [Getting Started](https://code.visualstudio.com/docs/azure/gettingstarted) - [Resources View](https://code.visualstudio.com/docs/azure/resourcesextension) - [Deployment](https://code.visualstudio.com/docs/azure/deployment) - [VS Code for the Web - Azure](https://code.visualstudio.com/docs/azure/vscodeforweb) - [Containers](https://code.visualstudio.com/docs/azure/containers) - [Azure Kubernetes Service](https://code.visualstudio.com/docs/azure/aksextensions) - [Kubernetes](https://code.visualstudio.com/docs/azure/kubernetes) - [MongoDB](https://code.visualstudio.com/docs/azure/mongodb) - [Remote Debugging for Node.js](https://code.visualstudio.com/docs/azure/remote-debugging) - [Remote](https://code.visualstudio.com/docs/configure/keybindings#remote-articles) - [Overview](https://code.visualstudio.com/docs/remote/remote-overview) - [SSH](https://code.visualstudio.com/docs/remote/ssh) - [Dev Containers](https://code.visualstudio.com/docs/remote/dev-containers) - [Windows Subsystem for Linux](https://code.visualstudio.com/docs/remote/wsl) - [GitHub Codespaces](https://code.visualstudio.com/docs/remote/codespaces) - [VS Code Server](https://code.visualstudio.com/docs/remote/vscode-server) - [Tunnels](https://code.visualstudio.com/docs/remote/tunnels) - [SSH Tutorial](https://code.visualstudio.com/docs/remote/ssh-tutorial) - [WSL Tutorial](https://code.visualstudio.com/docs/remote/wsl-tutorial) - [Tips and Tricks](https://code.visualstudio.com/docs/remote/troubleshooting) - [FAQ](https://code.visualstudio.com/docs/remote/faq) - [Dev Containers](https://code.visualstudio.com/docs/configure/keybindings#devcontainers-articles) - [Overview](https://code.visualstudio.com/docs/devcontainers/containers) - [Tutorial](https://code.visualstudio.com/docs/devcontainers/tutorial) - [Attach to Container](https://code.visualstudio.com/docs/devcontainers/attach-container) - [Create Dev Container](https://code.visualstudio.com/docs/devcontainers/create-dev-container) - [Advanced Containers](https://code.visualstudio.com/docs/devcontainers/containers-advanced) - [devcontainer.json](https://code.visualstudio.com/docs/devcontainers/devcontainerjson-reference) - [Dev Container CLI](https://code.visualstudio.com/docs/devcontainers/devcontainer-cli) - [Tips and Tricks](https://code.visualstudio.com/docs/devcontainers/tips-and-tricks) - [FAQ](https://code.visualstudio.com/docs/devcontainers/faq) - [Reference](https://code.visualstudio.com/docs/configure/keybindings#reference-articles) - [Default Keyboard Shortcuts](https://code.visualstudio.com/docs/reference/default-keybindings) - [Default Settings](https://code.visualstudio.com/docs/reference/default-settings) - [Substitution Variables](https://code.visualstudio.com/docs/reference/variables-reference) - [Tasks Schema](https://code.visualstudio.com/docs/reference/tasks-appendix) Topics Copy as Markdown - Copy as Markdown - View as Markdown #### On this page there are 19 sectionsOn this page - [Keyboard Shortcuts editor](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-shortcuts-editor) - [Customize shortcuts for UI actions](https://code.visualstudio.com/docs/configure/keybindings#_customize-shortcuts-for-ui-actions) - [Keymap extensions](https://code.visualstudio.com/docs/configure/keybindings#_keymap-extensions) - [Keyboard Shortcuts reference](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-shortcuts-reference) - [Detecting keyboard shortcut conflicts](https://code.visualstudio.com/docs/configure/keybindings#_detecting-keyboard-shortcut-conflicts) - [Troubleshooting keyboard shortcuts](https://code.visualstudio.com/docs/configure/keybindings#_troubleshooting-keyboard-shortcuts) - [Viewing modified keyboard shortcuts](https://code.visualstudio.com/docs/configure/keybindings#_viewing-modified-keyboard-shortcuts) - [Advanced customization](https://code.visualstudio.com/docs/configure/keybindings#_advanced-customization) - [Keyboard rules](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-rules) - [Accepted keys](https://code.visualstudio.com/docs/configure/keybindings#_accepted-keys) - [Command arguments](https://code.visualstudio.com/docs/configure/keybindings#_command-arguments) - [Running multiple commands](https://code.visualstudio.com/docs/configure/keybindings#_running-multiple-commands) - [Removing a keyboard shortcut](https://code.visualstudio.com/docs/configure/keybindings#_removing-a-keyboard-shortcut) - [Keyboard layouts](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-layouts) - [Keyboard layout-independent bindings](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-layoutindependent-bindings) - [when clause contexts](https://code.visualstudio.com/docs/configure/keybindings#_when-clause-contexts) - [Custom keyboard shortcuts for refactorings](https://code.visualstudio.com/docs/configure/keybindings#_custom-keyboard-shortcuts-for-refactorings) - [Related resources](https://code.visualstudio.com/docs/configure/keybindings#_related-resources) - [Common questions](https://code.visualstudio.com/docs/configure/keybindings#_common-questions) # Keyboard shortcuts for Visual Studio Code Visual Studio Code lets you perform most tasks directly from the keyboard. This article explains how you can modify the default keyboard shortcuts that come with VS Code. Note If you visit this page on a Mac, you will see the keyboard shortcuts for the Mac. If you visit using Windows or Linux, you will see the keys for that platform. If you need the keyboard shortcuts for another platform, hover your mouse over the key you are interested in. ## [Keyboard Shortcuts editor](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-shortcuts-editor) VS Code provides a rich keyboard shortcut editing experience with the Keyboard Shortcuts editor. The editor lists all available commands with and without keyboard shortcuts, and enables you to change, remove, or reset their keyboard shortcuts using the available actions. To find commands or keyboard shortcuts, use the search box and enter a command or shortcut to filter the list. To open the Keyboard Shortcuts editor, select the **File** \> **Preferences** \> **Keyboard Shortcuts** menu, or use the **Preferences: Open Keyboard Shortcuts** command (⌘K ⌘S (Windows, Linux Ctrl+K Ctrl+S)) in the Command Palette. The Keyboard Shortcuts editor opens by default in a [modal overlay](https://code.visualstudio.com/docs/getstarted/userinterface#_modal-editors) on top of the editor area. ![Keyboard Shortcuts](https://code.visualstudio.com/assets/docs/configure/keybinding/keyboard-shortcuts.gif) Note The keyboard shortcuts match your current keyboard layout. For example, keyboard shortcut Cmd+\\ in US keyboard layout will be shown as Ctrl+Shift+Alt+Cmd+7 when the layout is changed to German. The dialog to change a keyboard shortcut assigns the correct and desired keyboard shortcut according to your keyboard layout. ## [Customize shortcuts for UI actions](https://code.visualstudio.com/docs/configure/keybindings#_customize-shortcuts-for-ui-actions) To customize a keyboard shortcut for a UI action, right-click on any action item in your workbench, and select **Configure Keybinding**. This opens the Keyboard Shortcuts editor, filtered to the corresponding command. If the action has a `when` clause, it's automatically included, making it easier to set up your keyboard shortcuts just the way you need them. ## [Keymap extensions](https://code.visualstudio.com/docs/configure/keybindings#_keymap-extensions) Keymap extensions modify the VS Code shortcuts to match those of other editors, so you don't need to learn new keyboard shortcuts. Select the **File** \> **Preferences** \> **Migrate Keyboard Shortcuts from...** menu to get a list of popular keymap extensions. There is also a [Keymaps category](https://marketplace.visualstudio.com/search?target=VSCode&category=Keymaps&sortBy=Installs) of extensions in the Marketplace. ## [Keyboard Shortcuts reference](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-shortcuts-reference) We have a printable version of the default keyboard shortcuts. Select **Help** \> **Keyboard Shortcut Reference** to display a condensed PDF version suitable for printing as an easy reference. The following links provide access to the three platform-specific versions (US English keyboard): - [Windows](https://go.microsoft.com/fwlink/?linkid=832145) - [macOS](https://go.microsoft.com/fwlink/?linkid=832143) - [Linux](https://go.microsoft.com/fwlink/?linkid=832144) ## [Detecting keyboard shortcut conflicts](https://code.visualstudio.com/docs/configure/keybindings#_detecting-keyboard-shortcut-conflicts) If you have many extensions installed or you have modified your keyboard shortcuts, there might be keyboard shortcut conflicts, where the same keyboard shortcut is mapped to multiple commands. This can result in confusing behavior, especially if different keyboard shortcuts are going in and out of scope as you move around the editor. Right-click on an item in the list of keyboard shortcuts, and select **Show Same Keybindings** to view all entries with the same keyboard shortcut. ![show keyboard shortcut conflicts menu](https://code.visualstudio.com/assets/docs/configure/keybinding/show-conflicts-menu.png) ## [Troubleshooting keyboard shortcuts](https://code.visualstudio.com/docs/configure/keybindings#_troubleshooting-keyboard-shortcuts) To troubleshoot keyboard shortcut problems, you can execute the command **Developer: Toggle Keyboard Shortcuts Troubleshooting**. This activates logging of dispatched keyboard shortcuts and opens the Output panel with the corresponding log file. You can then press your desired keyboard shortcut and check what keyboard shortcut VS Code detects and what command is invoked. For example, when pressing `cmd+/` in a code editor on macOS, the logging output would be: Text ``` [KeybindingService]: / Received keydown event - modifiers: [meta], code: MetaLeft, keyCode: 91, key: Meta [KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta') [KeybindingService]: \ Keyboard event cannot be dispatched. [KeybindingService]: / Received keydown event - modifiers: [meta], code: Slash, keyCode: 191, key: / [KeybindingService]: | Converted keydown event - modifiers: [meta], code: Slash, keyCode: 85 ('/') [KeybindingService]: | Resolving meta+[Slash] [KeybindingService]: \ From 2 keybinding entries, matched editor.action.commentLine, when: editorTextFocus && !editorReadonly, source: built-in. ``` In the example log, the first keydown event is for the `MetaLeft` key (`cmd`) and cannot be dispatched. The second keydown event is for the `Slash` key (`/`) and is dispatched as `meta+[Slash]`. There were two keyboard shortcut entries mapped from `meta+[Slash]` and the one that matched was for the command `editor.action.commentLine`, which has the `when` condition `editorTextFocus && !editorReadonly` and is a built-in keyboard shortcut entry. ## [Viewing modified keyboard shortcuts](https://code.visualstudio.com/docs/configure/keybindings#_viewing-modified-keyboard-shortcuts) To filter the list to only show the shortcuts you have modified, select the **Show User Keybindings** command in the **More Actions** (**...**) menu. This applies the `@source:user` filter to the **Keyboard Shortcuts** editor (**Source** is 'User'). ![Default Keyboard Shortcuts](https://code.visualstudio.com/assets/docs/configure/keybinding/user-keyboard-shortcuts.png) ## [Advanced customization](https://code.visualstudio.com/docs/configure/keybindings#_advanced-customization) VS Code keeps track of the keyboard shortcuts you have customized in the `keybindings.json` file. For advanced customization, you can also directly modify the `keybindings.json` file. To open the `keybindings.json` file: - Open **Keyboard Shortcuts** editor, and then select the **Open Keyboard Shortcuts (JSON)** button on the right of the editor title bar. ![Open Keyboard Shortcuts JSON button](https://code.visualstudio.com/assets/docs/configure/keybinding/open-keyboard-shortcuts-json.png) - Alternatively, use the **Open Default Keyboard Shortcuts (JSON)** command in the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)). ## [Keyboard rules](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-rules) A keyboard shortcut configuration in VS Code is also known as a *keyboard rule*. Each rule consists of the following attributes: - `key`: describes the pressed key(s), for example ⌘F (Windows, Linux Ctrl+F). - `command`: the identifier of the VS Code command to execute, for example `workbench.view.explorer` to open the Explorer view. - `when`: (optional) clause containing a boolean expression that is evaluated depending on the current [context](https://code.visualstudio.com/docs/configure/keybindings#_when-clause-contexts). Chords (two separate keypress actions) are described by separating the two keypresses with a space. For example, Ctrl+K Ctrl+C. When a key is pressed, the following evaluation rules are applied: - Rules are evaluated from **bottom** to **top**. - The first rule that matches both the `key` and `when` clause, is accepted. - If a rule is found, no more rules are processed. - If a rule is found and has a `command` set, the `command` is executed. The additional `keybindings.json` rules are appended at runtime to the bottom of the default rules, thus allowing them to overwrite the default rules. The `keybindings.json` file is watched by VS Code, so editing it while VS Code is running will update the rules at run-time. The keyboard shortcuts dispatching is done by analyzing a list of rules that are expressed in JSON. Here are some examples: JSON ``` // Keyboard shortcuts that are active when the focus is in the editor { "key": "home", "command": "cursorHome", "when": "editorTextFocus" }, { "key": "shift+home", "command": "cursorHomeSelect", "when": "editorTextFocus" }, // Keyboard shortcuts that are complementary { "key": "f5", "command": "workbench.action.debug.continue", "when": "inDebugMode" }, { "key": "f5", "command": "workbench.action.debug.start", "when": "!inDebugMode" }, // Global keyboard shortcuts { "key": "ctrl+f", "command": "actions.find" }, { "key": "alt+left", "command": "workbench.action.navigateBack" }, { "key": "alt+right", "command": "workbench.action.navigateForward" }, // Global keyboard shortcuts using chords (two separate keypress actions) { "key": "ctrl+k enter", "command": "workbench.action.keepEditor" }, { "key": "ctrl+k ctrl+w", "command": "workbench.action.closeAllEditors" }, ``` ## [Accepted keys](https://code.visualstudio.com/docs/configure/keybindings#_accepted-keys) The `key` is made up of modifiers and the key itself. The following modifiers are accepted: Expand table | Platform | Modifiers | |---|---| | macOS | Ctrl+, Shift+, Alt+, Cmd+ | | Windows | Ctrl+, Shift+, Alt+, Win+ | | Linux | Ctrl+, Shift+, Alt+, Meta+ | The following keys are accepted: - f1-f19, a-z, 0-9 - \`, \-, \=, \[, \], \\, ;, ', ,, ., / - left, up, right, down, pageup, pagedown, end, home - tab, enter, escape, space, backspace, delete - pausebreak, capslock, insert - numpad0-numpad9, numpad\_multiply, numpad\_add, numpad\_separator - numpad\_subtract, numpad\_decimal, numpad\_divide ## [Command arguments](https://code.visualstudio.com/docs/configure/keybindings#_command-arguments) You can invoke a command with arguments. This is useful if you often perform the same operation on a specific file or folder. You can add a custom keyboard shortcut to do exactly what you want. The following is an example overriding the Enter key to print some text: JSON ``` { "key": "enter", "command": "type", "args": { "text": "Hello World" }, "when": "editorTextFocus" } ``` The `type` command will receive `{"text": "Hello World"}` as its first argument, and add "Hello World" to the file instead of producing the default command. For more information on commands that take arguments, refer to [Built-in Commands](https://code.visualstudio.com/api/references/commands). ## [Running multiple commands](https://code.visualstudio.com/docs/configure/keybindings#_running-multiple-commands) A keyboard shortcut can be configured to run multiple commands sequentially by using the command `runCommands`. - Run several commands without arguments: The following example copies the current line down, marks the current line as a comment, and moves the cursor to the copied line. JSON ``` { "key": "ctrl+alt+c", "command": "runCommands", "args": { "commands": [ "editor.action.copyLinesDownAction", "cursorUp", "editor.action.addCommentLine", "cursorDown" ] } }, ``` - To pass arguments to commands: This example creates a new untitled TypeScript file and inserts a custom snippet. JSON ``` { "key": "ctrl+n", "command": "runCommands", "args": { "commands": [ { "command": "workbench.action.files.newUntitledFile", "args": { "languageId": "typescript" } }, { "command": "editor.action.insertSnippet", "args": { "langId": "typescript", "snippet": "class ${1:ClassName} {\n\tconstructor() {\n\t\t$0\n\t}\n}" } } ] } }, ``` Note that commands run by `runCommands` receive the value of `"args"` as the first argument. In the previous example, `workbench.action.files.newUntitledFile` receives `{"languageId": "typescript" }` as its first and only argument. To pass several arguments, you need to have `"args"` as an array: JSON ``` { "key": "ctrl+shift+e", "command": "runCommands", "args": { "commands": [ { // command invoked with 2 arguments: vscode.executeCommand("myCommand", "arg1", "arg2") "command": "myCommand", "args": ["arg1", "arg2"] } ] } } ``` To pass an array as the first argument, wrap the array in another array: `"args": [ [1, 2, 3] ]`. ## [Removing a keyboard shortcut](https://code.visualstudio.com/docs/configure/keybindings#_removing-a-keyboard-shortcut) To remove a keyboard shortcut, right-click on the entry in the Keyboard Shortcuts editor, and select **Remove Keybinding**. To remove a keyboard shortcut by using the `keybindings.json` file, add a `-` to the `command` and the rule will be a removal rule. Here is an example: JSON ``` // In Default Keyboard Shortcuts ... { "key": "tab", "command": "tab", "when": ... }, { "key": "tab", "command": "jumpToNextSnippetPlaceholder", "when": ... }, { "key": "tab", "command": "acceptSelectedSuggestion", "when": ... }, ... // To remove the second rule, for example, add in keybindings.json: { "key": "tab", "command": "-jumpToNextSnippetPlaceholder" } ``` To override a specific keyboard shortcut rule with an empty action, you can specify an empty command: JSON ``` // To override and disable any `tab` keyboard shortcut, for example, add in keybindings.json: { "key": "tab", "command": "" } ``` ## [Keyboard layouts](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-layouts) Note This section relates only to keyboard shortcuts, not to typing in the editor. Keys are string representations for virtual keys and do not necessarily relate to the produced character when they are pressed. More precisely: - Reference: [Virtual-Key Codes (Windows)](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) - tab for `VK_TAB` (`0x09`) - ; for `VK_OEM_1` (`0xBA`) - \= for `VK_OEM_PLUS` (`0xBB`) - , for `VK_OEM_COMMA` (`0xBC`) - \- for `VK_OEM_MINUS` (`0xBD`) - . for `VK_OEM_PERIOD` (`0xBE`) - / for `VK_OEM_2` (`0xBF`) - \` for `VK_OEM_3` (`0xC0`) - \[ for `VK_OEM_4` (`0xDB`) - \\ for `VK_OEM_5` (`0xDC`) - \] for `VK_OEM_6` (`0xDD`) - ' for `VK_OEM_7` (`0xDE`) - etc. Different keyboard layouts usually reposition these virtual keys or change the characters produced when they are pressed. When using a different keyboard layout than the standard US, Visual Studio Code does the following: All the keyboard shortcuts are rendered in the UI using the current system's keyboard layout. For example, `Split Editor` when using a French (France) keyboard layout is now rendered as Ctrl+\*: ![render keyboard shortcut](https://code.visualstudio.com/assets/docs/configure/keybinding/render-key-binding.png) When editing `keybindings.json`, VS Code highlights misleading keyboard shortcuts, those that are represented in the file with the character produced under the standard US keyboard layout, but that need pressing keys with different labels under the current system's keyboard layout. For example, here is how the default keyboard shortcut rules look like when using a French (France) keyboard layout: ![keybindings.json guidance](https://code.visualstudio.com/assets/docs/configure/keybinding/keybindings-json.png) There is also a UI control that helps input the keyboard shortcut rule when editing `keybindings.json`. To launch the **Define Keybinding** control, press ⌘K ⌘K (Windows, Linux Ctrl+K Ctrl+K). The control listens for key presses and renders the serialized JSON representation in the text box and below it, the keys that VS Code has detected under your current keyboard layout. Once you've typed the key combination you want, you can press Enter and a rule snippet is inserted. ![keyboard shortcut widget](https://code.visualstudio.com/assets/docs/configure/keybinding/key-binding-widget.png) Note On Linux, VS Code detects your current keyboard layout on startup, and then caches this information. We recommend that you restart VS Code when you change your keyboard layout. ## [Keyboard layout-independent bindings](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-layoutindependent-bindings) Using scan codes, it is possible to define keyboard shortcuts that do not change with the change of the keyboard layout. For example: JSON ``` { "key": "cmd+[Slash]", "command": "editor.action.commentLine", "when": "editorTextFocus" } ``` Accepted scan codes: - \[F1\]-\[F19\], \[KeyA\]-\[KeyZ\], \[Digit0\]-\[Digit9\] - \[Backquote\], \[Minus\], \[Equal\], \[BracketLeft\], \[BracketRight\], \[Backslash\], \[Semicolon\], \[Quote\], \[Comma\], \[Period\], \[Slash\] - \[ArrowLeft\], \[ArrowUp\], \[ArrowRight\], \[ArrowDown\], \[PageUp\], \[PageDown\], \[End\], \[Home\] - \[Tab\], \[Enter\], \[Escape\], \[Space\], \[Backspace\], \[Delete\] - \[Pause\], \[CapsLock\], \[Insert\] - \[Numpad0\]-\[Numpad9\], \[NumpadMultiply\], \[NumpadAdd\], \[NumpadComma\] - \[NumpadSubtract\], \[NumpadDecimal\], \[NumpadDivide\] ## [when clause contexts](https://code.visualstudio.com/docs/configure/keybindings#_when-clause-contexts) VS Code gives you precise control over when your keyboard shortcuts are enabled through the optional `when` clause. If your keyboard shortcut doesn't have a `when` clause, the keyboard shortcut is globally available at all times. A `when` clause evaluates to either true or false for enabling keyboard shortcuts. VS Code sets various context keys and specific values depending on what elements are visible and active in the VS Code UI. For example, the built-in **Start Debugging** command has the keyboard shortcut F5, which is only enabled when there is an appropriate debugger available (context `debuggersAvailable` is true) and the editor isn't in debug mode (context `inDebugMode` is false): ![Start Debugging when clause in the Keyboard Shorts editor](https://code.visualstudio.com/assets/docs/configure/keybinding/start-debugging-when-clause.png) You can also view a keyboard shortcut's when clause directly in the default `keybinding.json` (**Preferences: Open Default Keyboard Shortcuts (JSON)**): JSON ``` { "key": "f5", "command": "workbench.action.debug.start", "when": "debuggersAvailable && !inDebugMode" }, ``` ### [Conditional operators](https://code.visualstudio.com/docs/configure/keybindings#_conditional-operators) For `when` clause conditional expressions, the following conditional operators are useful for keyboard shortcuts: Expand table | Operator | Symbol | Example | |---|---|---| | Equality | `==` | `"editorLangId == typescript"` | | Inequality | `!=` | `"resourceExtname != .js"` | | Or | `||` | `"isLinux``||``isWindows"` | | And | `&&` | `"textInputFocus && !editorReadonly"` | | Matches | `=~` | `"resourceScheme =~ /^untitled$|^file$/"` | You can find the full list of when clause conditional operators in the [when clause contexts](https://code.visualstudio.com/api/references/when-clause-contexts#_conditional-operators) reference. ### [Available contexts](https://code.visualstudio.com/docs/configure/keybindings#_available-contexts) You can find some of the available `when` clause contexts in the [when clause context reference](https://code.visualstudio.com/api/references/when-clause-contexts). The list there isn't exhaustive and you can find other `when` clause contexts by searching and filtering in the Keyboard Shortcuts editor (**Preferences: Open Keyboard Shortcuts** ) or reviewing the default `keybindings.json` file (**Preferences: Open Default Keyboard Shortcuts (JSON)**). ## [Custom keyboard shortcuts for refactorings](https://code.visualstudio.com/docs/configure/keybindings#_custom-keyboard-shortcuts-for-refactorings) The `editor.action.codeAction` command lets you configure keyboard shortcuts for specific [Refactorings](https://code.visualstudio.com/docs/editing/refactoring) (Code Actions). For example, the keyboard shortcut below triggers the **Extract function** refactoring Code Action: JSON ``` { "key": "ctrl+shift+r ctrl+e", "command": "editor.action.codeAction", "args": { "kind": "refactor.extract.function" } } ``` This is covered in depth in the [Refactoring](https://code.visualstudio.com/docs/editing/refactoring#_keyboard-shortcuts-for-code-actions) article, where you can learn about different kinds of Code Actions and how to prioritize them in the case of multiple possible refactorings. ## [Related resources](https://code.visualstudio.com/docs/configure/keybindings#_related-resources) - [VS Code default keyboard shortcuts reference](https://code.visualstudio.com/docs/reference/default-keybindings) ## [Common questions](https://code.visualstudio.com/docs/configure/keybindings#_common-questions) ### [How can I find out what command is bound to a specific key?](https://code.visualstudio.com/docs/configure/keybindings#_how-can-i-find-out-what-command-is-bound-to-a-specific-key) In the Keyboard Shortcuts editor, you can filter on specific keystrokes to see which commands are bound to which keys. In the following screenshot, you can see that Ctrl+Shift+P is bound to **Show All Commands** to bring up the Command Palette. ![Keyboard shortcuts quick outline](https://code.visualstudio.com/assets/docs/configure/keybinding/filter-on-keys.png) ### [How to add a keyboard shortcut to an action, for example, add Ctrl+D to Delete Lines](https://code.visualstudio.com/docs/configure/keybindings#_how-to-add-a-keyboard-shortcut-to-an-action-for-example-add-ctrld-to-delete-lines) Find a rule that triggers the action in the **Default Keyboard Shortcuts** and write a modified version of it in your `keybindings.json` file: JSON ``` // Original, in Default Keyboard Shortcuts { "key": "ctrl+shift+k", "command": "editor.action.deleteLines", "when": "editorTextFocus" }, // Modified, in User/keybindings.json, Ctrl+D now will also trigger this action { "key": "ctrl+d", "command": "editor.action.deleteLines", "when": "editorTextFocus" }, ``` ### [How can I add a keyboard shortcut for only certain file types?](https://code.visualstudio.com/docs/configure/keybindings#_how-can-i-add-a-keyboard-shortcut-for-only-certain-file-types) Use the `editorLangId` context key in your `when` clause: JSON ``` { "key": "shift+alt+a", "command": "editor.action.blockComment", "when": "editorTextFocus && editorLangId == csharp" }, ``` ### [I have modified my keyboard shortcuts in keybindings.json; why don't they work?](https://code.visualstudio.com/docs/configure/keybindings#_i-have-modified-my-keyboard-shortcuts-in-keybindingsjson-why-dont-they-work) The most common problem is a syntax error in the file. Otherwise, try removing the `when` clause or picking a different `key`. Unfortunately, at this point, it is a trial and error process. ## Help and support ### Still need help? - [![](https://code.visualstudio.com/assets/community/sidebar/stackoverflow.svg)Ask the community](https://stackoverflow.com/questions/tagged/vscode) - [![](https://code.visualstudio.com/assets/community/sidebar/github.svg)Request features](https://go.microsoft.com/fwlink/?LinkID=533482) - [![](https://code.visualstudio.com/assets/community/sidebar/issue.svg)Report issues](https://www.github.com/Microsoft/vscode/issues) ### Help us improve Edit this page 02/04/2026 - [![RSS](https://code.visualstudio.com/assets/community/sidebar/rss.svg)RSS Feed](https://code.visualstudio.com/feed.xml) - [![Stackoverflow](https://code.visualstudio.com/assets/community/sidebar/stackoverflow.svg)Ask questions](https://stackoverflow.com/questions/tagged/vscode) - [![Twitter](https://code.visualstudio.com/assets/community/sidebar/twitter.svg)Follow @code](https://go.microsoft.com/fwlink/?LinkID=533687) - [![GitHub](https://code.visualstudio.com/assets/community/sidebar/github.svg)Request features](https://go.microsoft.com/fwlink/?LinkID=533482) - [![Issues](https://code.visualstudio.com/assets/community/sidebar/issue.svg)Report issues](https://www.github.com/Microsoft/vscode/issues) - [![YouTube](https://code.visualstudio.com/assets/community/sidebar/youtube.svg)Watch videos](https://www.youtube.com/channel/UCs5Y5_7XK8HLDX0SLNwkd3w) - [![VS Code on Github](https://code.visualstudio.com/assets/icons/github-icon.svg)](https://github.com/microsoft/vscode) - [![Follow us on X](https://code.visualstudio.com/assets/icons/x-icon.svg)](https://go.microsoft.com/fwlink/?LinkID=533687) - [![VS Code on LinkedIn](https://code.visualstudio.com/assets/icons/linkedin-icon.svg)](https://www.linkedin.com/showcase/vs-code) - [![VS Code on Bluesky](https://code.visualstudio.com/assets/icons/bluesky-icon.svg)](https://bsky.app/profile/vscode.dev) - [![Join the VS Code community on Reddit](https://code.visualstudio.com/assets/icons/reddit-icon.svg)](https://www.reddit.com/r/vscode/) - [![The VS Code Insiders Podcast](https://code.visualstudio.com/assets/icons/podcast-icon.svg)](https://www.vscodepodcast.com/) - [![VS Code on TikTok](https://code.visualstudio.com/assets/icons/tiktok-icon.svg)](https://www.tiktok.com/@vscode) - [![VS Code on YouTube](https://code.visualstudio.com/assets/icons/youtube-icon.svg)](https://www.youtube.com/@code) [![Microsoft homepage](https://code.visualstudio.com/assets/icons/microsoft.svg)](https://www.microsoft.com/) - [Support](https://support.serviceshub.microsoft.com/supportforbusiness/create?sapId=d66407ed-3967-b000-4cfb-2c318cad363d "Get support for VS Code") - [Privacy](https://go.microsoft.com/fwlink/?LinkId=521839 "View the Microsoft privacy statement") - [Manage Cookies]() - [Terms of Use](https://www.microsoft.com/legal/terms-of-use "View the Microsoft Terms of Use") - [License](https://code.visualstudio.com/License "View the Visual Studio Code license") - [Your Privacy Choices](https://aka.ms/YourCaliforniaPrivacyChoices "View Your Privacy Choices") - [Consumer Health Privacy](https://go.microsoft.com/fwlink/?linkid=2259814 "View the Microsoft Consumer Health Privacy policy")
Readable Markdown
Visual Studio Code lets you perform most tasks directly from the keyboard. This article explains how you can modify the default keyboard shortcuts that come with VS Code. Note If you visit this page on a Mac, you will see the keyboard shortcuts for the Mac. If you visit using Windows or Linux, you will see the keys for that platform. If you need the keyboard shortcuts for another platform, hover your mouse over the key you are interested in. ## [Keyboard Shortcuts editor](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-shortcuts-editor) VS Code provides a rich keyboard shortcut editing experience with the Keyboard Shortcuts editor. The editor lists all available commands with and without keyboard shortcuts, and enables you to change, remove, or reset their keyboard shortcuts using the available actions. To find commands or keyboard shortcuts, use the search box and enter a command or shortcut to filter the list. To open the Keyboard Shortcuts editor, select the **File** \> **Preferences** \> **Keyboard Shortcuts** menu, or use the **Preferences: Open Keyboard Shortcuts** command (⌘K ⌘S (Windows, Linux Ctrl+K Ctrl+S)) in the Command Palette. The Keyboard Shortcuts editor opens by default in a [modal overlay](https://code.visualstudio.com/docs/getstarted/userinterface#_modal-editors) on top of the editor area. ![Keyboard Shortcuts](https://code.visualstudio.com/assets/docs/configure/keybinding/keyboard-shortcuts.gif) Note The keyboard shortcuts match your current keyboard layout. For example, keyboard shortcut Cmd+\\ in US keyboard layout will be shown as Ctrl+Shift+Alt+Cmd+7 when the layout is changed to German. The dialog to change a keyboard shortcut assigns the correct and desired keyboard shortcut according to your keyboard layout. ## [Customize shortcuts for UI actions](https://code.visualstudio.com/docs/configure/keybindings#_customize-shortcuts-for-ui-actions) To customize a keyboard shortcut for a UI action, right-click on any action item in your workbench, and select **Configure Keybinding**. This opens the Keyboard Shortcuts editor, filtered to the corresponding command. If the action has a `when` clause, it's automatically included, making it easier to set up your keyboard shortcuts just the way you need them. ## [Keymap extensions](https://code.visualstudio.com/docs/configure/keybindings#_keymap-extensions) Keymap extensions modify the VS Code shortcuts to match those of other editors, so you don't need to learn new keyboard shortcuts. Select the **File** \> **Preferences** \> **Migrate Keyboard Shortcuts from...** menu to get a list of popular keymap extensions. There is also a [Keymaps category](https://marketplace.visualstudio.com/search?target=VSCode&category=Keymaps&sortBy=Installs) of extensions in the Marketplace. ## [Keyboard Shortcuts reference](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-shortcuts-reference) We have a printable version of the default keyboard shortcuts. Select **Help** \> **Keyboard Shortcut Reference** to display a condensed PDF version suitable for printing as an easy reference. The following links provide access to the three platform-specific versions (US English keyboard): - [Windows](https://go.microsoft.com/fwlink/?linkid=832145) - [macOS](https://go.microsoft.com/fwlink/?linkid=832143) - [Linux](https://go.microsoft.com/fwlink/?linkid=832144) ## [Detecting keyboard shortcut conflicts](https://code.visualstudio.com/docs/configure/keybindings#_detecting-keyboard-shortcut-conflicts) If you have many extensions installed or you have modified your keyboard shortcuts, there might be keyboard shortcut conflicts, where the same keyboard shortcut is mapped to multiple commands. This can result in confusing behavior, especially if different keyboard shortcuts are going in and out of scope as you move around the editor. Right-click on an item in the list of keyboard shortcuts, and select **Show Same Keybindings** to view all entries with the same keyboard shortcut. ![show keyboard shortcut conflicts menu](https://code.visualstudio.com/assets/docs/configure/keybinding/show-conflicts-menu.png) ## [Troubleshooting keyboard shortcuts](https://code.visualstudio.com/docs/configure/keybindings#_troubleshooting-keyboard-shortcuts) To troubleshoot keyboard shortcut problems, you can execute the command **Developer: Toggle Keyboard Shortcuts Troubleshooting**. This activates logging of dispatched keyboard shortcuts and opens the Output panel with the corresponding log file. You can then press your desired keyboard shortcut and check what keyboard shortcut VS Code detects and what command is invoked. For example, when pressing `cmd+/` in a code editor on macOS, the logging output would be: ``` [KeybindingService]: / Received keydown event - modifiers: [meta], code: MetaLeft, keyCode: 91, key: Meta [KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta') [KeybindingService]: \ Keyboard event cannot be dispatched. [KeybindingService]: / Received keydown event - modifiers: [meta], code: Slash, keyCode: 191, key: / [KeybindingService]: | Converted keydown event - modifiers: [meta], code: Slash, keyCode: 85 ('/') [KeybindingService]: | Resolving meta+[Slash] [KeybindingService]: \ From 2 keybinding entries, matched editor.action.commentLine, when: editorTextFocus && !editorReadonly, source: built-in. ``` In the example log, the first keydown event is for the `MetaLeft` key (`cmd`) and cannot be dispatched. The second keydown event is for the `Slash` key (`/`) and is dispatched as `meta+[Slash]`. There were two keyboard shortcut entries mapped from `meta+[Slash]` and the one that matched was for the command `editor.action.commentLine`, which has the `when` condition `editorTextFocus && !editorReadonly` and is a built-in keyboard shortcut entry. ## [Viewing modified keyboard shortcuts](https://code.visualstudio.com/docs/configure/keybindings#_viewing-modified-keyboard-shortcuts) To filter the list to only show the shortcuts you have modified, select the **Show User Keybindings** command in the **More Actions** (**...**) menu. This applies the `@source:user` filter to the **Keyboard Shortcuts** editor (**Source** is 'User'). ![Default Keyboard Shortcuts](https://code.visualstudio.com/assets/docs/configure/keybinding/user-keyboard-shortcuts.png) ## [Advanced customization](https://code.visualstudio.com/docs/configure/keybindings#_advanced-customization) VS Code keeps track of the keyboard shortcuts you have customized in the `keybindings.json` file. For advanced customization, you can also directly modify the `keybindings.json` file. To open the `keybindings.json` file: - Open **Keyboard Shortcuts** editor, and then select the **Open Keyboard Shortcuts (JSON)** button on the right of the editor title bar. ![Open Keyboard Shortcuts JSON button](https://code.visualstudio.com/assets/docs/configure/keybinding/open-keyboard-shortcuts-json.png) - Alternatively, use the **Open Default Keyboard Shortcuts (JSON)** command in the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)). ## [Keyboard rules](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-rules) A keyboard shortcut configuration in VS Code is also known as a *keyboard rule*. Each rule consists of the following attributes: - `key`: describes the pressed key(s), for example ⌘F (Windows, Linux Ctrl+F). - `command`: the identifier of the VS Code command to execute, for example `workbench.view.explorer` to open the Explorer view. - `when`: (optional) clause containing a boolean expression that is evaluated depending on the current [context](https://code.visualstudio.com/docs/configure/keybindings#_when-clause-contexts). Chords (two separate keypress actions) are described by separating the two keypresses with a space. For example, Ctrl+K Ctrl+C. When a key is pressed, the following evaluation rules are applied: - Rules are evaluated from **bottom** to **top**. - The first rule that matches both the `key` and `when` clause, is accepted. - If a rule is found, no more rules are processed. - If a rule is found and has a `command` set, the `command` is executed. The additional `keybindings.json` rules are appended at runtime to the bottom of the default rules, thus allowing them to overwrite the default rules. The `keybindings.json` file is watched by VS Code, so editing it while VS Code is running will update the rules at run-time. The keyboard shortcuts dispatching is done by analyzing a list of rules that are expressed in JSON. Here are some examples: ``` // Keyboard shortcuts that are active when the focus is in the editor { "key": "home", "command": "cursorHome", "when": "editorTextFocus" }, { "key": "shift+home", "command": "cursorHomeSelect", "when": "editorTextFocus" }, // Keyboard shortcuts that are complementary { "key": "f5", "command": "workbench.action.debug.continue", "when": "inDebugMode" }, { "key": "f5", "command": "workbench.action.debug.start", "when": "!inDebugMode" }, // Global keyboard shortcuts { "key": "ctrl+f", "command": "actions.find" }, { "key": "alt+left", "command": "workbench.action.navigateBack" }, { "key": "alt+right", "command": "workbench.action.navigateForward" }, // Global keyboard shortcuts using chords (two separate keypress actions) { "key": "ctrl+k enter", "command": "workbench.action.keepEditor" }, { "key": "ctrl+k ctrl+w", "command": "workbench.action.closeAllEditors" }, ``` ## [Accepted keys](https://code.visualstudio.com/docs/configure/keybindings#_accepted-keys) The `key` is made up of modifiers and the key itself. The following modifiers are accepted: | Platform | Modifiers | |---|---| | macOS | Ctrl+, Shift+, Alt+, Cmd+ | | Windows | Ctrl+, Shift+, Alt+, Win+ | | Linux | Ctrl+, Shift+, Alt+, Meta+ | The following keys are accepted: - f1-f19, a-z, 0-9 - \`, \-, \=, \[, \], \\, ;, ', ,, ., / - left, up, right, down, pageup, pagedown, end, home - tab, enter, escape, space, backspace, delete - pausebreak, capslock, insert - numpad0-numpad9, numpad\_multiply, numpad\_add, numpad\_separator - numpad\_subtract, numpad\_decimal, numpad\_divide ## [Command arguments](https://code.visualstudio.com/docs/configure/keybindings#_command-arguments) You can invoke a command with arguments. This is useful if you often perform the same operation on a specific file or folder. You can add a custom keyboard shortcut to do exactly what you want. The following is an example overriding the Enter key to print some text: ``` { "key": "enter", "command": "type", "args": { "text": "Hello World" }, "when": "editorTextFocus" } ``` The `type` command will receive `{"text": "Hello World"}` as its first argument, and add "Hello World" to the file instead of producing the default command. For more information on commands that take arguments, refer to [Built-in Commands](https://code.visualstudio.com/api/references/commands). ## [Running multiple commands](https://code.visualstudio.com/docs/configure/keybindings#_running-multiple-commands) A keyboard shortcut can be configured to run multiple commands sequentially by using the command `runCommands`. - Run several commands without arguments: The following example copies the current line down, marks the current line as a comment, and moves the cursor to the copied line. ``` { "key": "ctrl+alt+c", "command": "runCommands", "args": { "commands": [ "editor.action.copyLinesDownAction", "cursorUp", "editor.action.addCommentLine", "cursorDown" ] } }, ``` - To pass arguments to commands: This example creates a new untitled TypeScript file and inserts a custom snippet. ``` { "key": "ctrl+n", "command": "runCommands", "args": { "commands": [ { "command": "workbench.action.files.newUntitledFile", "args": { "languageId": "typescript" } }, { "command": "editor.action.insertSnippet", "args": { "langId": "typescript", "snippet": "class ${1:ClassName} {\n\tconstructor() {\n\t\t$0\n\t}\n}" } } ] } }, ``` Note that commands run by `runCommands` receive the value of `"args"` as the first argument. In the previous example, `workbench.action.files.newUntitledFile` receives `{"languageId": "typescript" }` as its first and only argument. To pass several arguments, you need to have `"args"` as an array: ``` { "key": "ctrl+shift+e", "command": "runCommands", "args": { "commands": [ { // command invoked with 2 arguments: vscode.executeCommand("myCommand", "arg1", "arg2") "command": "myCommand", "args": ["arg1", "arg2"] } ] } } ``` To pass an array as the first argument, wrap the array in another array: `"args": [ [1, 2, 3] ]`. ## [Removing a keyboard shortcut](https://code.visualstudio.com/docs/configure/keybindings#_removing-a-keyboard-shortcut) To remove a keyboard shortcut, right-click on the entry in the Keyboard Shortcuts editor, and select **Remove Keybinding**. To remove a keyboard shortcut by using the `keybindings.json` file, add a `-` to the `command` and the rule will be a removal rule. Here is an example: ``` // In Default Keyboard Shortcuts ... { "key": "tab", "command": "tab", "when": ... }, { "key": "tab", "command": "jumpToNextSnippetPlaceholder", "when": ... }, { "key": "tab", "command": "acceptSelectedSuggestion", "when": ... }, ... // To remove the second rule, for example, add in keybindings.json: { "key": "tab", "command": "-jumpToNextSnippetPlaceholder" } ``` To override a specific keyboard shortcut rule with an empty action, you can specify an empty command: ``` // To override and disable any `tab` keyboard shortcut, for example, add in keybindings.json: { "key": "tab", "command": "" } ``` ## [Keyboard layouts](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-layouts) Note This section relates only to keyboard shortcuts, not to typing in the editor. Keys are string representations for virtual keys and do not necessarily relate to the produced character when they are pressed. More precisely: - Reference: [Virtual-Key Codes (Windows)](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) - tab for `VK_TAB` (`0x09`) - ; for `VK_OEM_1` (`0xBA`) - \= for `VK_OEM_PLUS` (`0xBB`) - , for `VK_OEM_COMMA` (`0xBC`) - \- for `VK_OEM_MINUS` (`0xBD`) - . for `VK_OEM_PERIOD` (`0xBE`) - / for `VK_OEM_2` (`0xBF`) - \` for `VK_OEM_3` (`0xC0`) - \[ for `VK_OEM_4` (`0xDB`) - \\ for `VK_OEM_5` (`0xDC`) - \] for `VK_OEM_6` (`0xDD`) - ' for `VK_OEM_7` (`0xDE`) - etc. Different keyboard layouts usually reposition these virtual keys or change the characters produced when they are pressed. When using a different keyboard layout than the standard US, Visual Studio Code does the following: All the keyboard shortcuts are rendered in the UI using the current system's keyboard layout. For example, `Split Editor` when using a French (France) keyboard layout is now rendered as Ctrl+\*: ![render keyboard shortcut](https://code.visualstudio.com/assets/docs/configure/keybinding/render-key-binding.png) When editing `keybindings.json`, VS Code highlights misleading keyboard shortcuts, those that are represented in the file with the character produced under the standard US keyboard layout, but that need pressing keys with different labels under the current system's keyboard layout. For example, here is how the default keyboard shortcut rules look like when using a French (France) keyboard layout: ![keybindings.json guidance](https://code.visualstudio.com/assets/docs/configure/keybinding/keybindings-json.png) There is also a UI control that helps input the keyboard shortcut rule when editing `keybindings.json`. To launch the **Define Keybinding** control, press ⌘K ⌘K (Windows, Linux Ctrl+K Ctrl+K). The control listens for key presses and renders the serialized JSON representation in the text box and below it, the keys that VS Code has detected under your current keyboard layout. Once you've typed the key combination you want, you can press Enter and a rule snippet is inserted. ![keyboard shortcut widget](https://code.visualstudio.com/assets/docs/configure/keybinding/key-binding-widget.png) Note On Linux, VS Code detects your current keyboard layout on startup, and then caches this information. We recommend that you restart VS Code when you change your keyboard layout. ## [Keyboard layout-independent bindings](https://code.visualstudio.com/docs/configure/keybindings#_keyboard-layoutindependent-bindings) Using scan codes, it is possible to define keyboard shortcuts that do not change with the change of the keyboard layout. For example: ``` { "key": "cmd+[Slash]", "command": "editor.action.commentLine", "when": "editorTextFocus" } ``` Accepted scan codes: - \[F1\]-\[F19\], \[KeyA\]-\[KeyZ\], \[Digit0\]-\[Digit9\] - \[Backquote\], \[Minus\], \[Equal\], \[BracketLeft\], \[BracketRight\], \[Backslash\], \[Semicolon\], \[Quote\], \[Comma\], \[Period\], \[Slash\] - \[ArrowLeft\], \[ArrowUp\], \[ArrowRight\], \[ArrowDown\], \[PageUp\], \[PageDown\], \[End\], \[Home\] - \[Tab\], \[Enter\], \[Escape\], \[Space\], \[Backspace\], \[Delete\] - \[Pause\], \[CapsLock\], \[Insert\] - \[Numpad0\]-\[Numpad9\], \[NumpadMultiply\], \[NumpadAdd\], \[NumpadComma\] - \[NumpadSubtract\], \[NumpadDecimal\], \[NumpadDivide\] ## [when clause contexts](https://code.visualstudio.com/docs/configure/keybindings#_when-clause-contexts) VS Code gives you precise control over when your keyboard shortcuts are enabled through the optional `when` clause. If your keyboard shortcut doesn't have a `when` clause, the keyboard shortcut is globally available at all times. A `when` clause evaluates to either true or false for enabling keyboard shortcuts. VS Code sets various context keys and specific values depending on what elements are visible and active in the VS Code UI. For example, the built-in **Start Debugging** command has the keyboard shortcut F5, which is only enabled when there is an appropriate debugger available (context `debuggersAvailable` is true) and the editor isn't in debug mode (context `inDebugMode` is false): ![Start Debugging when clause in the Keyboard Shorts editor](https://code.visualstudio.com/assets/docs/configure/keybinding/start-debugging-when-clause.png) You can also view a keyboard shortcut's when clause directly in the default `keybinding.json` (**Preferences: Open Default Keyboard Shortcuts (JSON)**): ``` { "key": "f5", "command": "workbench.action.debug.start", "when": "debuggersAvailable && !inDebugMode" }, ``` ### [Conditional operators](https://code.visualstudio.com/docs/configure/keybindings#_conditional-operators) For `when` clause conditional expressions, the following conditional operators are useful for keyboard shortcuts: | Operator | Symbol | Example | |---|---|---| | Equality | `==` | `"editorLangId == typescript"` | | Inequality | `!=` | `"resourceExtname != .js"` | | Or | `||` | `"isLinux``||``isWindows"` | | And | `&&` | `"textInputFocus && !editorReadonly"` | | Matches | `=~` | `"resourceScheme =~ /^untitled$|^file$/"` | You can find the full list of when clause conditional operators in the [when clause contexts](https://code.visualstudio.com/api/references/when-clause-contexts#_conditional-operators) reference. ### [Available contexts](https://code.visualstudio.com/docs/configure/keybindings#_available-contexts) You can find some of the available `when` clause contexts in the [when clause context reference](https://code.visualstudio.com/api/references/when-clause-contexts). The list there isn't exhaustive and you can find other `when` clause contexts by searching and filtering in the Keyboard Shortcuts editor (**Preferences: Open Keyboard Shortcuts** ) or reviewing the default `keybindings.json` file (**Preferences: Open Default Keyboard Shortcuts (JSON)**). ## [Custom keyboard shortcuts for refactorings](https://code.visualstudio.com/docs/configure/keybindings#_custom-keyboard-shortcuts-for-refactorings) The `editor.action.codeAction` command lets you configure keyboard shortcuts for specific [Refactorings](https://code.visualstudio.com/docs/editing/refactoring) (Code Actions). For example, the keyboard shortcut below triggers the **Extract function** refactoring Code Action: ``` { "key": "ctrl+shift+r ctrl+e", "command": "editor.action.codeAction", "args": { "kind": "refactor.extract.function" } } ``` This is covered in depth in the [Refactoring](https://code.visualstudio.com/docs/editing/refactoring#_keyboard-shortcuts-for-code-actions) article, where you can learn about different kinds of Code Actions and how to prioritize them in the case of multiple possible refactorings. - [VS Code default keyboard shortcuts reference](https://code.visualstudio.com/docs/reference/default-keybindings) ## [Common questions](https://code.visualstudio.com/docs/configure/keybindings#_common-questions) ### [How can I find out what command is bound to a specific key?](https://code.visualstudio.com/docs/configure/keybindings#_how-can-i-find-out-what-command-is-bound-to-a-specific-key) In the Keyboard Shortcuts editor, you can filter on specific keystrokes to see which commands are bound to which keys. In the following screenshot, you can see that Ctrl+Shift+P is bound to **Show All Commands** to bring up the Command Palette. ![Keyboard shortcuts quick outline](https://code.visualstudio.com/assets/docs/configure/keybinding/filter-on-keys.png) ### [How to add a keyboard shortcut to an action, for example, add Ctrl+D to Delete Lines](https://code.visualstudio.com/docs/configure/keybindings#_how-to-add-a-keyboard-shortcut-to-an-action-for-example-add-ctrld-to-delete-lines) Find a rule that triggers the action in the **Default Keyboard Shortcuts** and write a modified version of it in your `keybindings.json` file: ``` // Original, in Default Keyboard Shortcuts { "key": "ctrl+shift+k", "command": "editor.action.deleteLines", "when": "editorTextFocus" }, // Modified, in User/keybindings.json, Ctrl+D now will also trigger this action { "key": "ctrl+d", "command": "editor.action.deleteLines", "when": "editorTextFocus" }, ``` ### [How can I add a keyboard shortcut for only certain file types?](https://code.visualstudio.com/docs/configure/keybindings#_how-can-i-add-a-keyboard-shortcut-for-only-certain-file-types) Use the `editorLangId` context key in your `when` clause: ``` { "key": "shift+alt+a", "command": "editor.action.blockComment", "when": "editorTextFocus && editorLangId == csharp" }, ``` ### [I have modified my keyboard shortcuts in keybindings.json; why don't they work?](https://code.visualstudio.com/docs/configure/keybindings#_i-have-modified-my-keyboard-shortcuts-in-keybindingsjson-why-dont-they-work) The most common problem is a syntax error in the file. Otherwise, try removing the `when` clause or picking a different `key`. Unfortunately, at this point, it is a trial and error process. 02/04/2026
Shard22 (laksa)
Root Hash11536831065451992222
Unparsed URLcom,visualstudio!code,/docs/configure/keybindings s443