Bug 476353 - Trigger keyboard layout switch shortcuts on release, not press
Summary: Trigger keyboard layout switch shortcuts on release, not press
Status: RESOLVED DUPLICATE of bug 420493
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 5.27.8
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-31 06:58 UTC by Yevhen Popok
Modified: 2023-10-31 11:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yevhen Popok 2023-10-31 06:58:40 UTC
SUMMARY
Nowadays many application shortcuts involve Ctrl+Shift and Alt+Shift combinations. On Linux desktops some shortcuts for keyboard layout switching conflict with them. For example, if a user binds "Ctrl+Shift" for keyboard layout switching, combinations like Ctrl+Shift+C (paste into terminal emulator) or Ctrl+Shift+Z (Redo action) wouldn't work as "Shift" will be used for keyboard layout switching. It's an infamous X11 XCB issue that gets inherited on Wayland. All previous bug reports suggested changing XCB behavior to trigger a keyboard layout switching on hotkeys release rather than on press. An unofficial patch for X11 still exists but it doesn't work for Wayland.

STEPS TO REPRODUCE
1. Open "System Settings" > "Keyboard" > "Layouts" > "Shortcuts for Switching Layout" > "Main Shortcuts"
2. Select Ctrl+Shift option for "Switching to another layout"
3. Copy some terminal command (.e.g., echo 1) to your clipboard
4. Open a terminal emulator (e.g. Konsole)
5. Press Ctrl+Shift+V

OBSERVED RESULT
The command gets pasted to the Konsole

EXPECTED RESULT
The command doesn't get pasted to the Konsole

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 39 Kinoite
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
This issue is important mostly because this old XCB provides bad UX:
1. For users who are comfortable with those classic ("Windows") combinations
2. For users that are not aware of this issue. Some programs expose these XCB options (e.g. KDE System Settings, GNOME Tweaks), and some installers (e.g. Fedora Anakonda or Debian installer) might even select Alt+Shift by default for non-English locales. No one warns about potential issues. As a result, users receive broken shortcuts (e.g. Alt+Shift+Tab) until they somehow find a way to fix it.

There was the same bug for KWin X11 and as the XCB bug won't be fixed, KDE maintainers suggested opening another bug.

Related topics:
https://bugs.kde.org/show_bug.cgi?id=453506
https://bugs.freedesktop.org/show_bug.cgi?id=865
https://gitlab.freedesktop.org/xorg/xserver/-/issues/258
https://aur.archlinux.org/packages/xorg-server-bug865
https://gitlab.freedesktop.org/wayland/weston/-/issues/207
Comment 1 Yevhen Popok 2023-10-31 11:21:03 UTC
Accidentally found older bug report
https://bugs.kde.org/show_bug.cgi?id=420493
So, I'm marking this one as a duplicate.

*** This bug has been marked as a duplicate of bug 420493 ***