Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that winforms doesn't beep when confirming content. #2374

Merged
merged 3 commits into from Feb 5, 2024

Conversation

freakboy3742
Copy link
Member

@freakboy3742 freakboy3742 commented Feb 4, 2024

Reported via @ethindp on Discord.

Pressing enter in a TextInput under Winforms generates a system beep. This is the default behaviour for an Enter keypress in a TextInput; however, in Toga's case, it's undesirable.

This PR marks the event as processed when Enter is pressed, so that the event doesn't propagate any further, preventing the beep.

I can't think of any reliable way to test this, as we can't monitor for the existence of a system beep, and we don't have visibility on the processing of system events.

It wasn't detected previously (at least, in my case) because the VM I use to test Windows didn't have a speaker connected, so I didn't hear system beeps.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@mhsmith mhsmith merged commit da48449 into beeware:main Feb 5, 2024
13 of 14 checks passed
@freakboy3742 freakboy3742 deleted the winforms-beep-on-confirm branch February 5, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants