Bug 510454

Summary: Incorrect keyboard layout of Maliit keyboard in X11 or Wine apps
Product: [Plasma] kwin Reporter: Thomas <thomas.gfeller>
Component: virtual-keyboardAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screencast to show the behavior with stock Kubuntu 25.10:

Description Thomas 2025-10-10 12:50:36 UTC
SUMMARY
Maliit virtual keyboard produces incorrect character mappings in X11/XWayland applications (e.g., "." outputs ":" instead).

STEPS TO REPRODUCE
1. Launch an X11 application through XWayland (e.g., xterm)
2. Activate Maliit virtual keyboard
3. Type characters such as "." or other punctuation/symbols

OBSERVED RESULT
Wrong characters are produced. For example, typing "." outputs ":" instead. Multiple other character substitutions occur. Testing with "xev" confirms incorrect characters are being sent at the X11 protocol level.

EXPECTED RESULT
Maliit virtual keyboard should produce the same correct character mappings in X11/XWayland applications as it does in native Wayland applications and as physical keyboards do in all applications.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 24.04
KDE Plasma Version: 5.27.12
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Session: Wayland

ADDITIONAL INFORMATION
- Physical keyboard input works correctly in all applications (both Wayland and X11)
- Maliit keyboard works correctly in native Wayland applications
- Issue only affects Maliit keyboard when used with X11/XWayland applications
- Problem appears to be in the Wayland-to-X11 translation layer within KWin's XWayland handling
- Maliit-Developers directed us towards kwin: https://github.com/maliit/keyboard/issues/253

We're using this framework in this scope: https://www.galaxus.ch/en/page/mini-but-mighty-the-mini-computers-getting-the-job-done-22049

We're currently lacking the skills to debug this issue in reasonable technical depth. We're willing to provide debugging logs, configuration files, or any other diagnostic information needed. Additionally, we're prepared to finance a bounty to help prioritize fixing this issue upstream (for the community - not (just) for us). Please advise on next steps for both debugging assistance and bounty arrangement.
Comment 1 David Edmundson 2025-10-10 14:04:34 UTC
>KDE Plasma Version: 5.27.12

The 5.27 series is now quite old.

I relatively recently cleaned up a lot of input method handling so you can even inject UTF-8 and emoticons into X11 apps and have them work just fine.

cb15cb8b52e7ddf175d671d2d78f947a1b83a91d in kwin is the most relevant.

If you can upgrade your platform, or at least confirm on a live ISO that things are working, out that would be best. 
If you need a 5.27 patch we can sort that out, I don't think we're making any new 5.27 releases at this point.
Comment 2 Thomas 2025-10-13 09:38:48 UTC
Created attachment 185732 [details]
Screencast to show the behavior with stock Kubuntu 25.10:

kubuntu@kubuntu:~$ kinfo
Operating System: Kubuntu 25.10
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.2
Kernel Version: 6.17.0-5-generic (64-bit)
Graphics Platform: offscreen
Processors: 8 × Intel® Core™ i5-10210U CPU @ 1.60GHz
Memory: 16 GiB of RAM (15.3 GiB usable)
Comment 3 David Edmundson 2025-10-13 09:51:29 UTC
reopening. I'll check Maliit
Comment 4 Thomas 2025-10-16 09:58:29 UTC
Thank you so much! We're here to help however we can—whether that's supporting testing efforts, working out a bounty agreement, or sponsoring KDE. Just let us know!
Comment 5 David Edmundson 2025-10-16 12:08:28 UTC
Maliit on master (soon to be 6.5)  is working correctly for me.

The commit I referenced above to fix it isn't in 6.4 which would be why it didn't work for you.
https://invent.kde.org/plasma/kwin/-/commit/cb15cb8b52e7ddf175d671d2d78f947a1b83a91d

I don't think there's much left to do from an upstream POV. 
We can maybe backport to 6.4, 5.27 is really only getting security fixes at this point, but locally patching your kwin's is an option.
Comment 6 Thomas 2025-10-21 12:34:24 UTC
(In reply to David Edmundson from comment #5)
> Maliit on master (soon to be 6.5)  is working correctly for me.
> 
> The commit I referenced above to fix it isn't in 6.4 which would be why it
> didn't work for you.
> https://invent.kde.org/plasma/kwin/-/commit/
> cb15cb8b52e7ddf175d671d2d78f947a1b83a91d
> 
> I don't think there's much left to do from an upstream POV. 
> We can maybe backport to 6.4, 5.27 is really only getting security fixes at
> this point, but locally patching your kwin's is an option.

Hi David,

Thank you very much for your response. We managed to hack together our environment using Ubuntu 24.04 with the upstream repos from KDE neon (unstable) which itself is based on Ubuntu 24.04. That works!

We can also confirm that the character mismatch issue is indeed fixed in the KDE neon unstable releases.

Thanks again!