You are not logged in.

#1 2020-09-12 09:43:57

Registered: 2015-08-10
Posts: 3,180

[KDE5] Modifier-only shortcuts by abusing dead keys

On Linux, Alt, Meta (also called Super or Windows key), Ctrl, AltGr are modifier keys and usually expected in combinations with at least a single non-modifier-key.

However, as known from Windows, Meta can be used to open the Start menu. Likewise, on Linux, I prefer Meta to open the KDE application launcher for me -- which works as a Start menu with built-in search -- on a single key press.

In current KDE Plasma, this can be achieved by compiling a kwinrc section called ModifierOnlyShortuts where you can make KDE launch anything but need to find out about dbus service and methods and so on which you need to address the service you want to launch. Previously created for Plasma versions that did not support this, but still working, ksuperkey is a small tool that essentially implements the ModifierOnlyShortcuts section.

But there is a small hack: When creating any shortcut, for example the action for Application Launcher, KDE allows you to enter the combination Meta + dead key. Dead keys are for example the acute ^ or backtick which usually expect a key symbol to follow it (â, ô, á, ó, à, ò). Dead keys are by default on many European keyboard layouts. After creating the shortcut with the dead key, Plasma will essentially ignore the dead key part and trigger the shortcut just when you press Meta (and possibly any other modifier-only shortcut).

Be careful to not create conflicting shortcuts using this method or shortcuts on keys like shift smile

This has been working for years now but in the meantime I had forgotten about this. Just writing this down so I have something to look up in the event I mess up my shortcuts again.

There is no competition between bugs. When you combine two awesome bugs, you get a totally awesome bug.


#2 2020-09-12 14:33:46

From: squirrels' nest
Registered: 2015-09-29
Posts: 526

Re: [KDE5] Modifier-only shortcuts by abusing dead keys

^Thanks, it's a clever workaround. This one goes in my tip bucket.

I just installed KDE desktop on Debian today and was wondering, why application menu will not launch with Meta key like it does in Fedora.

edit: Hmm. This explains the difference:

KDE userbase wrote:

Feature has been added by default since Plasma 5.8.

Last edited by nore (2020-09-12 14:45:00)


Board footer

Powered by FluxBB