当我复制某些内容或按下按键
cmd + C 时,如何获得某种通知程序弹出窗口或警报声音?我在编码时特别需要这个。
您可以通过执行以下操作将其组合在一起而无需任何扩展:
vscode
将以下内容粘贴到 keybindings.json 中:
"accessibility.signals.terminalBell": {
"sound": "on",
"announcement": "auto",
},
如果您希望它影响从资源管理器视图或问题面板等其他内容进行复制,则需要遵循上面的模式,将其他内置键绑定绑定到
ctrl/cmd+
c (从默认绑定)。例如
{
"key": "ctrl+c",
"command": "runCommands",
"args": { "commands": [
{
"command": "workbench.action.terminal.sendSequence",
"args": {"text": "echo $'\\a'\u000D"}
},
"editor.action.clipboardCopyAction",
]},
"when": "!isMac",
},
{
"key": "cmd+c",
"command": "runCommands",
"args": { "commands": [
{
"command": "workbench.action.terminal.sendSequence",
"args": {"text": "echo $'\\a'\u000D"}
},
"editor.action.clipboardCopyAction",
]},
"when": "isMac",
},