Bug 482711

Summary: On Wayland, keyboard layout switches to US English after typing one character
Product: [Plasma] plasmashell Reporter: Simone Lazzaris <simone>
Component: Keyboard LayoutAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: butirsky, garirry, nate
Priority: NOR Keywords: wayland
Version: 6.0.1   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=482593
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Simone Lazzaris 2024-03-07 13:18:26 UTC
SUMMARY
I have a keyboard with an Italian layout, and I used to use Italian keyboard mapping. I've upgraded to KDE6 and now I'm stuck with the English layout.

STEPS TO REPRODUCE
1. Go to system settings -> keyboard -> mappings
2. Enable keyboard mapping
3. Add any mapping (I've tried Italian and German)
4. Click on `apply`
5. Try to enter text using non-alphanumeric characters, and see that you're still using English layout

Note that the OSD display shows the correct language if/when "switching" layout using the meta/alt/k combo. The systray indicator, instead, always says "EN".

OBSERVED RESULT


EXPECTED RESULT


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

ADDITIONAL INFORMATION
Comment 1 Simone Lazzaris 2024-03-07 13:25:54 UTC
Also note that in the system config tool, the `label` field for the mappings is shown as a couple of rectangles (like unicode missing glyphs)
Comment 2 Simone Lazzaris 2024-03-07 14:19:23 UTC
Logging out and logging back in didn't fix anything (rif. bug 482593)
Comment 3 Simone Lazzaris 2024-03-07 14:57:13 UTC
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Archlinux
(available in About System)
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Comment 4 Simone Lazzaris 2024-03-07 14:58:54 UTC
Update: keyboard mapping is working in X11 based applications: I've tried xterm and mattermost desktop and the keys are in the correct nationalization.
Comment 5 Simone Lazzaris 2024-03-07 18:59:12 UTC
Another update: the very first keystroke sent to a new application is actually correct: the character typed is the one corresponding to my selected mapping. But only the first one; all subsequent characters are taken from the US layout.
Very very odd
Comment 6 Nate Graham 2024-03-08 22:36:28 UTC
Very odd indeed. It feels like two things are competing for keyboard control. Does this happen in a new clean user account?
Comment 7 Simone Lazzaris 2024-03-08 23:47:40 UTC
No, on a clean account  I can use the first mapping (Italian in my case).
I still can't switch mapping, I'll try to see if that still persist after a reboot.
Comment 8 Garirry 2024-03-09 16:57:04 UTC
I have a similar issue on X11. Sometimes it is possible to switch to another language but it resets when clicking out of the textbox, sometimes it switches back after typing one character, and other times it is impossible to switch. I found out also that keeping a single non-English layout sometimes causes US English to re-add itself in the layout settings.
Comment 9 Nate Graham 2024-03-10 22:12:10 UTC
Can you be very precise about how exactly you're switching layouts?
Comment 10 Simone Lazzaris 2024-03-11 13:46:53 UTC
After a reboot, the language indicator in the systray area works, I can switch languages clicking on it or using the hotkeys.
It seems that you need to restart plasma to make that indicator works as intended.
Comment 11 Simone Lazzaris 2024-03-11 13:51:10 UTC
So, to recap:
- existing user, upgraded from kde5 to kde6: keyboard stuck in US English using wayland, works using X11
- new user, on wayland, without a restart: first mapping works immediately after being configured, indicator in systray area not present, can't switch using hotkeys (alt-meta-k in my case)
- new user, on wayland, after a plasma restart: everything works
Comment 12 Nate Graham 2024-03-11 16:11:48 UTC
It sounds like most of these issues are just Bug 449531. The issue with existing user configuration is probably not anything we can do anything about unfortunately. The good news is that Bug 449531 is in progress, so let's get that fixed and then follow up using on any remaining issues once that's done using new bug reports. Thanks!

*** This bug has been marked as a duplicate of bug 449531 ***