Bug 481541 - Pressing the Super(Win) key also opens the KDE application menu, when the mouse, and the keyboard are captured (VMware and Virtualbox)
Summary: Pressing the Super(Win) key also opens the KDE application menu, when the mou...
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: input (other bugs)
Version First Reported In: 5.93.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-19 12:16 UTC by neokitty
Modified: 2024-03-19 17:22 UTC (History)
3 users (show)

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


Attachments
There are no such section (186.59 KB, image/png)
2024-02-19 21:08 UTC, neokitty
Details

Note You need to log in before you can comment on or make changes to this bug.
Description neokitty 2024-02-19 12:16:25 UTC
SUMMARY


STEPS TO REPRODUCE
1.  Press Win(Super) or the current keyboard layout switching
2. 
3. 

OBSERVED RESULT
The keyboard switching layout shortcut (Ctrl+Shift in my case) changes the keyboard layout when pressed, even when the mouse and the keyboard are captured, or the Super key, pressing it opens the KDE application menu
 

EXPECTED RESULT
The keys pressed while the mouse and keyboard are captured stays inside the VM, and don't do anything in the host system

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
Comment 1 Patrick Silva 2024-02-19 13:53:16 UTC
Supposedly fixed in Plasma 5.27, see bug 455159.
I can't reproduce with VirtualBox 7.0.14-2 on Arch Linux runnimg Plasma 6 RC2.
Comment 2 neokitty 2024-02-19 16:11:02 UTC
(In reply to Patrick Silva from comment #1)
> Supposedly fixed in Plasma 5.27, see bug 455159.
> I can't reproduce with VirtualBox 7.0.14-2 on Arch Linux runnimg Plasma 6
> RC2.

Oh, thank you
Comment 3 neokitty 2024-02-19 17:41:35 UTC
(In reply to Patrick Silva from comment #1)
> Supposedly fixed in Plasma 5.27, see bug 455159.
> I can't reproduce with VirtualBox 7.0.14-2 on Arch Linux runnimg Plasma 6
> RC2.

Well, after updating to the latest Plasma 6 RC2, the issue still persists. I tried with both Wayland and xOrg, the result is the same, whenver I press ctrl+shift or the Super key, even when the mouse is grabbed(captured) on both vmware workstation 17 and vbox 7.0.14.
Comment 4 fanzhuyifan 2024-02-19 17:44:11 UTC
(In reply to neokitty from comment #3)
> (In reply to Patrick Silva from comment #1)
> > Supposedly fixed in Plasma 5.27, see bug 455159.
> > I can't reproduce with VirtualBox 7.0.14-2 on Arch Linux runnimg Plasma 6
> > RC2.
> 
> Well, after updating to the latest Plasma 6 RC2, the issue still persists. I
> tried with both Wayland and xOrg, the result is the same, whenver I press
> ctrl+shift or the Super key, even when the mouse is grabbed(captured) on
> both vmware workstation 17 and vbox 7.0.14.

Does this only happen with certain shortcuts but not others? The shortcuts you mentioned all seem to be modifier-only shortcuts assigned through kwin.
Comment 5 neokitty 2024-02-19 17:54:09 UTC
Uhh, I don't know? What do I need to test? Other shortcuts like Fn + F2, for example, this shortcut lowers the volume on my laptop, the mouse, keyboard are grabbed, but when I press this shortcut, I can see the volume in the host still changes.
Comment 6 neokitty 2024-02-19 18:00:38 UTC
That Fn + F2 issue seems to be only in VMware. When i press the same key combination but in virtualbox, it changes the volume in the guest and not the host, but the issue still persits when i press Ctrl+Shift
Comment 7 fanzhuyifan 2024-02-19 18:03:34 UTC
Would you be able to provide the [ModifierOnlyShortcuts] section in ~/.config/.kwinrc?

Do you also have shortcuts for switching virtual desktops, for example? Are those grabbed? (default to Ctrl+Fx, 
Meta+Ctrl+Arrow)

Thanks!
Comment 8 neokitty 2024-02-19 21:08:44 UTC
Created attachment 165942 [details]
There are no such section
Comment 9 neokitty 2024-02-19 21:09:38 UTC
(In reply to fanzhuyifan from comment #7)
> Would you be able to provide the [ModifierOnlyShortcuts] section in
> ~/.config/.kwinrc?
> 
> Do you also have shortcuts for switching virtual desktops, for example? Are
> those grabbed? (default to Ctrl+Fx, 
> Meta+Ctrl+Arrow)
> 
> Thanks!

when i press it in vmware, it changes the virtual desktop in the host, when i do the same but in virtualbox  it doesnt.
Comment 10 neokitty 2024-02-27 16:43:16 UTC
Additionally, if I press a hotkey to switch ttys, they are also being switched in the host, but not in the VM. I think that's not how it should work.
Comment 11 neokitty 2024-03-19 16:23:52 UTC
Is this going to get ever fixed?
Comment 12 fanzhuyifan 2024-03-19 17:22:54 UTC
(In reply to neokitty from comment #9)
> (In reply to fanzhuyifan from comment #7)
> > Would you be able to provide the [ModifierOnlyShortcuts] section in
> > ~/.config/.kwinrc?
> > 
> > Do you also have shortcuts for switching virtual desktops, for example? Are
> > those grabbed? (default to Ctrl+Fx, 
> > Meta+Ctrl+Arrow)
> > 
> > Thanks!
> 
> when i press it in vmware, it changes the virtual desktop in the host, when
> i do the same but in virtualbox  it doesnt.

The client is responsible for requesting to inhibit global shortcuts. Given that virtualbox works but not vmware, I would suggest reporting this to vmware.

The Meta shortcut is modifier-only and currently handled differently. There is ongoing work integrating these into kglobalacceld (https://invent.kde.org/plasma/kwin/-/issues/205), which will make these behavior the same as other global shortcuts.