Bug 483982 - Since KDE6, a pressed Ctrl key state is forgotten in a Wine application after loosing and regaining keyboard focus
Summary: Since KDE6, a pressed Ctrl key state is forgotten in a Wine application after...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 6.0.2
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-19 09:55 UTC by ojdo
Modified: 2024-03-19 09:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ojdo 2024-03-19 09:55:30 UTC
SUMMARY
In music player foobar2000 (installed through wine), since the update to KDE6, the state of the Ctrl key (being pressed permanently) is not preserved when loosing and regaining keyboard focus. I am not sure whether the root cause lies in Wine or KDE, but the latest major KDE update changed the behavior for me.

Sorry for the convoluted repro steps, but I don't know any simpler setup in any application to reliably trigger this "loosing & regaining keyboard focus" scenario. Also, it motivates why this is relevant for regular usage.

I would be happy for any troubleshooting or debugging tips with which I could narrow down, where in the input stack the "Ctrl is still pressed" state is now being dropped, so that I can direct the bug report at the correct component.

STEPS TO REPRODUCE
1. Install foobar2000 (thanks to AUR, a `yay foobar2000` works) and start it. Select any UI layout preset (all work fine for this).
2. Get plugin foo_masstag <https://www.foobar2000.org/components/view/foo_masstag> + install (foobar2000 Main Menu > Preferences > Components: button Install..).
3. Restart foobar2000, drag a music file into the playlist view.
4. Open context menu on the music file, select Tagging > Manage Scripts
5. Click "Add" > "Set Value", enter Field name "TITLE", Field value "%title%_". OK.
6. Enter "Test action" into the bottom text input (in section "Scripts" of the modal) and press Save. "Close" this window.
7. Back in Main Menu > Preferences, navigate to "Keyboard Shortcuts".
8. Click "Add new", then filter list by "Test action", and select item [context]/Tagging/Scripts/Test action. Click into input field "Key" and press key combination "Ctrl+T" on our keyboard. You now have bound a tagging action to this keyboard shortcut. Close Preferences by pressing OK.
9. Now select the music in the playlist.
10. Press Ctrl+T once, but keep holding Ctrl while releasing T.
11. Press Ctrl+T a second time by pressing T again.
(Finally, remove the added underscores from the file tag by opening "Properties" and editing the title field.)

OBSERVED RESULT
The tagging action should (and did, while under KDE5) be triggered twice, leading to two underscores being added to the music file tag.

EXPECTED RESULT
The tagging action is triggered only once, and on the second press of Ctrl+T, instead the playlist view's quicksearch feature becomes active, which indicates that the pressed Ctrl key is no longer registered as pressed by the application window.

Current workaround: always release and repress Ctrl after each tagging action.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: EndeavourOS (Arch-like)
(available in About System)
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0 
Qt Version: 6.6.2

ADDITIONAL INFORMATION
Graphic Plattform: Wayland
System: Dell XPS 13 9310 laptop