求助:Cursor IDE中无法移除的deleteWordLeft快捷键异常问题
问题描述
从某个未知时间点开始,在与VS Code并排安装的Cursor IDE中按下Ctrl+Backspace时,即便焦点处于查找框、全局搜索框、命令面板或其他任何可聚焦区域,都会删除文本编辑器中的单词。
在键盘快捷键菜单(Ctrl+K Ctrl+S)中排查后发现,存在一个无任何触发条件的deleteWordLeft命令绑定,配置如下:
{"key": "ctrl+backspace", "command": "deleteWordLeft"}
该绑定显示为用户自定义配置,无法通过UI移除、修改或重置(重置操作仅会新增一个带标准条件的快捷键,但原绑定并未被删除),也无法被其他命令覆盖。
已尝试的解决方法
- 清理Cursor缓存
- 打开其他文件夹测试
- 通过extension bisect禁用所有扩展
- 进行键盘快捷键故障排查,确认触发的确实是该无条件绑定,日志如下:
2025-09-04 16:25:23.806 [info] [Window] [KeybindingService]: / Received keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control 2025-09-04 16:25:23.806 [info] [Window] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl') 2025-09-04 16:25:23.807 [info] [Window] [KeybindingService]: / Soft dispatching keyboard event 2025-09-04 16:25:23.807 [info] [Window] [KeybindingService]: \ Keyboard event cannot be dispatched 2025-09-04 16:25:23.807 [info] [Window] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase. 2025-09-04 16:25:24.748 [info] [Window] [KeybindingService]: / Received keydown event - modifiers: [ctrl], code: Backspace, keyCode: 8, key: Backspace 2025-09-04 16:25:24.749 [info] [Window] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: Backspace, keyCode: 1 ('Backspace') 2025-09-04 16:25:24.749 [info] [Window] [KeybindingService]: / Soft dispatching keyboard event 2025-09-04 16:25:24.749 [info] [Window] [KeybindingService]: | Resolving ctrl+Backspace 2025-09-04 16:25:24.749 [info] [Window] [KeybindingService]: \ From 8 keybinding entries, matched deleteWordLeft, when: no when condition, source: user. 2025-09-04 16:25:24.749 [info] [Window] [KeybindingService]: | Resolving ctrl+Backspace 2025-09-04 16:25:24.749 [info] [Window] [KeybindingService]: \ From 8 keybinding entries, matched deleteWordLeft, when: no when condition, source: user. 2025-09-04 16:25:24.750 [info] [Window] [KeybindingService]: + Invoking command deleteWordLeft. 2025-09-04 16:25:25.691 [info] [Window] [KeybindingService]: + Ignoring single modifier ctrl due to it being pressed together with other keys.
解决方案
直接删除异常绑定
- 按下
Ctrl+Shift+P唤起命令面板,输入Preferences: Open Keyboard Shortcuts (JSON)并执行,打开用户快捷键配置文件。 - 在文件中定位到
{"key": "ctrl+backspace", "command": "deleteWordLeft"}这一行,直接删除该条目。 - 保存文件(
Ctrl+S),重启Cursor后即可恢复Ctrl+Backspace的标准功能——仅在文本编辑器聚焦且可编辑时删除左侧单词,其他输入区域正常执行对应删除操作。
- 按下
若无法找到异常绑定,添加覆盖配置
如果在JSON配置文件中找不到上述异常条目,可手动添加以下配置来覆盖全局绑定:// 禁用无约束的deleteWordLeft绑定 { "key": "ctrl+backspace", "command": "-deleteWordLeft" }, // 添加标准条件的正确绑定 { "key": "ctrl+backspace", "command": "deleteWordLeft", "when": "editorTextFocus && !editorReadonly" }保存文件并重启Cursor即可生效。
内容的提问来源于stack exchange,提问作者Tech of the Absence
相关产品推荐
相关产品推荐

