编辑器未检测到 ctrl+d

问题描述 投票:0回答:1

我在 Visual Studio Code 上设置了删除行命令的 ctrl+d 快捷方式(如 Eclipse 默认快捷方式),并且我已经使用它很多年了。

突然它在两个编辑器上都停止工作:我检查了 Eclipse 快捷方式列表,并且 ctrl+d 设置为删除行,但是当我按 ctrl+d 时什么也没有发生。

在 VS Code 上,我尝试禁用所有扩展并重置快捷方式,我还注意到似乎未检测到按 ctrl+d,而检测到 ctrl+ 任何其他键并起作用。因此,我必须通过将其添加到 keybindings.json 中来手动再次设置 ctr+d 快捷方式,但它实际上不起作用。 我尝试如此开发人员:切换键盘快捷键故障排除,当我在输出部分按例如 ctrl+a 时:

2024-01-08 11:28:51.456 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-01-08 11:28:51.456 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2024-01-08 11:28:51.456 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2024-01-08 11:28:51.456 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2024-01-08 11:28:51.456 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2024-01-08 11:28:51.656 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-01-08 11:28:51.656 [info] [KeybindingService]: | Resolving ctrl+A
2024-01-08 11:28:51.656 [info] [KeybindingService]: \ From 2 keybinding entries, matched editor.action.selectAll, when: no when condition, source: built-in.
2024-01-08 11:28:51.657 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: KeyA, keyCode: 65, key: a
2024-01-08 11:28:51.657 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: KeyA, keyCode: 31 ('A')
2024-01-08 11:28:51.657 [info] [KeybindingService]: | Resolving ctrl+A
2024-01-08 11:28:51.657 [info] [KeybindingService]: \ From 2 keybinding entries, matched editor.action.selectAll, when: no when condition, source: built-in.
2024-01-08 11:28:51.657 [info] [KeybindingService]: + Invoking command editor.action.selectAll.
2024-01-08 11:28:52.127 [info] [KeybindingService]: + Ignoring single modifier ctrl due to it being pressed together with other keys.

Ctrl+d 按:

2024-01-08 11:29:12.234 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-01-08 11:29:12.234 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2024-01-08 11:29:12.234 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2024-01-08 11:29:12.234 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2024-01-08 11:29:12.234 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2024-01-08 11:29:12.776 [info] [KeybindingService]: + Ignoring single modifier ctrl due to it being pressed together with other keys.

因此仅检测到 ctrl。

我主要使用 VS Code,因此解决这个问题很重要,但它在 Eclipse 上也停止工作的事实让我认为这不是编辑器问题。

我正在使用: Windows 11 企业版,版本 22H2 Visual Studio代码版本:1.85.1(用户设置) Eclipse 版本:2023-03 (4.27.0)

eclipse visual-studio-code windows-11
1个回答
0
投票

您在排除按键绑定故障方面做得很好。此时,您需要弄清楚哪些其他软件正在消耗按键。检查您的操作系统/桌面环境键盘快捷键,并检查其他正在运行的程序的键盘快捷键。您可以尝试暂时禁用操作系统级别的启动程序,然后重新启动计算机,看看它是否被某个启动程序占用,然后逐个启动每个程序以找出是哪个程序造成的。

本例中,发现是Webex引起的。其他冲突示例包括由 PowerToys 引起的冲突(请参阅 Ctrl + Space 在 VS Code 中不显示任何建议)或 Screenshot Studio(请参阅https://superuser.com/q/92263/1749748)。

© www.soinside.com 2019 - 2024. All rights reserved.