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

KeyUp is raised after TextInput when the IME is enabled on macOS #18226

Open
MrJul opened this issue Feb 17, 2025 · 1 comment
Open

KeyUp is raised after TextInput when the IME is enabled on macOS #18226

MrJul opened this issue Feb 17, 2025 · 1 comment

Comments

@MrJul
Copy link
Member

MrJul commented Feb 17, 2025

Describe the bug

On macOS, pressing a letter key when the IME is active raises the TextInput event, then the KeyUp event.
Since KeyDown is never raised (as expected in this case), ideally we shouldn't raise KeyUp either.

To Reproduce

Press any letter key inside a TextBox on macOS.

Expected behavior

Only TextInput is raised, not KeyUp.

Avalonia version

11.2.4, master afa124f

OS

macOS

Additional context

No response

@Gillibald
Copy link
Contributor

https://github.com/AvaloniaUI/Avalonia/blob/master/native/Avalonia.Native/src/OSX/AvnView.mm#L658

We probably want to track _keyDownConsumedByInputContext or something _lastKeyDownEvent might also be useful. We might want to set _lastKeyDownEvent inside the keyUp handler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants