Bug 488121 - Keyboard layout switching doesn’t work correctly on Wayland
Summary: Keyboard layout switching doesn’t work correctly on Wayland
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: libinput (show other bugs)
Version: 6.0.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-06 17:15 UTC by ariasuni
Modified: 2024-07-10 15:59 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 ariasuni 2024-06-06 17:15:53 UTC
SUMMARY
When switching keyboard layout under Wayland, typing text in a native Wayland app still uses the previous/main layout, but keyboard shortcuts work correctly in Wayland apps.

STEPS TO REPRODUCE
1. Configure two keyboard layouts
2. Switch layout with the applet or keyboard shortcut
3. Test input and keyboard shortcut in a native Wayland app, and a XWayland app

OBSERVED RESULT
In native Wayland apps, typing still uses the previous layout (e.g. when switching from Bépo to French (variant), the layout is still bépo) while keyboard shortcuts uses the current layout (e.g. Ctrl+C with C at his position in the French (variant) layout works). Restarting the app after layout switch layout doesn’t work either.

Everything works correctly in apps run under XWayland.

EXPECTED RESULT
In native Wayland apps, typing use the current layout after switching, not only keyboard shortcuts.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.3-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-06-07 14:48:12 UTC
I can't reproduce the issue as described. Can you try this again in a new clean user account? If it works there, that would suggest that some customization in your current user account is causing the issue.
Comment 2 Bug Janitor Service 2024-06-22 03:47:53 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 3 Bug Janitor Service 2024-07-07 03:47:34 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!
Comment 4 ariasuni 2024-07-10 15:59:59 UTC
The problem happens when using IBus as a virtual keyboard. The IBus feature «Use system keyboard layout» doesn’t work under Wayland. I think it’s confusing that you can change the keyboard layout even when IBus is controlling it tho, and wondering if there’s a way for Plasma to make it less confusing for users. It would be nice if the keyboard switching thing was somehow disabled if IBus is already controlling that feature, for example.

See: https://github.com/ibus/ibus/issues/2661