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

Enable key events during IME composition #11842

Closed
wants to merge 1 commit into from

Conversation

slouken
Copy link
Collaborator

@slouken slouken commented Jan 4, 2025

Fixes #10486

@slouken slouken marked this pull request as draft January 4, 2025 00:59
@slouken
Copy link
Collaborator Author

slouken commented Jan 4, 2025

@Kontrabant, can you help me with this one on Linux?

@Kontrabant
Copy link
Contributor

The checks that filter key presses if an IME is active are simple to remove, but the problem is that some desktops eat the key events themselves if a compose sequence is active, so the key events just never arrive in the first place. I know Gnome eats key presses, not sure about KDE or wlroots based ones.

@Kontrabant
Copy link
Contributor

Kontrabant commented Jan 5, 2025

I checked again with testime, and X11 already passes through key events even for dead keys on both Gnome and KDE. On Wayland, with text input active:

  • By default, Gnome eats keys that are part of dead-key composition sequences or IME
  • By default, KDE passes dead keys as part of composition sequences for Latin character layouts (e.g. accented characters on US international with dead keys), but keys are eaten as soon as something like IBus+Anthy is in use.

In short, Linux backends already pass key events though if they get them, but it's not guaranteed that they will always get them since an IME can eat them first, and we have no control over that.

@slouken
Copy link
Collaborator Author

slouken commented Jan 12, 2025

It turns out that some platforms just don't provide key events for IME composition (Wayland, among others) and in general you shouldn't be assuming that key events will come through for all text input. The original bug is going to be resolved a different way, so we'll go ahead and close this.

@slouken slouken closed this Jan 12, 2025
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.

SDL stops sending key events if key compositions/ime ui related actions are being processed
2 participants