2

I've edited the keybindings.json file in vscode to avoid moving the right hand to the arrow keys adding, among the others, the following:

  {
    "key": "ctrl+j",
    "command": "cursorLeft",
    "when": "editorTextFocus"
  },

I'd like to use the shortcut in the integrated terminal too, but I couldn't find a way. To be sure I'm referring to the right window by calling it "integrated terminal", I'm going to link a screen.

1

If I press ctrl+j in the integrated terminal, it acts like if I'm pressing enter.

1 Answer 1

0

You can use:

"when": "editorTextFocus || terminalFocus"

which will work when the editor or terminal is focused.

You can find all available contexts including terminalFocus here. And all available operators like || here.

2
  • Thanks for your help. Unfortunately, it doesn't solve the problem. There may be some other problems in my settings.
    – stew.ita
    Commented May 27, 2023 at 12:53
  • @stew.ita "doesn't solve my problem" is not a good way to describe the issue at all. What exactly is wrong with that? Did you try to save your keybind and try when the terminal is focused? Or do you need something else?
    – Destroy666
    Commented May 27, 2023 at 21:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .