Fix: Suppress Asterisk sound on Alt+Enter by handling WM_MENUCHAR - #18815
Merged
Conversation
…les-community#18472) Alt+Enter (Properties) triggers WM_MENUCHAR inside DefWindowProc's menu-tracking code since there's no matching mnemonic, which plays the system Asterisk sound. WM_MENUCHAR is sent directly to the window proc rather than posted through the thread's message queue, so it's handled in the existing WindowManager subclass callback alongside WM_WINDOWPOSCHANGING, returning MNC_CLOSE to suppress the beep.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 661a0b6b78
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Member
|
I'm having trouble reproducing the issue so I can't confirm if this resolves it. @Josh65-2201 can you reproduce the issue on your end? |
Josh65-2201
previously approved these changes
Aug 13, 2026
- Generate MENUCHARRESULT via CsWin32 instead of hand-typed constants - Remove WM_MENUCHAR and MNC_CLOSE from Win32PInvoke.Consts.cs - Limit WM_MENUCHAR suppression to Enter key only to avoid closing menus on unmatched keystrokes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause: Alt+Enter (Properties) triggers WM_MENUCHAR inside DefWindowProc's menu-tracking code since there's no matching mnemonic, which plays the system Asterisk sound.
Fix: WM_MENUCHAR is sent directly to the window proc rather than posted through the thread's message queue, so it's handled in the existing WindowManager subclass callback alongside WM_WINDOWPOSCHANGING, returning MNC_CLOSE to suppress the beep.
Resolved / Related Issues
To prevent extra work, all changes to the Files codebase must link to an approved issue marked as
Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.Steps used to test these changes
Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.