Overview
It’s common today to use the CTRL+W
in various applications including most web browsers.
If you’ve used Visual Studio you’ve probably noticed that this keyboard shortcut does not work when trying to close the currently opened tab.
In this article, I’ll show you how you can easily configure Visual Studio to close the currently opened tab.
Configuration
Ok, lets get started …
Here’s how you can configure the keyboard shortcut in Visual Studio:
- Navigate to
TOOLS > OPTIONS > KEYBOARD
- Add
CTRL+W
global shortcut toWindow.CloseDocumentWindow
- Remove the
CTRL+W
shortcut forEdit.SelectCurrentWord


Final Thoughts
I hope you’ve found this quick Visual Studio tip to be useful. If you have found alternative ways to configure this, please feel free to share them in the comments below.
Happy coding 🙂
Latest posts by Shane Bartholomeusz (see all)
- GitHub Actions Exam Study Guide - 14th February 2025
- Solved: Build Errors Not Showing in VS 2022 - 21st November 2024
- How To: Configure VSCode to Trust Self-Signed Certs - 16th August 2024
Thanks for the clear explanation!
I cannot believe we still need to do this. It also seems that people are (still) forgetting that this shortcut exists and should exist. I can’t understand why someone would want to use ctrl+f4 instead. This kind of shortcut needs to be close to the home row for any power user to quickly work with any kind of text editing. (Which is what coding amounts to, obviously)
Totally agree with you Joep!