| Summary: | "Activate application launcher" bound to `Meta` is triggered when pressing `Meta+Shift`, before releasing `Meta` when layout switching is set to Both Shifts | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | bastimeyer123 |
| Component: | Application Launcher (Kickoff) widget | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | fanzhuyifan, mikel5764, noahadvs |
| Priority: | NOR | ||
| Version First Reported In: | 6.1.0 | ||
| Target Milestone: | 1.0 | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/kglobalacceld/-/commit/8643077d0422c97ad12dc052202c9e1348e99b23 | Version Fixed/Implemented In: | 6.1.3 |
| Sentry Crash Report: | |||
| Attachments: |
Kickoff launch via Meta+Shift
kwin debug console xmodmap -pke |
||
|
Description
bastimeyer123
2024-06-22 19:02:23 UTC
fwiw can't reproduce on master, wayland. Are you seeing this on x11 or wayland? (In reply to fanzhuyifan from comment #1) > fwiw can't reproduce on master, wayland. Are you seeing this on x11 or > wayland? I'm on wayland where this is happening reliably. Also just checked X11, and the issue does not occur there. ``` $ pacman -Q kwin plasma-workspace kwin 6.1.0-3 plasma-workspace 6.1.0-1 ``` Here are the full contents of my `kglobalshortcutsrc` and `kwinrc`: https://gist.github.com/bastimeyer/a1e064aaf3e138b1cf9ecdc1183e99ed Relevant stuff from `kwinrc`: > [ModifierOnlyShortcuts] > Meta=org.kde.plasmashell,/PlasmaShell,org.kde.PlasmaShell,activateLauncherMenu Relevant stuff from `kglobalshortcutsrc`: > [plasmashell] > _k_friendly_name=plasmashell > activate application launcher=Meta,Meta\tAlt+F1,Activate Application Launcher > activate widget 4=none,none,Activate Application Launcher Widget > activate widget 45=Alt+F1,none,Activate Application Launcher Widget Let me also quickly add a short video showing the problem with `evtest` log output... Created attachment 170859 [details]
Kickoff launch via Meta+Shift
Hi, thank you for the update. The section in kwinrc is no longer used as of 6.1. Your kglobalshortcutsrc section seems correct. The events reported by your evtest seem correct -- left meta press, left meta hold, left shift press, left shift hold... The modifier-only shortcuts trigger on release, and so there the application launcher shouldn't trigger at all. I also get the same evtest event sequence on git master, and on 6.1, arch linux, wayland. But I cannot reproduce the issue on either version. To further debug the issue, could you open krunner, and search for "kwin debug console"? Then, go to Input Events, and vertically enlarge the window so that more events are visible. Could you reproduce the issue and upload a screencast? Thanks! A wild guess: what keymap are you using? What is the output of `xmodmap -pke | grep Meta`? Does the issue occur with a default keymap? For me the output of `xmodmap -pke | grep Meta` is keycode 64 = Alt_L Meta_L Alt_L Meta_L keycode 108 = Alt_R Meta_R Alt_R Meta_R keycode 205 = NoSymbol Meta_L NoSymbol Meta_L Created attachment 170873 [details] kwin debug console (In reply to fanzhuyifan from comment #5) > To further debug the issue, could you open krunner, and search for "kwin debug console"? Then, go to Input Events, and vertically enlarge the window so that more events are visible. Could you reproduce the issue and upload a screencast? Thanks! Done, see new attachment... > what keymap are you using? Default keymap on a Logitech g710+ (German layout), with the "en_US Intl with dead keys" layout selected in the Plasma keyboard settings > Does the issue occur with a default keymap? It does also occur when using the regular en_US layout > What is the output of `xmodmap -pke | grep Meta`? ``` $ xmodmap -pke | grep Meta keycode 64 = Alt_L Meta_L Alt_L Meta_L keycode 205 = NoSymbol Meta_L NoSymbol Meta_L ``` When you press the shift key, kwin reports a keypress with scancode 42, and keycode 65043 (0xFE13, which is XKB_KEY_ISO_Level5_Lock), with modifiers Shift and Meta. It has no mapped Qt keycode. I suspect this might be causing the problem, but haven't been able to reproduce that on my end. Do you know why it's reporting XKB_KEY_ISO_Level5_Lock instead of the ordinary shift keys? For reference, could you also attach the complete output of `xmodmap -pke`? Thanks. Created attachment 170878 [details]
xmodmap -pke
I found the cause of this.
As hinted, I've set up two different keyboard layouts, "en_US International with dead keys" and the regular "en_US" one. In the "Keyboard -> Key Bindings" settings menu, I have "Both Shifts together" set in the "Switching to another layout" category.
When disabling this double-shift-press behavior, the issue does not occur.
With the option, pressing shift results in:
Scan code: 42
Xkb symbol: 65034
With the option, releasing shift results in:
Scan code: 42
Xkb symbol: 65505
Without the option, pressing shift results in:
Scan code: 42
Xkb symbol: 65505
Without the option, releasing shift results in:
Scan code: 42
Xkb symbol: 65505
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kglobalacceld/-/merge_requests/54 Git commit b06bda34e060a4614d594a1691e720edabaf85e1 by Yifan Zhu. Committed on 02/07/2024 at 17:26. Pushed by fanzhuyifan into branch 'master'. explicitly process invalid keycodes Since dd36387c1fe704914cf41dd1e7333bac703e8ca7 in kwin, key events with invalid key codes are also passed to kglobalacceld. The code mistakenly triggers the corresponding modifier-only shortcut. FIXED-IN: 6.1.3 M +3 -0 autotests/shortcutstest.cpp M +9 -5 src/globalshortcutsregistry.cpp https://invent.kde.org/plasma/kglobalacceld/-/commit/b06bda34e060a4614d594a1691e720edabaf85e1 Git commit 8643077d0422c97ad12dc052202c9e1348e99b23 by Yifan Zhu. Committed on 02/07/2024 at 21:41. Pushed by fanzhuyifan into branch 'Plasma/6.1'. explicitly process invalid keycodes Since dd36387c1fe704914cf41dd1e7333bac703e8ca7 in kwin, key events with invalid key codes are also passed to kglobalacceld. The code mistakenly triggers the corresponding modifier-only shortcut. FIXED-IN: 6.1.3 (cherry picked from commit b06bda34e060a4614d594a1691e720edabaf85e1) Co-authored-by: Yifan Zhu <fanzhuyifan@gmail.com> M +3 -0 autotests/shortcutstest.cpp M +9 -5 src/globalshortcutsregistry.cpp https://invent.kde.org/plasma/kglobalacceld/-/commit/8643077d0422c97ad12dc052202c9e1348e99b23 |