# SUMMARY When the current focus in in an XWayland application/windows and I switch to the over-next window (by pressing Alt+Tab+Tab) the second tab will also be registered inside the application # STEPS TO REPRODUCE 1. Open a xwayland application (preferably one with a textarea input - for easier debugging). 2. Set the input focus into the textarea. 3. Press Alt+Tab+Tab to switch two windows further (aka HOLD-ALT PRESS-TAG PRESS-TAB RELEASE-ALT) 4. Go back to the original window and observe that one tab was pressed # OBSERVED RESULT The second tab of the Alt-Tab-Tab was forwarded (?) to the original window # EXPECTED RESULT The task-switcher should "swallow" the key presses (the first tab seems to be swallowed, but not all further presses) # SOFTWARE/OS VERSIONS KDE Plasma Version: 6.0.3 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.3 Kernel Version: 6.8.2-arch2-1 (64-bit) Graphics Platform: Wayland # ADDITIONAL OBSERVATIONS - This only works in XWayland windows (confirmed in IntelliJ Goland, Webstorm, Bitwarden, MongoDB Compass, non-wayland-VSCodium) - In native Wayland applications I can't reproduce it (aka firefox, Dolphin, Konsole, ....) - The bug is not specific to the tab key, If I [HOLD-ALT] [Tab] [ARROW-DOWN] [ARROW-DOWN] [RELEASE-ALT], then the two arrow presses do also appear in the original application - The task-switcher behaves completely normal during all this - meaning both applications (teh task-switcher and the originally focused window) receive the key press - Does not happen when I switch to X11 - Does happen independent which task switcher I chose in the settings (tested "Modern Informative", Compact, "Thumbnail Grid") - It happens consistently, I can reproduce it every time I try
Can confirm, though it only happens if you set X11 apps to always be able to read all keystrokes
(In reply to Zamundaaa from comment #1) > Can confirm, though it only happens if you set X11 apps to always be able to > read all keystrokes Wow - thanks Zamundaaa. That actually fixes my problem (even though I had the option "Any key typed while Control/Alt/Meta are pressed" selected). But switching to "Never" completely fixes it. You can't believe how annoying the last week was, I think in every project of mine are now random tabs committed. Really thank you - lol, send me you postal address and I'll mail you a box of chocolate.
Also happens for me when using the overview feature or desktop grid. First input gets properly intercepted while all following keys "leak" through.
*** Bug 486263 has been marked as a duplicate of this bug. ***
Trivial way to reproduce: Focus an XWayland window and Alt+Tab with default XWayland snooping settings. The app gets sent tab keys.
*** Bug 489325 has been marked as a duplicate of this bug. ***
*** Bug 489382 has been marked as a duplicate of this bug. ***
*** Bug 488870 has been marked as a duplicate of this bug. ***
This was exposed by changing the XWayland snooping move away from "Never".
*** Bug 489609 has been marked as a duplicate of this bug. ***
*** Bug 489631 has been marked as a duplicate of this bug. ***
Created attachment 171308 [details] Video of a window receiving TAB characters while cycling windows.
I see it as well. Here is a simple way to reproduce using vscode (it affects chrome as well, but is very easy to see in vscode) 1. Settings -> Task Switcher: disable "show selected window" (makes it easier to see what is happening) 2. start vscode with an empty document 3. press alt-tab repeatedly and observe the tab character "bleeds through" to vscode.
*** Bug 489757 has been marked as a duplicate of this bug. ***
Add backtick to the list: when pressing Alt+` + ` (backtick twice) the original window gets the backtick.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6074
*** Bug 490754 has been marked as a duplicate of this bug. ***
I actually started to report new bug when I stumbled upon this one, so here is my description which seems pretty much like what is described here: When I use Alt+Tab to switch windows, keystrokes are sent to last active window and appear as spaces. For example, I use RubyMine, have code `<MessageBox messages={messages}/>` and I leave cursor between `=` and `{`. Then I use Alt+Tab to loop through all open windows (13 window) and get back to RubyMine, I have code `<MessageBox messages= {messages}/>` so 25 spaces are added. So far I have seen this issue with RubyMine, Typora. Slack and Spotify act as if they are receiving Tab keystrokes. All of these applications are xclients.
Git commit 8fd4476ff1848ce7ce4d3573224fc4893ae8339d by David Edmundson. Committed on 02/08/2024 at 09:31. Pushed by davidedmundson into branch 'master'. wayland: Move XWayland key forwarding into a filter We optionally send some keys to xwayland through the filter when no x11 client has focus. This allows shortcut handling in X11 apps to work. When kwin is grabbing keys we don't necessarily want X11 to sniff these keys as things can get out of sync. A key place is the tabbox. The X11 client sill has focus, but xwayland is not active. This means we pass tab keys to X which then go to application incorrectly. Part of this patch changes the tabbox filter to not intercept the alt key release event. This ensures xwayland's concept of pressed modifiers stays in sync. M +36 -0 autotests/integration/x11keyread.cpp M +1 -0 src/input.cpp M +1 -0 src/input.h M +50 -49 src/xwayland/xwayland.cpp M +2 -2 src/xwayland/xwayland.h https://invent.kde.org/plasma/kwin/-/commit/8fd4476ff1848ce7ce4d3573224fc4893ae8339d
*** Bug 491287 has been marked as a duplicate of this bug. ***
I see that it "Version fixed in" says 6.2.0, the next major release, which is still some time off. Would it be possible to cherry-pick it into some of the 6.1 bugfix releases?
(In reply to ⭐️NINIKA⭐️ from comment #21) > I see that it "Version fixed in" says 6.2.0, the next major release, which > is still some time off. > > Would it be possible to cherry-pick it into some of the 6.1 bugfix releases? At Nate's blog I noticed that this only happens with default setting "When Alt+Tabbing through windows, tab keystrokes no longer leak into XWayland-using apps when using default XWayland app keyboard snooping setting". So I just went to settings and selected to never send any keystrokes to X11 apps and that works for me. I don't use any X11 app that would need those keystrokes.
*** Bug 492272 has been marked as a duplicate of this bug. ***
*** Bug 492116 has been marked as a duplicate of this bug. ***
*** Bug 492037 has been marked as a duplicate of this bug. ***
(In reply to elman from comment #22) > (In reply to ⭐️NINIKA⭐️ from comment #21) > > I see that it "Version fixed in" says 6.2.0, the next major release, which > > is still some time off. > > > > Would it be possible to cherry-pick it into some of the 6.1 bugfix releases? Please KDE devs, if it's not too invasive it'd be nice to have this backported to 6.1.x > At Nate's blog I noticed that this only happens with default setting "When > Alt+Tabbing through windows, tab keystrokes no longer leak into > XWayland-using apps when using default XWayland app keyboard snooping > setting". So I just went to settings and selected to never send any > keystrokes to X11 apps and that works for me. I don't use any X11 app that > would need those keystrokes. Thanks for pointing out that workaround! It never occurred to me to go looking through the settings. I don't know what side effects this setting might have but at least I won't lose my mind now 😁
*** Bug 492491 has been marked as a duplicate of this bug. ***
*** Bug 493956 has been marked as a duplicate of this bug. ***
*** Bug 492361 has been marked as a duplicate of this bug. ***
*** Bug 493221 has been marked as a duplicate of this bug. ***
*** Bug 493386 has been marked as a duplicate of this bug. ***
This does not appear fixed in 6.2.3 on Fedora 41.