Bug 451803 - Long press Tab + Alt triggers window switching when it should not
Summary: Long press Tab + Alt triggers window switching when it should not
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (show other bugs)
Version: 5.24.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-22 19:47 UTC by d0048
Modified: 2022-03-27 00:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
nate: Wayland-
nate: X11+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description d0048 2022-03-22 19:47:03 UTC
SUMMARY
By default, Alt+Tab binds to window switching, and Tab+Alt binds to nothing. However, only short press Tab+Alt does nothing as expected, but holding down Tab longer, and pressing Alt erroneously bring up the window-switch UI. 

This is especially annoying in full-screen games requiring the user to keep holding tab, and use alt to interact with in-game mechanics.

Note: Using Kwin on Xorg.


STEPS TO REPRODUCE
1. Open a Konsole. I will use simple `xdotool` script to make this consistent, but one can trigger the same with manual input. 
2. These following inputs have inconsistent behavior:
    1. Hold Alt for 0.1 sec, then Tab, window switched
        - `xdotool keydown Alt; sleep 0.1; xdotool keydown Tab; sleep 0.1; xdotool keyup Alt; xdotool keyup Tab`
    2. Hold Tab for 0.1 sec, then Alt, window NOT switched
        - `xdotool keydown Tab; sleep 0.1; xdotool keydown Alt; sleep 0.1; xdotool keyup Alt; xdotool keyup Tab`
    3. Hold Tab for 2.0 sec, then Alt, window switched (inconsistent behavior)
        - `xdotool keydown Tab; sleep 2; xdotool keydown Alt; sleep 0.1; xdotool keyup Alt; xdotool keyup Tab`
        ^ This might take a few tries to trigger. It triggers over 50% of the time for me.

OBSERVED RESULT
Short Tab+Alt and holding Tab, then press Alt have inconsistent shortcut behavior. Also, Tab+Alt should not trigger the same shortcut as Alt+Tab in the first place.

EXPECTED RESULT
Ideally, Tab+Alt should not trigger the same shortcut as Alt+Tab. At least, the duration of holding Tab should not affect the behavior of pressing Tab after. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Opensuse Tumbleweed
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
This might also happen to other 2-key short-cuts?
Comment 1 Nate Graham 2022-03-27 00:56:47 UTC
Cannot reproduce on Wayland.