Vscode: command 'workbench.panel.terminal.focus' not found

Created on 12 Sep 2020  路  4Comments  路  Source: microsoft/vscode




Steps to Reproduce:

  1. In old version, open "Preferences: Open Keyboard Shortcuts"
  2. Set a keyboard shortcut for the command workbench.panel.terminal.focus
  3. Upgrade VS Code version to 1.49
  4. Trigger the shortcut
  5. You will see the error: command 'workbench.panel.terminal.focus' not found


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

It seems that the command is now terminal.focus so that I can use this feature. But I'm wondering why this command is not prefixed, while the other terminal commands are prefixed like workbench.action.terminal.focusNextPane (not workbench.panel.*).

I have no idea what is the intentional naming, but I didn't find the release note mentions this.

*as-designed

Most helpful comment

workbench.action.terminal.focus
Found by going in and using autocomplete in the keybindings, starting with "workbench"

All 4 comments

workbench.action.terminal.focus
Found by going in and using autocomplete in the keybindings, starting with "workbench"

Thanks, I missed it.

So now the questions are

  • workbench.panel.terminal vs workbench.action.terminal
  • Unprefixed terminal.focus besides prefixed workbench.action.terminal.focus

I think the reason this changed is because I changed the view ID in aa6b2f163dad27d8e5d011ed36fb77e536a14e9d, the command contributed by the view component is now terminal.focus, and workbench.action.terminal.focus is the one that's always been contributed by the terminal component. Since I expect the impact of this should be relatively small and we're moving away from using "panel" I'll keep as is, just remove the workbench.panel prefix in your keybinding to workaround this.

The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our issue reporting guidelines.

Happy Coding!

Was this page helpful?
0 / 5 - 0 ratings