如何在 Windows 终端预览中真正禁用 ctrl+shift+箭头键?
How to really disable ctrl+shift+arrow keys in Windows Terminal Preview?
每次我尝试在新的 windows 终端预览中使用 ctrl-shift-up
或 ctrl-shift-down
时,它都会向上或向下滚动终端视图。我尝试进入 profiles.json
文件并将 "command" : "scrollDown"
和 "command" : "scrollUp"
设置为 "unbound"
但它没有效果。
如果我尝试将 scollUp
绑定到其他东西,比方说 ctrl+alt+b
,那么它会正确地将键绑定添加到命令中。似乎有一个默认的 windows 键绑定设置为使用 ctrl+shift+arrows
.
上下滚动终端视图
不确定您是否找到了答案,但我也在找这个。在当前可用的 microsfot 开发博客中找到以下内容:
If there is a default key binding included in the defaults.json file
that you would like to free up, you can set that key binding to null
in your profiles.json.
{
"command": null, "keys": ["ctrl+shift+w"]
}
Link 至全文:
https://devblogs.microsoft.com/commandline/windows-terminal-preview-1910-release/
你可以添加
{ "command": { "action": "sendInput", "input": "\u0000" }, "keys": "ctrl+shift+up" },
{ "command": { "action": "sendInput", "input": "\u0000" }, "keys": "ctrl+shift+down" },
所以当您按下按键时,它会用向输入发送一个空字符来替换不需要的命令(当然,这什么都不做,哈哈)
每次我尝试在新的 windows 终端预览中使用 ctrl-shift-up
或 ctrl-shift-down
时,它都会向上或向下滚动终端视图。我尝试进入 profiles.json
文件并将 "command" : "scrollDown"
和 "command" : "scrollUp"
设置为 "unbound"
但它没有效果。
如果我尝试将 scollUp
绑定到其他东西,比方说 ctrl+alt+b
,那么它会正确地将键绑定添加到命令中。似乎有一个默认的 windows 键绑定设置为使用 ctrl+shift+arrows
.
不确定您是否找到了答案,但我也在找这个。在当前可用的 microsfot 开发博客中找到以下内容:
If there is a default key binding included in the defaults.json file that you would like to free up, you can set that key binding to null in your profiles.json.
{ "command": null, "keys": ["ctrl+shift+w"] }
Link 至全文: https://devblogs.microsoft.com/commandline/windows-terminal-preview-1910-release/
你可以添加
{ "command": { "action": "sendInput", "input": "\u0000" }, "keys": "ctrl+shift+up" },
{ "command": { "action": "sendInput", "input": "\u0000" }, "keys": "ctrl+shift+down" },
所以当您按下按键时,它会用向输入发送一个空字符来替换不需要的命令(当然,这什么都不做,哈哈)