Skip to content

Remove CtrlCmd+W keybinding to close window when no editors are opened #54492

@graham-sportsmgmt

Description

@graham-sportsmgmt

This could be viewed a duplicate of this Feature Request, but I'm reopening it as a bug for two reasons:

  1. Based on the last comment, I don't believe that the assigned developer completely understood the issue, and
  2. I am adding more specific details that would classify it as a bug.

I frequently use Ctrl + W to close the active editor. When there are no open Windows (i.e. editor tabs) pressing Ctrl + W closes the Workspace (i.e. the entire VS Code application) which is not the behavior I want.

In the Keyboard Shortcuts menu there are default bindings for Ctrl + W to "Close Window" and Ctrl + K + F to "Close Workspace".

In Version 1.25.1 when there are no open editors, pressing Ctrl + W (wrongly) assumes that I wanted to issue a Ctrl + K + F / Close Workspace command. In this situation the desired behavior is no action as:

  1. There are no open Windows, and
  2. The Workspace is not a Window according to the semantics defined in Keyboard Shortcuts.

This could be fixed by either disabling Close Workspace on Ctrl + W or adding a configuration option that lets me control the behavior of Ctrl + W when no editors are open.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalitykeybindingsVS Code keybinding issuesverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions