propagate keyDown events on macOS if they are not handled in Avalonia - #20944
propagate keyDown events on macOS if they are not handled in Avalonia#20944RaoulSeifertEnscape wants to merge 3 commits into
Conversation
|
You can test this PR using the following package version. |
|
|
@cla-avalonia agree |
|
You can test this PR using the following package version. |
|
You can test this PR using the following package version. |
|
First, key handling on macOS has been reworked with #21906, so this PR needs to be rewritten. Second, the changes should be conditional on whether there's really another responder. Otherwise, the default handler will just produce an annoying beep if the key is unhandled, which wasn't the case previously. Third, the PR doesn't handle everything: modifier keys in a textbox aren't passed to the next responder, even if Avalonia doesn't handle them, which is inconsistent. For all these reasons, I'm closing the PR. |
What does the pull request do?
This PR adds default keyDown event handling for keyDown events that were not handled in Avalonia.
What is the current behavior?
Currently all keyDown events are consumed and none are forwarded to the nextResponder.
What is the updated/expected behavior with this PR?
With these changes the keyDown events that were not handled in Avalonia will be passed along the responder chain
How was the solution implemented (if it's not obvious)?
Should be obvious, as only simple calls to `[super keyDown:event] where added under the condition that handleKeyDown returns false.
Fixed issues
Fixes #20943