Fix alt+space opening system menu and sending keys to terminal#10988
Conversation
|
Isn't this equal to having a default key binding for Alt+Space which is bound to a no-op action? |
|
Here's a really silly thought. What if we just add a new "openSystemMenu" binding? We could be done with this whole issue and allow people to re-bind it to whatever they want! All we'd need to do is move |
|
Perhaps there's a nod to #5833 somewhere in there... but that is a CONSOLE workitem. Hm. |
that's a good idea |
Sounds good to me! Added a work item for it for 1.12 |
|
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
DHowett
left a comment
There was a problem hiding this comment.
I am okay with this solution -- it's targeted and specific, but it does rely on explicit unbinding. I don't love that, but it's better than the alternative.
Piping input directly into the terminal using one of the direct input listeners is always going to be fraught with peril.
@PankajBhojwani, alt+space works for the menu when you do this? Excellent.
zadjii-msft
left a comment
There was a problem hiding this comment.
Okay yea lets do this for now, but openSystemMenu is definitely the better solution here long-term
## Summary of the Pull Request Basically undoes #10988 in favour of implementing it as described in #11018 ## PR Checklist * [x] Closes #11018 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [X] Tests added/passed * [X] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [X] Schema updated. * [x] I work here ## Validation Steps Performed - alt+space opens the system menu by default - when alt+space is bound, the keys do not get send to terminal - right-click on the tab bar didn't break (still opens system menu at the location of the cursor)
If both of the following are true
Then the window procedure will handle the alt+space to open up the context menu.
In this case, we need to make sure we don't send the keys to terminal.
Closes #10935