Entering the Settings menu in fullscreen can become stuck due to disabled keybinds #18522

Closed
opened 2026-01-31 06:16:34 +00:00 by claunia · 18 comments
Owner

Originally created by @raethkcj on GitHub (Sep 21, 2022).

Windows Terminal version

1.14.2281.0

Windows build number

10.0.19044.1889

Other Software

No response

Steps to reproduce

Note: Keybinds listed are my own, I believe they're the defaults but I can't remember for sure.

  1. Open Terminal
  2. Enter fullscreen mode (Alt+Enter)
  3. Open the Settings menu (Ctrl+,)
  4. Attempt to leave the Settings menu via:
    • Ctrl+W (Close Tab keybind)
    • The 'Save' button
    • The 'Discard changes' button
    • Alt+Enter
    • Esc
  5. Note that none of the above work and you are seemingly stuck

Expected Behavior

There should be some obvious way of exiting the Settings menu, whether it's a GUI button, the user's chosen Close Tab key, or otherwise.

Actual Behavior

There is no readily apparent way to leave the fullscreen Settings menu.

Here is a short video of me trying to do so: https://youtu.be/XFII1thF1Xc

Eventually I tried Ctrl+Tab and found out that this keybind works to change tabs while stuck this way. I could then get out of fullscreen mode while in a regular terminal tab, and then close the Settings tab.

The Close Pane keybind Ctrl+Shift+W also seems to work, but it's not obvious that the Settings menu is a Pane and not a Tab.

Originally created by @raethkcj on GitHub (Sep 21, 2022). ### Windows Terminal version 1.14.2281.0 ### Windows build number 10.0.19044.1889 ### Other Software _No response_ ### Steps to reproduce Note: Keybinds listed are my own, I believe they're the defaults but I can't remember for sure. 1. Open Terminal 2. Enter fullscreen mode (Alt+Enter) 3. Open the Settings menu (Ctrl+,) 4. Attempt to leave the Settings menu via: - Ctrl+W (Close Tab keybind) - The 'Save' button - The 'Discard changes' button - Alt+Enter - Esc 5. Note that none of the above work and you are seemingly stuck ### Expected Behavior There should be some obvious way of exiting the Settings menu, whether it's a GUI button, the user's chosen Close Tab key, or otherwise. ### Actual Behavior There is no readily apparent way to leave the fullscreen Settings menu. Here is a short video of me trying to do so: https://youtu.be/XFII1thF1Xc Eventually I tried Ctrl+Tab and found out that this keybind works to change tabs while stuck this way. I could then get out of fullscreen mode while in a regular terminal tab, and then close the Settings tab. The Close Pane keybind Ctrl+Shift+W also seems to work, but it's not obvious that the Settings menu is a Pane and not a Tab.
Author
Owner

@zadjii-msft commented on GitHub (Sep 23, 2022):

Huh, okay closeTab should totally work in the SUI. There's only so many actions that work there, but closeTab should too.

@zadjii-msft commented on GitHub (Sep 23, 2022): Huh, okay closeTab should totally work in the SUI. There's only so many actions that work there, but closeTab should too.
Author
Owner

@Swinkid commented on GitHub (Mar 16, 2023):

@raethkcj Can you try using F11 to escape? I've just tried to replicate your issue and was able to escape using the F11 key... unless you've remapped it maybe?

@Swinkid commented on GitHub (Mar 16, 2023): @raethkcj Can you try using F11 to escape? I've just tried to replicate your issue and was able to escape using the F11 key... unless you've remapped it maybe?
Author
Owner

@raethkcj commented on GitHub (Mar 19, 2023):

F11 does indeed work, but was not what I used to enter fullscreen mode. There's no intuitive reason for two keybinds for the exact same function to work differently.

@raethkcj commented on GitHub (Mar 19, 2023): F11 does indeed work, but was not what I used to enter fullscreen mode. There's no intuitive reason for two keybinds for the exact same function to work differently.
Author
Owner

@Swinkid commented on GitHub (Mar 20, 2023):

