简体   繁体   English

Visual Studio代码自定义键盘快捷键

[英]Visual studio code customize keyboard shortcuts

VS Code Version : 1.26.1 (1.26.1) Mac version : 10.13.6 VS Code版本:1.26.1(1.26.1)Mac版本:10.13.6

How to customize keyboard shortcuts in visual studio code? 如何在Visual Studio代码中自定义键盘快捷键?

For example I want to change Rename to Shift - F6 instead of F2 例如,我想将重命名更改为Shift - F6而不是F2

Instructions for Windows : Windows说明:

Press Ctrl + K and then Ctrl + S and the Keyboard Shortcuts page will open. Ctrl + K ,然后按Ctrl + S ,将打开“键盘快捷键”页面。

Instructions for MacOS : MacOS的说明:

The corresponding shortcut is Cmd + K and then Cmd + S 对应的快捷方式是Cmd + K ,然后是Cmd + S

Normally a new tab with title Keyboard Shortcuts will appear. 通常,会出现一个标题为“ 键盘快捷键”的新标签。 You can modify any shortcut by pressing the edit icon left to the command name and assigning the desired shortcut. 您可以通过按命令名称左侧的编辑图标并分配所需的快捷方式来修改任何快捷方式。

  1. Go to menu Preferences -> Keyboard Shortcuts 转到菜单首选项 -> 键盘快捷键
    • Shortcut in windows its CTRL + k then CTRL + k Windows中的快捷键, 先按 CTRL + k,再按CTRL + k
    • Shortcut in mac CMD + k then CMD + s Mac CMD + k中的快捷方式,然后CMD + s中的快捷方式
  2. Search for the command that you are trying to customise short cut 搜索您要自定义快捷方式的命令
  3. Click on the edit button on the side(Pencil symbol) 单击侧面的编辑按钮(铅笔符号)
  4. Type your custom keyboard short cut and press Enter 输入您的自定义键盘快捷键,然后按Enter

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM