Bug 477046

Summary: shortcut causing window switch often causes stuck modifiers (data loss possible)
Product: [Applications] yakuake Reporter: Denis Lisov <dennis.lissov>
Component: generalAssignee: Eike Hein <hein>
Status: REPORTED ---    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 23.08.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Denis Lisov 2023-11-15 13:40:02 UTC
SUMMARY
I wanted to use Ctrl+= as a shortcut for Yakuake open/close. However, after I open and close it with Ctrl+= the application I switch back to often thinks the Ctrl key and treats keypresses as shortcuts when I try to enter text.

STEPS TO REPRODUCE
1. Have Yakuake and Kate installed.
2. Set the Yakuake open/retract shortcut to Ctrl+=
3. Start Yakuake
4. Open Kate and open some tab in it, put the cursor in the text area.
5. Use Ctrl+= to show Yakuake (important: you need to release Ctrl between this step and the next one).
6. Use Ctrl+= to hide Yakuake.
7. Press 'w'

OBSERVED RESULT
The open tab closes as if I typed Ctrl+w

EXPECTED RESULT
The 'w' should be typed into the tab text.

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Graphics Platform: Wayland

ADDITIONAL INFORMATION
The worst case for me was when the switch back brought me to Firefox and I tried to input W resulting in Ctrl+Shift+W (close the current window with all tabs) instead.
Comment 1 Denis Lisov 2023-11-16 00:20:22 UTC
I'm not really sure whether this is a problem with Yakuake or with the component that provides global shortcut handling in the Wayland session (not sure what exactly that component is). I haven't managed to reproduce it without Yakuake yet, but the reproducer is not 100% reliable for me, so I'm not sure it's not there.

Another interesting point is that is affects not only the app I switch to, but also the global shortcut handling - Esc opens/closes task manager like Ctrl+Esc, `=` opens/closes Yakuake like Ctrl+= is configured to, etc.