You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS Code中Ctrl+N快捷键失效求助(配置正确但无响应)

VS Code 常用快捷键失效排查记录

问题现象

  • 按下Ctrl+N无任何反应,但快捷键配置中该组合键已绑定workbench.action.files.newUntitledFile命令
  • 修改快捷键条目时,无法输入Ctrl+N、Ctrl+O、Ctrl+P这类组合键,其他多数组合键可正常设置
  • 通过顶部文件菜单可正常新建无标题文件
  • 将新建无标题文件快捷键改为Ctrl+T Ctrl+T后可正常触发

按键绑定排查日志

按下Ctrl+N前,日志反复出现以下片段:

2023-06-24 16:36:42.482 [info] [KeybindingService]: / Soft dispatching keyboard event
2023-06-24 16:36:42.483 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2023-06-24 16:36:42.483 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2023-06-24 16:36:42.484 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2023-06-24 16:36:42.484 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.

完整按键操作日志:

2023-06-24 16:36:43.452 [info] [KeybindingService]: / Soft dispatching keyboard event
2023-06-24 16:36:43.452 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2023-06-24 16:36:43.452 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2023-06-24 16:36:43.453 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2023-06-24 16:36:43.453 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2023-06-24 16:36:43.905 [info] [KeybindingService]: + Ignoring single modifier ctrl due to it being pressed together with other keys.
2023-06-24 16:36:56.203 [info] [KeybindingService]: / Soft dispatching keyboard event
2023-06-24 16:36:56.203 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2023-06-24 16:36:56.204 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2023-06-24 16:36:56.204 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2023-06-24 16:36:56.204 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2023-06-24 16:36:56.474 [info] [KeybindingService]: / Soft dispatching keyboard event
2023-06-24 16:36:56.474 [info] [KeybindingService]: | Resolving ctrl+A
2023-06-24 16:36:56.475 [info] [KeybindingService]: \ From 2 keybinding entries, matched editor.action.selectAll, when: no when condition, source: built-in.
2023-06-24 16:36:56.475 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: KeyA, keyCode: 65, key: a
2023-06-24 16:36:56.475 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: KeyA, keyCode: 31 ('A')
2023-06-24 16:36:56.475 [info] [KeybindingService]: | Resolving ctrl+A
2023-06-24 16:36:56.476 [info] [KeybindingService]: \ From 2 keybinding entries, matched editor.action.selectAll, when: no when condition, source: built-in.
2023-06-24 16:36:56.476 [info] [KeybindingService]: + Invoking command editor.action.selectAll.

软件信息

Version: 1.79.2 (user setup)
Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06
Date: 2023-06-14T08:57:04.379Z
Electron: 22.5.7
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.19045

按键绑定配置

{ "key": "ctrl+n",                "command": "workbench.action.files.newUntitledFile" }

内容的提问来源于stack exchange,提问作者Brian

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.17 17:32:02