terminal
terminal copied to clipboard
[Settings] : System menu pop-up doesn't open inside 'Settings' window, when user press 'Alt + Space' key.
Windows Terminal version
1.12.3472.0
Windows build number
22509.1011
Other Software
**Test Environment: ** OS: Windows 11 Version Dev (OS Build 22509.1011) App: Windows Terminal Preview
Steps to reproduce
**Repro Steps: **
1.Open Windows Terminal. 2.Open Settings page using 'Ctr+,' 3.Now try to open the 'System menu' pop-up by pressing 'Alt + Space' key. 4.Observe the issue.
**User Experience: ** Users will not be able to 'System menu' pop-up functionalities in 'Settings' window, if System menu pop-up doesn't open inside 'Settings' window on pressing 'Alt + Space' key.
Attachment : System menu pop-up doesn't open inside 'Settings' window, when user press 'Alt + Space' key..zip
Expected Behavior
System menu pop-up should open inside 'Settings' window, when user press 'Alt + Space' key.
Actual Behavior
System menu pop-up doesn't open inside 'Settings' window, when user press 'Alt + Space' key.
Huh. Sure doesn't. Probably should. I'm guessing there's some magic reason that Alt+Space isn't delivered to the SUI, which is causing us to never raise a OpenSystemMenu
action, so it never gets to TerminalPage::_HandleOpenSystemMenu
. That's where I'd start.
Note to selves: it just generally doesn't work from the command palette either. Why does it need to go through a TermControl
? that's weird.
Or read-only panes. weird.
So the reason this doesn't work in the settings UI is because Alt
+ Space
is special cased in the app's main method to delegate through to AppHost::OnDirectKeyEvent()
, which in turn delegates through to AppLogic::OnDirectKeyEvent()
.
This method iterates through the UI tree and passes the key event through to IDirectKeyListener
implementations - of which the settings UI's MainPage
isn't one.
Hitting Alt
+ Space
in the command palette doesn't work either - it does implement IDirectKeyListener
, but only seems to care about the Alt
key-up event and doesn't handle Alt
+ Space
.
I've been looking at this for a while now, and can't come up with a nice way of refactoring the code so that hitting Alt
+ Space
works in all three places. The TermControl
logic below doesn't refactor out (I was thinking up to AppLogic
) well - as it uses methods on ControlSettings
, which AppLogic
(or MainPage
for that matter) doesn't know anything about.
https://github.com/microsoft/terminal/blob/210a98e44940f880175436b050151fb8c1e4b45d/src/cascadia/TerminalControl/TermControl.cpp#L963-L988
Oddly, the "Open system menu" action does work if you click it from within the command palette - it just doesn't work if you press the enter key with it highlighted. In both cases the action does fire, and IslandWindow::OpenSystemMenu()
does get called - but when enter is pressed, the call to TrackPopupMenu()
doesn't seem to do anything.
Originally filed in MSFT-41390832
:tada:This issue was addressed in #14221, which has now been successfully released as Windows Terminal v1.15.2874
.:tada:
Handy links:
Closing the bug as issue is fixed on the latest build: Windows Terminal Preview Version: 1.17.3052.0
:tada:This issue was addressed in #14221, which has now been successfully released as Windows Terminal Preview v1.16.3463.0 and v1.16.3464.0
.:tada:
Handy links: