Bug 478048 - Cannot configure Win as a modifier to change keyboard layout in X applications running in XWayland
Summary: Cannot configure Win as a modifier to change keyboard layout in X application...
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: input (other bugs)
Version First Reported In: 6.3.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-04 14:27 UTC by Éric Brunet
Modified: 2025-03-17 22:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.