Bug 404288

Summary: Window switching broken if capslock is mapped to super key
Product: [Plasma] kwin Reporter: Jussi Pakkanen <jpakkane>
Component: inputAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jussi Pakkanen 2019-02-13 13:14:09 UTC
Replicating the issue, Kubuntu 18/10 Xorg, Wayland not tested

1. map window switching to super+tab instead of alt+tab
2. map caps lock to super key with the following xmodmap setting:

clear Lock
keycode 66 = Super_L

3. Open two (preferably three as the issue happens more consistently) different application windows
4. Press down capslock, press and release tab key once, release capslock

At this point the new window is active but kwin is still holding the "window selection" mode. It is as if kwin had not received the keyup event from the capslock key. Pressing any key makes the selector go away and the desired window to come up, but this swallows one keypress.

If you instead press down capslock, then press down tab, then release capslock and then release tab, the switch works correctly.

Originally tested on a PS/2 keyboard that does not have a super key using a PS/2-USB adapter but the issue is also present when using a regular USB keyboard.

For comparison the same setup works without problems on Ubuntu 18/04 with the default GNOME desktop.
Comment 1 Martin Flöser 2019-02-13 17:14:57 UTC
Please use the keyboard options to change the caps lock behavior to be a modifier instead of using xmodmap.
Comment 2 Jussi Pakkanen 2019-02-13 18:54:46 UTC
I can verify that that solution works. Thanks.