Skip to content

"runCommands": "workbench.action.focusActiveEditorGroup" command does not work after "workbench.action.terminal.focus" command #204810

Open
@BartolomeSintes

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.86
  • OS Version: Windows 10

I have defined three keybindings. The first one switches focus to the terminal. The second one switches focus to the editor. The third one switches focus to the terminal and then switches focus to the editor (eventually something would be done in between but it does not matter now).
First and second keybinding work as expected, but the third keybinding does not work properly. Focus stays in the terminal and does not switch to the editor.

    {
        "key": "ctrl+alt+NumPad_Add",
        "command": "workbench.action.terminal.focus",
        "when": "!terminalFocus"
    },
    {
        "key": "ctrl+alt+NumPad_Subtract",
        "command": "workbench.action.focusActiveEditorGroup",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+alt+NumPad_Multiply",
        "command": "runCommands",
        "args": {
            "commands": [
                {
                    "command": "workbench.action.terminal.focus",
                    "when": "!terminalFocus"
                },
                // stuff in the terminal
                {
                    "command": "workbench.action.focusActiveEditorGroup",
                    "when": "terminalFocus"
                },
            ]
        }
    },

Steps to reproduce

  1. Copy the keybindings in keybindings.json
  2. Open an editor and try the three keybindings.

Thanking you in advance

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions