Modifers get re-latched when dead key input completes (Wayland)
Steps to reproduce
- Use a keyboard layout that has both dead keys and latching modifiers. One possibility (for testing) is the
us+altgr-intl
layout with optionslv3:bksl_switch_latch
andlv3:caps_switch_latch
. To enable this on GNOME:- Open Settings → "Keyboard" → "Add input source" → "English (United States)" → "English (intl., with AltGr dead keys)"
- Switch to that layout
- Open Tweaks → "Keyboard" → "Additional Layout Options" → "Key to choose the 3rd level" → Enable "Backslash; acts as onetime lock when pressed together with another 3rd level chooser" and "Caps Lock; acts as onetime lock when pressed together with another 3rd-level chooser"
- Launch a GTK app with any sort of text entry field under Wayland (does not reproduce in XWayland), and start inputting text into the app.
- Use a latched modifier to input a dead key into the GTK app. (For example, with the layout described above, press Caps Lock and Backslash simultaneously, release them both, and then press and release the quote key to get
dead_acute
.) - Input (press and release) a letter to complete the dead key sequence (for example "a", to emit "á" with our running example). The modifier previously latched should not affect the outcome of this step.
- Press any key (for example, the "s" key).
Current behavior
The latch from step 3 mysteriously returns to affect the outcome of step 5. In our running example, "ß" is emitted.
Expected outcome
The latched modifier was unlatched at the end of Step 3, so should have no effect on the outcome of step 5. In our running example, "s" should be emitted. (This is the behavior in non-GTK apps and with GDK_BACKEND=x11
.)
Version information
- GTK 4.16.5, 3.24.43
- Fedora 41 Workstation
- Wayland, GNOME session w/
ibus
,GTK_IM_MODULE
not set orwayland
Edited by Jules Bertholet