Cannot close tab with Ctrl-F4 #15446

Closed
opened 2026-01-31 04:38:52 +00:00 by claunia · 4 comments
Owner

Originally created by @mailinglists35 on GitHub (Oct 5, 2021).

Windows Terminal version (or Windows build number)

1.11.2731.0 on 10.0.19042.1237]

Other Software

No response

Steps to reproduce

press ctrl-f4 to close the active tab

Expected Behavior

close current tab

Actual Behavior

keys are ignored, tab remains open

Originally created by @mailinglists35 on GitHub (Oct 5, 2021). ### Windows Terminal version (or Windows build number) 1.11.2731.0 on 10.0.19042.1237] ### Other Software _No response_ ### Steps to reproduce press ctrl-f4 to close the active tab ### Expected Behavior close current tab ### Actual Behavior keys are ignored, tab remains open
Author
Owner

@zadjii-msft commented on GitHub (Oct 5, 2021):

Did you add either of those keys to your keybindings in the settings?

@zadjii-msft commented on GitHub (Oct 5, 2021): Did you add either of those keys to your keybindings in the settings?
Author
Owner

@mailinglists35 commented on GitHub (Oct 5, 2021):

no, only shift-pgup/phdown because defaults ctrl-shift-pgup/down are not what linux terminal users expect

@mailinglists35 commented on GitHub (Oct 5, 2021): no, only shift-pgup/phdown because defaults ctrl-shift-pgup/down are not what linux terminal users expect
Author
Owner

@zadjii-msft commented on GitHub (Oct 5, 2021):

Well, that'd explain it. Those keys aren't bound by default. You can find a full list of the default keybindings here. Notably,

{ "command": "closePane", "keys": "ctrl+shift+w" },

and "closePane" will close a tab, it it's the only pane in the tab.

@zadjii-msft commented on GitHub (Oct 5, 2021): Well, that'd explain it. Those keys aren't bound by default. You can find a full list of the default keybindings [here](https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalSettingsModel/defaults.json#L282-L455). Notably, ```json { "command": "closePane", "keys": "ctrl+shift+w" }, ``` and "closePane" will close a tab, it it's the only pane in the tab.
Author
Owner

@mailinglists35 commented on GitHub (Oct 7, 2021):

I believe you solved the issue in the wrong way by teaching me a different shortcut than what I expect from using Windows apps and their child windows for the past 30 years.

Please reopen because I don't want to alter the settings and neither I want to change my habits; instead I want this app obey the habits Microsoft has made me learn: Ctrl+F4 closes the child window of the active window; in this case, the child is a tab.

I don't know the history of Ctrl-W behaviour on Windows (which exists as alternative to Ctrl-F4 on linux for many years) but I'm happy it seems to work for example for Microsoft Edge or Microsoft Office with the same result as Ctrl-F4, however ctrl-w is a frequently used Linux shell keyboard shortcut so it makes sense to pass this combination to the shell. But Ctrl-F4 is not interpreted by the shell.

@mailinglists35 commented on GitHub (Oct 7, 2021): I believe you solved the issue in the wrong way by teaching me a different shortcut than what I expect from using Windows apps and their child windows for the past 30 years. Please reopen because I don't want to alter the settings and neither I want to change my habits; instead I want this app obey the habits Microsoft has made me learn: Ctrl+F4 closes the child window of the active window; in this case, the child is a tab. I don't know the history of Ctrl-W behaviour on Windows (which exists as alternative to Ctrl-F4 on linux for many years) but I'm happy it seems to work for example for Microsoft Edge or Microsoft Office with the same result as Ctrl-F4, however ctrl-w is a frequently used Linux shell keyboard shortcut so it makes sense to pass this combination to the shell. But Ctrl-F4 is not interpreted by the shell.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15446