Bug 455827

Summary: advanced keyboard settings are ignored in applications running under XWayland
Product: [Applications] systemsettings Reporter: Derick <dwt>
Component: kcm_keyboardAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: butirsky, dev, dwt, kde, nate
Priority: NOR Keywords: wayland-only
Version First Reported In: 5.25.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Derick 2022-06-23 05:10:47 UTC
SUMMARY
***
Using advanced keyboard settings (specifically swap esc and caps lock) do not seem to do anything for applications running under xwayland.
***


STEPS TO REPRODUCE
1. Toggle on swap esc and caps lock in settings
2. Open application running under Xwayland (e.g. discord)
3. Press Caps lock

OBSERVED RESULT
Caps lock is toggled on.

EXPECTED RESULT
pressing Caps lock should have sent Esc

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

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-06-23 12:49:36 UTC
Cannot reproduce. What distro are you using? Can you upgrade to Plasma 5.25 and see if it works there?
Comment 2 Derick 2022-06-23 18:26:37 UTC
(In reply to Nate Graham from comment #1)
> Cannot reproduce. What distro are you using? Can you upgrade to Plasma 5.25
> and see if it works there?

Using fedora 36. Issue still there on 5.25.
Comment 3 Derick 2022-06-24 06:36:19 UTC
Oddly enough, re-toggling the setting seemed to have fixed the issue...Originally, I had just kept the setting on and just swapped between X11 and Wayland.
Comment 4 Andrey 2022-06-24 08:49:23 UTC
Can you try to reproduce it again?
Comment 5 Derick 2022-06-24 10:27:00 UTC
I can reproduce this reliably enough now.

1. Start from an X11 session. Toggle swap esc & caps lock on.
2. logout from X11 session (I think this also shows up after reboot too)
3. Log in to wayland session.
4. open Xwayland application.
5. Swap esc & caps lock does not work in Xwayland application.
Comment 6 Andrey 2022-06-24 12:17:51 UTC
Should the workaround with reset you've found be applied in X11, Wayland session or it's indifferent?
Comment 7 Derick 2022-06-24 17:54:15 UTC
(In reply to Andrey from comment #6)
> Should the workaround with reset you've found be applied in X11, Wayland
> session or it's indifferent?

Wayland session
Comment 8 Derick 2022-06-27 21:45:20 UTC
It turns out that the settings - as applied to Xwayland applications - do not survive a reboot. Therefore, all I need to do to trigger this issue is to just have the swap escape setting toggled on in a wayland session, and the next time I power on the computer and log in to the wayland session, the setting is not applied to Xwayland applications, despite working everywhere else.
Comment 9 Bug Janitor Service 2022-07-12 04:36:46 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 David Edmundson 2024-09-20 09:41:30 UTC
I cannot reproduce even with the reboot step.

XWayland gets the keyboard layout and caps lock state from the wayland server, so the only way they can be out of sync is with an XWayland bug. 
Can you also confirm which X11 app you were using. I tested 'kwrite --platform xcb'
Comment 11 Bug Janitor Service 2024-10-05 03:47:16 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2024-10-20 03:47:37 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.