12月18日什么星座| 扶她是什么意思| 人活一辈子到底为了什么| cga是什么意思| 为什么经常长口腔溃疡| pc是什么单位| 外痔用什么药可以消除| 30岁用什么眼霜比较好| 抑郁症挂什么科| 脑动脉瘤是什么原因引起的| 太平猴魁是什么茶| 什么叫外阴白斑| 湿热吃什么中成药| 霉菌感染什么症状| 感冒流清水鼻涕吃什么药| 打喷嚏鼻塞吃什么药| 膀胱充盈差是什么意思| 青少年吃什么钙片有助于长高| 做护士需要什么条件| 什么叫女人味| 红豆不能和什么一起吃| 茄子什么人不能吃| 什么方法| 山竹什么时候吃是应季| 夏天中午吃什么| 徐州有什么好吃的| 降维打击是什么意思| 不来例假也没怀孕是什么原因| 牛顿三大定律是什么| 成双成对是什么数字| 四个一是什么| 什么是复利| 世界上最难的字是什么字| 什么样的鼻子| 眼睛总是流泪是什么原因| 一年级又什么又什么| 经常流鼻血什么原因| 2014是什么年| 炖什么汤对肺部最好| 什么是考生号| 脉搏细是什么原因| 吃什么丰胸最好| 皮炎用什么药| 为什么会尿频尿急| 草字头下面一个高字读什么| 混不吝是什么意思| 拔智齿后要注意什么| 什么能减肚子上的脂肪| 头疼吃什么药| 初潮什么意思| 水滴鱼长什么样子| 面诊是什么意思| romantic什么意思| 9月20号是什么星座| 睾丸瘙痒是什么原因| 属猪男和什么属相最配| 吃虾不能和什么一起吃| 梦见掉粪坑里了是什么意思| 好逸恶劳什么意思| 莆田系是什么意思啊| 乳腺炎吃什么消炎药| hm平方是什么单位| 肥肠炒什么菜好吃| 七月初七是什么节日| 疖子是什么原因引起的| 检查生育能力挂什么科| 一票制什么意思| 4月23日是什么日子| 股票pe是什么意思| 喝山楂水有什么好处| 飞机上不能带什么东西| 手心经常出汗是什么原因| 仙女下凡是什么生肖| 什么叫轻度脂肪肝| 佛跳墙属于什么菜系| 牛和什么属相相冲| 福是什么生肖| 梦见被狗咬是什么预兆| 什么动物菩萨心肠| 卵巢多囊是什么原因造成的| 什么的教导| 湿化瓶内放什么水| 呕吐发烧吃什么药| 对猫过敏有什么症状| 黑色柳丁是什么意思| 频繁流鼻血是什么病的前兆| 什么东西越热越爱出来| 维生素b吃多了有什么副作用| 性价比高什么意思| 吃什么可以补铁| 三省吾身是什么意思| 为什么不能打死飞蛾| 逾期不候什么意思| 牡丹是什么植物| 鸡犬不宁是什么生肖| 左膝关节退行性变是什么意思| 晚上睡觉脚冰凉是什么原因| 子宫腺肌症吃什么药| 众矢之的是什么意思| 男戴观音女戴佛有什么讲究| 更年期吃什么调理| 落马是什么意思| 三星堆是什么意思| 藕粉色是什么颜色| 屠苏酒是什么酒| 丝瓜什么人不能吃| bra是什么| 为什么不能空腹喝豆浆| 皮肤暗黄是什么原因| 鼻窦炎有什么特效药| 尿蛋白阴性是什么意思| degaia是什么牌子| 辞职是什么意思| 脑供血不足吃什么药| 深耕是什么意思| 蚕屎做枕头有什么好处| hbsag阳性什么意思| 梦见老婆出轨是什么预兆| 原字五行属什么| 吃小米粥有什么好处| 视而不见的意思是什么| 胆汁是由什么分泌的| 膀胱不充盈什么意思| 日本的国宝是什么| 牛油果对身体有什么好处| 辐照食品什么意思| 百香果什么时候吃最好| 草是什么意思| 左眼跳女人是什么预兆| 办理慢性病需要什么手续| 金银花什么时候采摘最好| 胃糜烂有什么症状| 翻墙软件是什么| 办理慢性病需要什么手续| 来大姨妈吃什么水果| 八点半是什么时辰| 手臂酸痛是什么原因| 尿常规能查出什么病| 千斤拔泡酒有什么功效| 多巴胺高是什么原因| 左眼皮一直跳是什么意思| 无花果吃了有什么好处| 腋下疼痛是什么原因| 爱趴着睡觉是什么原因| 医院dr检查是什么| 护理学是学什么的| 胆碱酯酶低是什么原因| 什么是气滞| 止咳平喘什么药最有效| 胎位rsa是什么意思| 六子是什么意思| 减肥早餐吃什么好| 枸杞有什么功效| 毛孔粗大是什么原因引起的| 澳大利亚有什么动物| 养肝要吃什么| 皮肤软组织感染用什么消炎药| 常规血检能查出什么| 茯苓长什么样| 小便带血是什么原因男性| 尿的是白色米汤是什么病| 什么叫带状疱疹| 什么鸣什么吠| 吐槽是什么意思| 疱疹不能吃什么食物| 六六无穷是什么意思| 什么虫子咬了像针扎一样疼| 面粉是什么做的| 毕业礼物送什么| 什么什么功高| 什么是dna| 头疼喝什么药| 间接胆红素偏高什么意思| 建档需要做什么检查| 刑妻克子是什么意思| 藏是什么意思| 气胸是什么原因引起的| 舌苔厚白吃什么食物好| 空调除湿是什么标志| 皮肤容易晒黑是什么原因| 中招是什么意思| 五朵玫瑰花代表什么意思| 伞裙搭配什么上衣| 农历五月二十一是什么星座| 奶奶的妈妈应该叫什么| 上海市长什么级别| 海底椰是什么| 氯雷他定有什么副作用| 为什么会长胎记| 做nt需要做什么准备| 蓝脸的窦尔敦盗御马是什么歌| 6月份怀孕预产期是什么时候| 阁是什么意思| 心下痞是什么意思| 弹颏是什么意思| 母胎solo是什么意思| 旮旯是什么意思| 逆流而上是什么意思| 什么成荫| 2月25是什么星座| 癫痫病是什么原因引起的| 女人的排卵期一般是什么时候| 前辈是什么意思| 女人身体弱带什么辟邪| 蜘蛛痣是什么| 1994年是什么年| 吃了兔子肉不能吃什么| 皮肤擦伤用什么药膏| nuxe是什么牌子护肤品| 肠炎是什么原因引起的| 早上五六点是什么时辰| 中山大学是什么级别| 冬瓜与什么食物相克| 胃烧心吃什么药效果好| 沙蚕是什么动物| 长春都有什么大学| 什么地叹气| 什么不生四字成语| bbd是什么意思| 什么时候喝咖啡能减肥| 心电图诊断窦性心律什么意思| 泰迪哼哼唧唧表示什么| 左脚大拇指麻木是什么原因| 卵巢畸胎瘤是什么病| 隙是什么意思| 旭日阳刚为什么不火了| 副团级是什么军衔| 被紫外线灯照到有什么后果呀| 什么情况下需要做喉镜检查| 鸡精和味精有什么区别| 什么时候有流星| 福字挂在家里什么位置最合适| 91年是什么年| 奶奶的姐姐叫什么| 放屁多是什么原因呢| 结婚13年是什么婚| 一个三点水一个及念什么| 欧诗漫是个什么档次| 低密度脂蛋白偏高吃什么食物| 7.13是什么日子| 毛主席什么时候死的| 做飞机需要注意什么| siv是什么意思| 胸有成竹是什么意思| 舌头起泡是什么原因| 游离是什么意思| 难免流产什么意思| 染发膏用什么能洗掉| 天天都需要你爱是什么歌| 心脏支架是什么病| 蓝什么什么| 11月27是什么星座| gfr医学上是什么意思| 窦道是什么意思| mommy什么意思| 一指什么生肖| 睾丸是什么意思| 牛皮癣用什么药膏最好| 大专跟本科有什么区别| 为什么日语怎么说| 金字旁加巨念什么| 鸡内金是什么东西| 深棕色是什么颜色| 肠炎能吃什么水果| 百度

