A bit of basic information beforehand that should be relevant:
- OS: Fedora 40 (x86_64)
- Desktop: KDE Plasma 6.1.3 (5.27.x -> current) (Wayland)
- Motherboard: ASUS PRIME X470-PRO
- Primary keyboard: Keychron S1 (tested on stock firmware, Windows layers)
The issue in some more detail: alt-tabbing windows in KDE sometimes leaves behind an alt keypress in the window that was alt-tabbed from that won't go away until alt is registered as pressed again by the window.
This has certainly been an interesting issue that has been a problem for at least a year at this point. I've finally gone in to do basic troubleshooting regarding the issue. I have pretty much ruled out hardware at this point. Originally, I had my primary keyboard plugged into my monitor's USB hub. In testing, I tried another keyboard, migrated the connect to my motherboard rather the monitor's USB hub, and the alternate keyboard plugged into the motherboard. All tests eventually result in the same issue happening over time.
One thing I see as a potential pattern but cannot fully confirm is that it appears these remnants of alt keypresses only show up in XWayland windows, and not native Wayland applications. Applications I have seen it occur in include Minecraft Java Edition, various Proton games, Electron applications that don't enable native Wayland support (e.g. Discord), Steam. This issue also occurs less if I allow XWayland apps to always see modifier keypresses. Though I assume this is more from the tendency to alt-tab back into affected windows, registering another alt keypress.
At this point, I am pretty confident this is software-related, but I cannot find any existing bug reports within the past three years (especially noting any relevant to KDE) that describe this problem. I am unsure of how one would go to debug this category of issue or even find the root cause component that is causing the issue. I am curious if anyone here has also had this irritating quirk occur and/or if you know any workarounds/fixes for this given problem.
For the most part, you won't be able to escape Unix-like paradigms when using Unix-like systems. Notably, users have to exist in some form. You don't necessarily need to give them passwords for the frontend signage, but they need to exist. The shortlist of setting up cage would be:
It's not quite a few clicks, but this can in contrast also be fully automated trivially if it's something you need to setup more than once.