background:
- Vscode is automatically updated once every two weeks on average
- The terminal clearing operation on the window becomes invalid after updating more than once
- How to customize shortcut keys
Clear screen shortcut ctrl+k invalid
ctrl+L
Clear the screen is just transferred to the current line.
ctrl+k
Really clear the screen. The effect is the same when it fails.ctrl+L
Correct according to the following steps: [Other shortcut keys method are the same]
step1:
Turn on文件 > 首选项 > 键盘快捷方式 > keybindings.json
step2:
Add the following code to the edit json area on the right
{
"key": "ctrl+k",
"command": "workbench.action.terminal.clear",
"when": "terminalFocus"
}
Figure 1
Figure 1
note:
1. This operation takes effect immediately, no need to restart
2. If it does not take effect, please use any other shortcut keys, such as: alt+u to check whether it takes effect, and then change back to ctrl+k after it takes effect