Bug 483809 - Certain special keys on the virtual keyboard don't map to the correct key in Chrome
Summary: Certain special keys on the virtual keyboard don't map to the correct key in ...
Status: ASSIGNED
Alias: None
Product: kwin
Classification: Plasma
Component: virtual-keyboard (other bugs)
Version First Reported In: 6.0.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-17 04:54 UTC by Devin Lin
Modified: 2024-10-13 19:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Lin 2024-03-17 04:54:52 UTC
SUMMARY
Please let me know if this is an issue we actually should be reporting with maliit-keyboard or chromium. However, this doesn't seem to occur on Phosh which makes me believe it could be maliit or KWin specific.

Original issue: https://invent.kde.org/teams/plasma-mobile/issues/-/issues/283

"
If I open Bitwarden on my PinePhonePro using Manjaro and Phosh I can type my email in the login screen, including the period in ".com". If I reboot into pmOS Edge with Plasma 6.0.2 and open BitWarden, when I type in the email address, instead of a period, the keyboard types the > symbol instead. Some other characters type incorrectly as well, eg / becomes ?, \ becomes |, ; becomes :. Notably all the problematic characters seem to be on the bottom row of the keyboard when using the symbol layout.
"

I did further triaging and all Electron based apps and Chrome itself exhibit this behaviour. It persists when starting Chrome in Wayland as well.

STEPS TO REPRODUCE
1. Open Chrome or an Electron app
2. Focus on a text field (bringing up the vkbd)
3. Type "/"

OBSERVED RESULT
It inputs "?"

EXPECTED RESULT
It inputs "/"

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: postmarketOS 
(available in About System)
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6
Qt Version: 6.6
Comment 1 Devin Lin 2024-03-17 15:41:18 UTC
Starting the app (chromium/electron) with the --enable-wayland-ime and --ozone-platform-hint=auto flags fixes it.

I suspect it's a bug with the vkbd when invoked on an app that doesn't support the text input protocols
Comment 2 Devin Lin 2024-03-17 15:42:54 UTC
Phosh's keyboard apparently uses https://wayland.app/protocols/virtual-keyboard-unstable-v1 for anything other than text-input-v3, I'm not sure how kwin does it
Comment 3 Bug Janitor Service 2024-03-17 16:18:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kclock/-/merge_requests/117
Comment 4 Martin D 2024-08-10 09:31:24 UTC
Been experiencing this in Plasma Mobile 6.1.4, most notably in applications created by the Web Apps application, and the login for Spot. For information, in these applications, the keyboard does not appear automatically when interacting with the text field but needs to be brought up manually from the nav bar.

Some symbols appear to type as their non-shift keyboard counterparts; $ as 4, ( as 9, ? as / etc. Other symbols such as £ don't give any input at all. This makes it at best highly impractical to enter email addresses or passwords with special characters.
Comment 5 Rodney Dawes 2024-10-13 19:17:17 UTC
> I suspect it's a bug with the vkbd when invoked on an app that doesn't support the text input protocols

It's due to kwin translating from a Wayland IME to key codes to send to clients that don't support Wayland IME. It seems like, at least in the cases I've seen described of this, that the modifier is getting lost for characters that are shifted inputs. I'm not sure if the issue itself is in kwin or chrom{e,ium} though, as so far it seems to be the main client which results in these complaints, hence the need for --enable-wayland-ime to fix it.