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

Dead key doesn't trigger KeyDown on macOS #12483

Closed
MrJul opened this issue Aug 8, 2023 · 2 comments
Closed

Dead key doesn't trigger KeyDown on macOS #12483

MrJul opened this issue Aug 8, 2023 · 2 comments

Comments

@MrJul
Copy link
Member

MrJul commented Aug 8, 2023

Describe the bug
The KeyDown event isn't raised for dead key presses in macOS, but the KeyUp event is.

To Reproduce
Press then release a dead key, for example ^ on an AZERTY keyboard.

Expected behavior
Both KeyDown and KeyUp events are raised.

Additional context
macOS Ventura

The dead key press results in setMarkedText being called, marking the key as handled, preventing the event for being triggered: https://github.com/AvaloniaUI/Avalonia/blob/655f199647c36b16cad24d68b14f38380c70c8ed/native/Avalonia.Native/src/OSX/AvnView.mm#L602C5-L602C21 (introduced by #11021)

@Gillibald
Copy link
Contributor

I think we can add an additional check for that flag. We only need to set if if marked text actually has any content and content has changed

@MrJul
Copy link
Member Author

MrJul commented Aug 17, 2023

Fixed by #12560

@MrJul MrJul closed this as completed Aug 17, 2023
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