Bug 500032 - The "Legacy X11 App Support" setting does not work correctly with a different keyboard layout!
Summary: The "Legacy X11 App Support" setting does not work correctly with a different...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: xwayland (show other bugs)
Version: 6.3.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-13 21:34 UTC by Жора Змейкин
Modified: 2025-02-20 15:57 UTC (History)
6 users (show)

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


Attachments
Demonstration (1.35 MB, video/mp4)
2025-02-13 21:34 UTC, Жора Змейкин
Details
Demonstration №2 (3.10 MB, video/mp4)
2025-02-19 19:50 UTC, Roman
Details
Demonstration 3 (2.14 MB, video/mp4)
2025-02-20 15:44 UTC, cuberbug
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Жора Змейкин 2025-02-13 21:34:12 UTC
Created attachment 178323 [details]
Demonstration

SUMMARY
The bug only appears when using a different keyboard layout (e.g., Russian). If you select any option other than "Never", XWayland apps continue to receive all keystrokes. The bug does not appear on the English layout.

STEPS TO REPRODUCE
1. Open System Settings, go to Application Permissions → Legacy X11 App Support
2. Set it to "Only Meta, Control, Alt and Shift keys"
3. In Keyboard, add a new layout (for example, Russian)
4. Open Konsole and enter: xinput test-xi2 --root
5. Switch to the English layout and try to type something. The command will not output anything
6. Switch to a different keyboard layout and try to type something. The command will start outputting your keystrokes.

OBSERVED RESULT
Keystrokes are sent to XWayland applications

SOFTWARE/OS VERSIONS
Operating System: ALT Regular KDE
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.7.2
Kernel Version: 6.13.2-6.13-alt1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-5200U CPU @ 2.20GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 5500

ADDITIONAL INFORMATION
I'm attaching a video demonstration. I consider this a rather serious bug that slightly compromises security and interferes with some virtual machines (for example, VMware Workstation intercepts all keystrokes even when its window is out of focus).
Comment 1 Nate Graham 2025-02-19 15:21:32 UTC
Thanks for the screen recording and the detailed steps to reproduce. Nonetheless, when I follow your steps, everything works fine with both keyboard layouts.
Comment 2 Жора Змейкин 2025-02-19 19:17:26 UTC
(In reply to Nate Graham from comment #1)
> Nonetheless, when I follow your steps, everything works fine with both

This is strange. Maybe the issue does not appear in Plasma 6.3 and Frameworks 6.11. I tested this bug on a system with Russian localization and both Russian and English keyboard layouts.

Anyway, I will ask others to test it—perhaps more details will emerge. Thank you for testing!
Comment 3 Roman 2025-02-19 19:50:48 UTC
Created attachment 178607 [details]
Demonstration №2
Comment 4 Roman 2025-02-19 20:10:30 UTC
Hi. The comment is written using DeepL Translate
I found this issue when using vmware which is running through XWayland, video Demonstration #2 attached. Note these points as to why the problem may not be reproducible:
- It doesn't seem to work if you explicitly click on some window other than vmware. On my system, the focus follows the cursor
- In vmware, input must be captured, i.e. Ctrl+Alt cannot be pressed. 
- it doesn't work on English layout
- Sometimes it doesn't work and I don't know why.

Also:
- Only the letters themselves are transferred, special characters, numbers and space are not transferred to Xwayland
- The problem goes away completely if I set “Allow legacy X11 apps to read keystrokes typed in all apps” to “Never”

Information about my system
Operating System: Arch Linux with CachyOS repos
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.12.13-1-cachyos-lts (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7530U with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: Zenbook UM3402YAR_UM3402YA
System Version: 1.0
Comment 5 idk 2025-02-20 08:50:01 UTC
hi! I was able to reproduce the bug too. the bug only appears on a layout other than English (in my case, Russian)

my system:
Operating System: EndeavourOS 
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.2-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × Intel® Xeon® CPU E5-2640 v3 @ 2.60GHz
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 470 Graphics
Comment 6 cuberbug 2025-02-20 15:44:49 UTC
Created attachment 178640 [details]
Demonstration 3
Comment 7 cuberbug 2025-02-20 15:57:27 UTC
Hello! I was also able to reproduce the error that occurs with keyboard layouts other than English. A demonstration can be seen in the attached file: https://bugsfiles.kde.org/attachment.cgi?id=178640

---

Operating System: Arch Linux 
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.3-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 31.2 ГиБ of RAM
Graphics Processor: NVIDIA GeForce GTX 1660 SUPER
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B550 AORUS ELITE V2