[KDE 5] How to use Ctrl+Shift+... shortcuts if Ctrl+Shift assigned to switch layouts?

There is known bug in XKB where user can’t use shortcuts starting with “switch layout” combination because XKB switches layouts when last key in “switch layout” combination is pressed, not when last key in “switch layout” combination is released.

[Link removed]
[Link removed]

In this thread [Link removed] this problem was solved by setting “switch layout” combination as alternative shortcut instead of “Main shortcut”. But in KDE 5 when I’m trying to set alternative shortcut to “Ctrl+Shift” I’m unable to do so since system settings awaits for some keystroke after “Ctrl+Shift” combination.

How I can set “Alternative shortcut” to “Ctrl+Shift” without updating to KDE 6?

Plasma 5 does not support arbitrary modifier-only shortcuts if I remember correctly. So setting it up that way requires Plasma 6.

(With 6.2, the keyboard configuration was revamped and streamlined; “Alternative shortcut” is now just “Shortcuts” and what was called “Main shortcut” before is now “Legacy shortcuts”.)

Maybe there is some hacky workarounds for Plasma 5? Sadly Plasma 6 has not made it to Kubuntu LTS yet.

I don’t think so – there was a workaround for modifier-only shortcuts by adding custom configuration to kwinrc, but I think it only worked for single keys, not combinations like Ctrl+Shift. And it could only perform dbus calls; there may be a dbus call to switch keyboard layouts but I can’t say for sure.

I think if you’re using Plasma 5, you’ll have to use a different shortcut, or live without other Ctrl+Shift shortcuts.

1 Like

I set the shortcut in the tray applet - Alt+CapsLock (simulates clicking the plasma applet) and toggles the keyboards for me.