Skip to content

wayland: Fix keymap changed event spam with non-latin keyboard layouts #13092

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

Merged
merged 1 commit into from
May 21, 2025

Conversation

Kontrabant
Copy link
Contributor

The function SDL_GetCurrentKeymap() would return null instead of the actual bound keymap for non-latin layouts if certain mapping options were set. Add a parameter to ignore the keymap options and always return the actual bound keymap, which is needed in the Wayland backend to avoid spamming keymap changed events on every keystroke with certain layouts.

Fixes #13089

The function SDL_GetCurrentKeymap() would return null instead of the actual bound keymap for non-latin layouts if certain mapping options were set. Add a parameter to ignore the keymap options and always return the actual bound keymap, which is needed in the Wayland backend to avoid spamming keymap changed events on every keystroke with certain layouts.
@Kontrabant Kontrabant merged commit 20e8ac0 into libsdl-org:main May 21, 2025
2 checks passed
@Kontrabant Kontrabant deleted the wl_keymap branch May 21, 2025 15:55
@Kontrabant
Copy link
Contributor Author

To note, this is only needed for the multi-seat code in the main branch, so no backporting required.

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.

SDL3 Wayland: SDL_EVENT_KEYMAP_CHANGED spam when typing in Russian
1 participant