// Go to File → Preferences → Keyboard Shortcuts or just press Ctrl + k + Ctrl + s.
// Then click the icon in upper right corner, it opens keybindings.json file:
{
"key": "ctrl+pagedown",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"key": "ctrl+pageup",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
}
{
"key": "ctrl+j",
"command": "workbench.action.focusActiveEditorGroup",
"when": "!terminalFocus"
},
{
"key": "ctrl+k",
"command": "workbench.action.terminal.focus",
"when": "terminalFocus"
}
Step to configure:
Go to: File > Preferences > keyboard shortcuts
then in the search-bar search for "focus terminal"
select "workbench.action.terminal.focus" and then ctrl+k or press your custom key and then press enter.
Similarly, in the search-bar search for "focus active editor group
select "workbench.action.focusActiveEditorGroup" and then press ctrl+j or press your custom key and then press enter.
After the above setup:
Press ctrl+k to focus cursor on terminal
Press ctrl+j to focus cursor on coding section without closing terminal