F11 does indeed work, but was not what I used to enter fullscreen mode. There's no intuitive reason for two keybinds for the exact same function to work differently.

I totally agree. @zadjii-msft thoughts on how this can be changed? Willing to assist implementation....

@Swinkid commented on GitHub (Mar 20, 2023): > F11 does indeed work, but was not what I used to enter fullscreen mode. There's no intuitive reason for two keybinds for the exact same function to work differently. I totally agree. @zadjii-msft thoughts on how this can be changed? Willing to assist implementation....
Author
Owner

@zadjii-msft commented on GitHub (Mar 20, 2023):

Hmm. That's a good question. #10121 looks like where we hooked up the keybindings / actions to the settings UI. Maybe the closeTab handler checks to see if the selected tab is a TerminalTab, and the settings tab fails that...

@zadjii-msft commented on GitHub (Mar 20, 2023): Hmm. That's a good question. #10121 looks like where we hooked up the keybindings / actions to the settings UI. Maybe the closeTab handler checks to see if the selected tab is a `TerminalTab`, and the settings tab fails that...
Author
Owner

@zadjii-msft commented on GitHub (Mar 20, 2023):

Hmm. There's nothing in TerminalPage::_HandleCloseTab that immediately jumps out as what's wrong here. I'd probably step through that with a debugger and see what's wrong.

@zadjii-msft commented on GitHub (Mar 20, 2023): Hmm. There's nothing in `TerminalPage::_HandleCloseTab` that immediately jumps out as what's wrong here. I'd probably step through that with a debugger and see what's wrong.
Author
Owner

@michalnpl commented on GitHub (Apr 21, 2023):

Isn't Ctrl+w not working because by default because of

210414e5a8/src/cascadia/TerminalSettingsModel/defaults.json (L379)
?

When changed to

{ "command": "closeTab", "keys": "ctrl+w" },

and regenerate \src\cascadia\TerminalSettingsModel\Generated Files\defaults.h it works just fine with described workflow.

However, pressing Alt on settings page (fullscreen or not) freezes the UI because the program seems to go into infinite loop infinite loop here:

210414e5a8/src/cascadia/TerminalApp/TerminalWindow.cpp (L883)

@michalnpl commented on GitHub (Apr 21, 2023): Isn't **Ctrl+w** not working because by default because of https://github.com/microsoft/terminal/blob/210414e5a8182eaa3e7f1ed2d07da50edf80e242/src/cascadia/TerminalSettingsModel/defaults.json#L379 ? When changed to ` { "command": "closeTab", "keys": "ctrl+w" },` and regenerate **\src\cascadia\TerminalSettingsModel\Generated Files\defaults.h** it works just fine with described workflow. However, pressing **Alt** on settings page (fullscreen or not) freezes the UI because the program seems to go into infinite loop infinite loop here: https://github.com/microsoft/terminal/blob/210414e5a8182eaa3e7f1ed2d07da50edf80e242/src/cascadia/TerminalApp/TerminalWindow.cpp#L883
Author
Owner

@zadjii-msft commented on GitHub (Apr 21, 2023):

However, pressing Alt on settings page (fullscreen or not) freezes the UI because the program seems to go into infinite loop infinite loop

wat

That doesn't make sense

ah butts.

in #15189 we should have added a break after the focusedObject = _root.try_as(); line.

@zadjii-msft commented on GitHub (Apr 21, 2023): > However, pressing Alt on settings page (fullscreen or not) freezes the UI because the program seems to go into infinite loop infinite loop wat That doesn't make sense ah butts. in #15189 we should have added a `break` after the `focusedObject = _root.try_as();` line.
Author
Owner

@michalnpl commented on GitHub (Apr 21, 2023):

@zadjii-msft I tried adding the necessary breaks, and Alt no longer freezes the settings page, but Alt+Enter will not make it go fullscreen.

Separately, when you try F11 on the settings page to go full screen, there will be Access violation reading location 0x0000000000000000, but that's unrelated, and I already have a fix for that; I just need to file an issue and can submit a PR.

