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

EditNetSpell: Avoid unhandled-key sound for cursor keys #10730

Merged
merged 2 commits into from Feb 22, 2023

Conversation

mstv
Copy link
Member

@mstv mstv commented Feb 17, 2023

Fixes #10715

Proposed changes

Mark cursor key presses as handled if the EditNetSpell's RichTextBox will not handle them
in order to suppress the unhandled-key sound ("ding")
primarily when editing the commit message
This is done in dependency on the current cursor position because the KeyEventArgs.Handled flag is not set (yet) if the RichTextBox handles the key.

Test methodology

  • manual

Test environment(s)

  • Git Extensions 33.33.33
  • Build 6400348
  • Git 2.39.0.windows.1
  • Microsoft Windows NT 10.0.19045.0
  • .NET 6.0.12
  • DPI 96dpi (no scaling)
  • Microsoft.WindowsDesktop.App Versions
    Microsoft.WindowsDesktop.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

@RussKie
Copy link
Member

RussKie commented Feb 17, 2023 via email

@mstv
Copy link
Member Author

mstv commented Feb 18, 2023

What's the lifetime of EditNetSpell?

The same as the injected RichTextBox.
The event handlers reference it.

@mstv
Copy link
Member Author

mstv commented Feb 19, 2023

What's the lifetime of EditNetSpell?

The same as of the injected RichTextBox. The event handlers reference it.

Does this cause problems, @RussKie?

@RussKie
Copy link
Member

RussKie commented Feb 19, 2023 via email

@mstv
Copy link
Member Author

mstv commented Feb 22, 2023

I want to merge this soon in order to resolve the regression caused by the first attempt #10715. All PR builds are affected: The cursor keys do not work in the commit message editor.
Can I get approvals?

@mstv mstv merged commit fc704e2 into gitextensions:master Feb 22, 2023
@ghost ghost added this to the vNext milestone Feb 22, 2023
@mstv mstv deleted the fix/pr10715_silent_edit branch February 22, 2023 22:29
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