Bug 457646

Summary: Ctrl key not respected in shortcuts that include it when using XKB option to swap Caps Lock and Ctrl key
Product: [Frameworks and Libraries] frameworks-kglobalaccel Reporter: Zach <Prometheus7435>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: butirsky, kde, nate
Priority: NOR    
Version First Reported In: 5.96.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: kglobalshortcutsrc
KDE_settings.jpg
attachment-25767-0.html
attachment-6665-0.html
attachment-16353-0.html

Description Zach 2022-08-09 01:11:24 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

Switch desktop shortcut not working for "Switch One Desktop to the Right"

STEPS TO REPRODUCE
1. Have the default keyboard shortcut for "Switch One Desktop to the Right" set
2. Call the shortcut by typing "Meta+Ctrl+Right"

OBSERVED RESULT
The shortcut keys are pressed but no action occurs. It does not seem to perform any action.

EXPECTED RESULT
Shift the virtual desktop one to the right.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Garuda Linux / KDE Plasma 5.25.4
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION
Trying to set "Meta+Ctrl+Right" as a custom shortcut fails. My guess is there's a character limit that prevents it from seeing it as valid. Setting shorter character length shortcuts will allow the shortcut to function as expected. Any equal or longer length custom shortcut will fail to save and the action won't be performed.
Comment 1 Vlad Zahorodnii 2022-08-09 10:31:53 UTC
Can't reproduce it, the shortcut works fine on my machine. Can you attach your ~/.config/kglobalaccelrc file after changing the shortcut to Meta+Ctrl+Right?
Comment 2 Zach 2022-08-09 13:29:31 UTC
Created attachment 151194 [details]
kglobalshortcutsrc

 Good morning,
  Attached is the requested file after attempting to change the shortcut. Playing around with it, I think this is a bug hiding in another place. When I tried using the other Ctrl key, the shortcut worked. On my system, I've swapped the Capslock and Ctrl keys using the Advanced options in the keyboard input section of the KDE settings. I've attached a screenshot of that section as well. Thank you for the help.
Very Respectfully,  Zach


    On Tuesday, August 9, 2022 at 06:31:56 AM EDT, Vlad Zahorodnii <bugzilla_noreply@kde.org> wrote:  
 
 https://bugs.kde.org/show_bug.cgi?id=457646

--- Comment #1 from Vlad Zahorodnii <vlad.zahorodnii@kde.org> ---
Can't reproduce it, the shortcut works fine on my machine. Can you attach your
~/.config/kglobalaccelrc file after changing the shortcut to Meta+Ctrl+Right?
Comment 3 Zach 2022-08-09 13:29:31 UTC
Created attachment 151195 [details]
KDE_settings.jpg
Comment 4 Nate Graham 2022-08-09 19:24:39 UTC
> On my system, I've swapped the Capslock and Ctrl keys using the Advanced options in the keyboard input section of the KDE settings
And does it work if you press the Capslock+Meta+right? What about actual Ctrl key+Meta+Right?
Comment 5 Zach 2022-08-10 07:52:12 UTC
Created attachment 151217 [details]
attachment-25767-0.html

 When I swapped the keys to the default configuration, the shortcut works. It didn't work if I had the Ctrl and Capslock keys swapped and tried the shortcut using the physical location of the Ctrl key (as it now acts as a Capslock). And didn't work if I had the keys swapped and used the physical Capslock key location (now acting as Ctrl). It still works if I use the Ctrl key on the right side of the keyboard.

    On Tuesday, August 9, 2022 at 03:24:41 PM EDT, Nate Graham <bugzilla_noreply@kde.org> wrote:  
 
 https://bugs.kde.org/show_bug.cgi?id=457646

Nate Graham <nate@kde.org> changed:

          What    |Removed                    |Added
----------------------------------------------------------------------------
            Status|REPORTED                    |NEEDSINFO
            Product|kwin                        |frameworks-kglobalaccel
                CC|                            |nate@kde.org
          Assignee|kwin-bugs-null@kde.org      |kdelibs-bugs@kde.org
        Resolution|---                        |WAITINGFORINFO
            Version|5.25.4                      |5.96.0
            Summary|switch desktop shortcut not |Ctrl key not respected in
                  |working for "Switch One    |shortcuts that include it
                  |Desktop to the Right"      |when using XKB option to
                  |                            |swap Caps Lock and Ctrl key
          Component|input                      |general

--- Comment #4 from Nate Graham <nate@kde.org> ---
> On my system, I've swapped the Capslock and Ctrl keys using the Advanced options in the keyboard input section of the KDE settings
And does it work if you press the Capslock+Meta+right? What about actual Ctrl
key+Meta+Right?
Comment 6 Nate Graham 2022-08-10 14:18:32 UTC
Thanks for the info.

Do any of the other ctrl-swapping/re-mapping options also fail?
Comment 7 Zach 2022-08-10 14:38:38 UTC
Created attachment 151224 [details]
attachment-6665-0.html

 Trying the different combinations for the Ctrl location, it fails on all where the Capslock acts as the Ctrl and works everywhere else. The bug only seems to occur when the CapsLock key is involved.
I don't know if this'll be beneficial, but the hardware I'm using is a ThinkPad T14 Gen 1 with Ryen 5. I haven't changed any keyboard settings in the bios.

    On Wednesday, August 10, 2022 at 10:18:35 AM EDT, Nate Graham <bugzilla_noreply@kde.org> wrote:  
 
 https://bugs.kde.org/show_bug.cgi?id=457646

--- Comment #6 from Nate Graham <nate@kde.org> ---
Thanks for the info.

Do any of the other ctrl-swapping/re-mapping options also fail?
Comment 8 Nate Graham 2022-08-10 17:38:56 UTC
Can you tell me *exactly* which options in the Advanced panel of the keyboard page you're using?
Comment 9 Andrey 2022-08-10 18:51:55 UTC
Can you also try on Gnome maybe?
Comment 10 Zach 2022-08-11 17:06:42 UTC
Created attachment 151257 [details]
attachment-16353-0.html

 I booted up a live Gnome version of my distro (Garuda) and was able to replicate the bug. I would be able to create and run the shortcut using the original Ctrl key position. But when I swapped CapsLock and Ctrl, I wasn't able to create the shortcut but other shorter character length key combinations would work. So I guess not a KDE specific bug after all?

    On Wednesday, August 10, 2022 at 02:51:58 PM EDT, Andrey <bugzilla_noreply@kde.org> wrote:  
 
 https://bugs.kde.org/show_bug.cgi?id=457646

--- Comment #9 from Andrey <butirsky@gmail.com> ---
Can you also try on Gnome maybe?
Comment 11 Nate Graham 2022-08-11 17:09:20 UTC
Indeed, I suspect that you're using an incompatible set of XKB settings, which is why I asked for the exact list of settings you're using,
Comment 12 Andrey 2022-08-11 17:50:14 UTC
(In reply to Zach from comment #10)
> So I guess not a KDE specific bug after all?
Or Gnome also has that bug/inability :)