Assign a keyboard shortcut to collapse all projects in Solution Explorer
![Assign a keyboard shortcut to collapse all projects in Solution Explorer](https://res.cloudinary.com/endjin/image/upload/f_auto/q_80/assets/images/blog/2022/06/header-assign-keyboard-shortcut-to-collapse-projects-in-solution-explorer.png)
Just so that I never ever forget this again. Here's how to assign a keyboard shortcut to collapse all projects in Visual Studio Solution Explorer.
In Visual Studio, go to Tools > Options > Keyboard. In the Show commands containing text box, type in CollapseProjects. Select the ProjectandSolutionContextMenus.Projects.CollapseProjects and assign it your shortcut as show below.