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

求助:VSCode搜索输入框光标命令快捷键无法修改的问题

VSCode搜索输入框快捷键光标移动失效问题

我在修改VSCode的快捷键配置时,遇到了搜索输入框光标相关命令无法生效的问题。以下配置的ctrl+b快捷键在编辑器文本获得焦点时可正常触发cursorLeft命令,使光标左移:

{
    "key": "ctrl+b",
    "command": "cursorLeft",
    "when": "editorTextFocus || searchInputBoxFocus || inSearchEditor || searchViewletFocus"
},

但当光标处于搜索输入框中时,该快捷键毫无作用,仍需按左箭头键才能移动光标。

搜索输入框

请问是否存在适用于搜索输入框光标移动的其他命令或特定when条件?

补充信息

在快捷键调试中,在文本编辑器按下左箭头键时,光标左移,输出显示触发了cursorLeft命令:

[KeybindingService]: / Received  keydown event - modifiers: [], code: ArrowLeft, keyCode: 37, key: ArrowLeft
[KeybindingService]: | Converted keydown event - modifiers: [], code: ArrowLeft, keyCode: 15 ('LeftArrow')
[KeybindingService]: | Resolving [ArrowLeft]
[KeybindingService]: \ From 10 keybinding entries, matched cursorLeft, when: textInputFocus, source: built-in.
[KeybindingService]: + Invoking command cursorLeft.

而在搜索输入框按下左箭头键时,光标虽左移,但输出显示无匹配命令:

[KeybindingService]: / Received  keydown event - modifiers: [], code: ArrowLeft, keyCode: 37, key: ArrowLeft
[KeybindingService]: | Converted keydown event - modifiers: [], code: ArrowLeft, keyCode: 15 ('LeftArrow')
[KeybindingService]: | Resolving [ArrowLeft]
[KeybindingService]: \ From 9 keybinding entries, no when clauses matched the context.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.19 14:57:14