Try to extend agent mode in VS Code!

手办鉴赏室:眼镜人妻半透比基尼 元气少女宫本光

百度 钟汉良和张钧甯主演的《最美的时光》里,腹黑老板陆励成(钟汉良饰)一直爱着职员苏蔓(张钧甯饰),但苏蔓却痴情于学长兼同事宋翊。

Visual Studio Code lets you perform most tasks directly from the keyboard. This article explains how you can modify the default keyboard shorts 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.

Keyboard Shortcuts

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):

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

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').

Default Keyboard Shortcuts

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

  • 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\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

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+*:

render keyboard shortcut

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

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

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):

Start Debugging when clause in the Keyboard Shorts editor

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.

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.

Keyboard shortcuts quick outline

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.

狗狗感冒了是什么症状 b型钠尿肽是什么意思 穿什么内衣好 外阴湿疹用什么药 红色裤子配什么上衣好看
什么是音程 和尚代表什么生肖 胃溃疡十二指肠溃疡吃什么药 吃什么对眼睛近视好 螺旋体感染是什么意思
支气管炎是什么原因引起的 尿酸高平时要注意什么 胡子发黄是什么原因 令香是什么意思 2023年属什么
过期牛奶有什么用途 84消毒液不能和什么一起用 fov是什么 脐疝是什么 理工男是什么意思啊
派出所所长是什么级别hcv8jop4ns2r.cn 马甲线是什么hcv9jop0ns3r.cn 生死劫是什么意思hcv7jop6ns5r.cn 涤是什么面料hcv9jop6ns5r.cn nsaid是什么药hcv8jop2ns6r.cn
absorb什么意思hcv9jop3ns1r.cn 才貌双全是什么生肖hcv8jop1ns2r.cn 青色是什么颜色hcv9jop4ns1r.cn 身上痒是什么情况hcv8jop0ns8r.cn 水瓶女喜欢什么样的男生hcv9jop5ns1r.cn
大腿肌肉酸痛是什么病ff14chat.com touch是什么意思hcv9jop7ns4r.cn 结石吃什么食物好hcv8jop7ns1r.cn 嘴唇一圈发黑是什么原因造成的creativexi.com 发芽土豆含有什么毒素hcv8jop9ns0r.cn
仰天长叹的意思是什么hcv9jop2ns2r.cn 肝火旺盛是什么意思hcv9jop6ns9r.cn 化学阉割是什么huizhijixie.com 骨髓水肿吃什么消炎药hcv9jop5ns8r.cn 减肥晚上可以吃什么hcv8jop1ns7r.cn
百度