Bug 478048

Summary: Cannot configure Win as a modifier to change keyboard layout in X applications running in XWayland
Product: [Plasma] kwin Reporter: Éric Brunet <eric.brunet>
Component: inputAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: xaver.hugl
Priority: NOR    
Version First Reported In: 6.3.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Éric Brunet 2023-12-04 14:27:21 UTC
I am using KDE+Wayland on a fully uptodate Fedora 39 laptop.
My `.config/kxkbrc` file looks like this:
```
[$Version]
update_info=kxkb.upd:remove-empty-lists,kxkb.upd:add-back-resetoptions,kxkb_variants.upd:split-variants

[Layout]
DisplayNames=,
LayoutList=fr,gr
Options=grp:win_switch,compose:rctrl,terminate:ctrl_alt_bksp
ResetOldOptions=true
Use=true
VariantList=oss,polytonic
```
With the `grp:win_switch` setting, while I press the "Windows" key of my laptop, the keyboard layout is changed to greek. (So that `Win+d` gives `δ`, for instance.)

This works very well, except in X applications running under XWayland. Then, this specific shortcut does not work. Hitting `Win+d` only gives `d`. I have tried xterm and thunderbird. (Nota: I don't care about xterm, but I'd like to have thunderbird for X working. I cannot, unfortunately, use thunderbird for wayland as I have an extension which only works with the X version.)

Note that other shortcuts are working fine. For instance, as can be seen in my `.kxkbrc`, I configured the right Ctrl key to work as Compose, and this works perfectly in wayland and X applications. I have many personal shortcuts defined in a .XCompose file which work perfectly well.

(As a workaround, I tried to add the option `grp:lctrl_lwin_toggle` to my `.kxkbrc`, but then I hit another bug, see bug  478046.)

To summarize, I think that keyboard should behave in the same way under native wayland applications and X applications. It is nearly the case but, unfortunately, some options such as `grp:win_switch` do not work in X applications under XWayland.
Comment 1 Zamundaaa 2025-03-17 22:26:58 UTC
Can confirm.