Bug 444122 - Keyboard layout is not correctly set for XWayland clients. Probably related to #444012
Summary: Keyboard layout is not correctly set for XWayland clients. Probably related t...
Status: RESOLVED DUPLICATE of bug 444012
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keyboard (show other bugs)
Version: 5.23.1
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-20 15:58 UTC by Victor Sanchez
Modified: 2021-10-21 16:45 UTC (History)
2 users (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 Victor Sanchez 2021-10-20 15:58:32 UTC
SUMMARY
Apps running under XWayland have a different keyboard layout assigned than Wayland apps. This apparent in chromium based applications that cannot be run under wayland still (the common fix of using the Ozone layer is not working AKAIK).

STEPS TO REPRODUCE
1. Set the keyboard layout to Latin American
2. Open a terminal, setxkmap -print -verbose 10
3. The keyboard layout is "es" not "latam"
4 setxkmap latam "fixes" the layout but must be done after each login.

OBSERVED RESULT


EXPECTED RESULT
Both Wayland and XWayland must have the same layout.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Andrey 2021-10-20 16:28:04 UTC
Does it work if you reopen XWayland window after reconfiguring layouts?
Comment 2 Victor Sanchez 2021-10-20 17:08:40 UTC
Hmm, changing in kcm_layout the layout to "us" (from "latam") changes the layout also for XWayland (in this case an electron app). However setkbmap keeps printing that the keyboard map is "latam".... (!)
Comment 3 Nate Graham 2021-10-21 12:57:53 UTC
Same issue as Bug 444012?
Comment 4 Victor Sanchez 2021-10-21 13:19:07 UTC
It seems to me. I asked and he was also running in wayland and the problem is not there in X11. He used google chrome as an example of the program with problems. By default that program runs (in kubuntu 21.10) in XWayland. You can force it to run in wayland using the Ozoneplatform and then it uses the correct keymap. (BTW this does not work with electron based apps that use chromium, trying to use the Ozone platform gives an error). 

The same can be said of thunderbird. Running it in Xwayland vs forcing it to run under wayland (using MOZ_ENABLE_WAYLAND=1).
Comment 5 Nate Graham 2021-10-21 16:45:27 UTC
*** This bug has been marked as a duplicate of bug 444012 ***