Is there a Visual Studio command to change the Output Window's `Show output from` setting?

Viewed 99

At the top of the Visual Studio Output Window is this little dropdown thing:

enter image description here

Is there a command to change this setting, or, perhaps, simply reset it to Build? I'd like to be able to go back to the build output via a keyboard shortcut of some kind, but there's nothing obvious in Tools>Options>Keyboard...

I'm using Visual Studio 2017.

1 Answers

You can create the following command (language C#) with my Visual Commander extension and assign a shortcut to it:

public class C : VisualCommanderExt.ICommand
{
    public void Run(EnvDTE80.DTE2 DTE, Microsoft.VisualStudio.Shell.Package package) 
    {
        foreach (EnvDTE.OutputWindowPane pane in DTE.ToolWindows.OutputWindow.OutputWindowPanes)
        {
            if (pane.Name == "Build")
                pane.Activate();
        }
    }
}
Related