@michalnpl commented on GitHub (Apr 21, 2023): @zadjii-msft I tried adding the necessary breaks, and **Alt** no longer freezes the settings page, but **Alt+Enter** will not make it go fullscreen. Separately, when you try F11 on the settings page to go full screen, there will be **Access violation reading location 0x0000000000000000**, but that's unrelated, and I already have a fix for that; I just need to file an issue and can submit a PR.
Author
Owner

@zadjii-msft commented on GitHub (Apr 21, 2023):

Oh there's also a crash on trying to closeTab from the SUI tab. From #15196. That's a easy fix though

@zadjii-msft commented on GitHub (Apr 21, 2023): Oh there's also a crash on trying to closeTab from the SUI tab. From #15196. That's a easy fix though
Author
Owner

@zadjii-msft commented on GitHub (Apr 21, 2023):

After fixing that crash though, I can't repro the original bug (Close the settings tab via closeTab bound to Ctrl+w). I dunno where this was fixed, I dunno if we really need to bisect it though. Might have just been #15189.

@zadjii-msft commented on GitHub (Apr 21, 2023): After fixing that crash though, I can't repro the original bug (Close the settings tab via `closeTab` bound to <kbd>Ctrl+w</kbd>). I dunno where this was fixed, I dunno if we really need to bisect it though. Might have just been #15189.
Author
Owner

@michalnpl commented on GitHub (Apr 21, 2023):

I still can't close the tab with ctrl+w after fixing the crash because, in the main branch, there is no "ctrl+w" binding in defaults.json.

@michalnpl commented on GitHub (Apr 21, 2023): I still can't close the tab with **ctrl+w** after fixing the crash because, in the main branch, there is no "ctrl+w" binding in [**defaults.json**](https://github.com/microsoft/terminal/blob/210414e5a8182eaa3e7f1ed2d07da50edf80e242/src/cascadia/TerminalSettingsModel/defaults.json).
Author
Owner

@zadjii-msft commented on GitHub (Apr 21, 2023):

I mean, sure. I'm assuming OP added the closeTab binding themselves to their settings.json.

@zadjii-msft commented on GitHub (Apr 21, 2023): I mean, sure. I'm assuming OP added the closeTab binding themselves to their `settings.json`.
Author
Owner

@michalnpl commented on GitHub (Apr 21, 2023):

Yup, when it is added, it works just fine.

@michalnpl commented on GitHub (Apr 21, 2023): Yup, when it is added, it works just fine.
Author
Owner

@zadjii-msft commented on GitHub (Apr 24, 2023):

I'm gonna mark this one up as "we think it's already fixed in 1.18, we'll have OP double-check for us when that comes out". Thanks!

@zadjii-msft commented on GitHub (Apr 24, 2023): I'm gonna mark this one up as "we think it's already fixed in 1.18, we'll have OP double-check for us when that comes out". Thanks!
Author
Owner

@zadjii-msft commented on GitHub (Jul 5, 2023):

@raethkcj can you double-check if this is fixed for you in Terminal Preview v1.18/?

@zadjii-msft commented on GitHub (Jul 5, 2023): @raethkcj can you double-check if this is fixed for you in Terminal Preview v1.18/?
Author
Owner

@raethkcj commented on GitHub (Jul 7, 2023):

@zadjii-msft yep, I can confirm that in Terminal Preview 1.18.1462.0, adding and using Ctrl+W to close the Settings menu (fullscreen or not) is working!

Thanks for chasing this down, even if it was relatively minor!

@raethkcj commented on GitHub (Jul 7, 2023): @zadjii-msft yep, I can confirm that in Terminal Preview 1.18.1462.0, adding and using Ctrl+W to close the Settings menu (fullscreen or not) is working! Thanks for chasing this down, even if it was relatively minor!
Author
Owner

@zadjii-msft commented on GitHub (Jul 12, 2023):

Thanks for following up!

@zadjii-msft commented on GitHub (Jul 12, 2023): Thanks for following up!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18522