【问题标题】:How do I turn off or remap ctrl + left click in Visual Studio Code如何在 Visual Studio Code 中关闭或重新映射 ctrl + 左键单击
【发布时间】:2015-12-16 21:09:00
【问题描述】:

有谁知道如何在 Visual Studio Code 中关闭或重新映射 Ctrl + 左键单击?我似乎有 20% 的时间在用鼠标选择文本以复制时按下了 Ctrl 键,而且导航到中间的另一个文件真的很烦人。

Visual Studio Code - Key Bindings

【问题讨论】:

  • 这是您要找的吗? stackoverflow.com/questions/12137953/…
  • @E.Moffat 用于 Visual Studio,而不是 Visual Studio 代码。
  • @DavidSherret 完全错过了。我的错!
  • @E.Moffat 总是犯这样的错误是很容易犯的错误。这两个应用程序的名称如此相似,这有点令人讨厌。

标签: c# .net typescript key-bindings visual-studio-code


【解决方案1】:

我快速浏览了 VS Code 键盘快捷键文档并找到了accepted keys 的列表。

通常你会去 File > Preferences > Keyboard Shortcuts 并像这样添加你的自定义绑定:

(这是在 @C:\Users\[user]\AppData\Roaming\Code\User 找到的 keybindings.json 文件)

// Place your key bindings in this file to overwrite the defaults
[
    { "key": "f8",                    "command": "workbench.action.tasks.build" },
    { "key": "ctrl+[mouse button]",   "command": "cursorWordLeft",
                                         "when": "editorTextFocus" }
]

但不幸的是,根据文档,鼠标重新绑定似乎不受支持。

也就是说 VS Code 是一个开源项目,因此您可以随时提出此功能或参与其中,看看您能做什么!

这是编辑器的配置文件。 https://github.com/Microsoft/vscode/blob/master/src/vs/editor/common/config/config.ts

【讨论】:

  • 谢谢!可惜不支持。也许如果我有时间我会尝试添加它。
  • 值得注意的是,VIsual Studio Code 的运行方式会因安装和激活的语言和/或扩展而有所不同
猜你喜欢
  • 1970-01-01
  • 2021-09-04
  • 2011-02-20
  • 2017-07-23
  • 1970-01-01
  • 1970-01-01
  • 2012-08-21
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多