How to make windows button alone to open Main menu in KDE?

5,450

Edit: After some help from @DKBose I am 90% sure this is a duplicate of an older question:

How to activate application launcher using meta key

Relevant excerpts:

Turned out I had modified the file ~/.config/kwinrc when I installed Latte dock and after I removed it, the meta key was no longer activating Plasma's application launcher.

To enable it again open ~/.config/kwinrc and update the following section:

[ModifierOnlyShortcuts]
Meta=org.kde.plasmashell,/PlasmaShell,org.kde.PlasmaShell,activateLauncherMenu

[ . . . ]

Interesting! I don't have the [ModifierOnlyShortcuts] section in my ~/.config/kwinrc (Kubuntu 18.04) and the meta key works to activate the launcher.

and from the linked forum post:

You can try this oneliner: Code:

kwriteconfig5 --file kwinrc --group ModifierOnlyShortcuts --key Meta ""

(it writes a config key in ~/.config/kwinrc that should prevent the meta key from opening the launcher...you may need to re-login into plasma for this to take effect. )

Below is the original answer relating to the default behavior in 18.04.

End of edit.

Plasma 5.8 and later exhibits this behavior by default. If you have Plasma 5.8 or later installed and the Super/Meta/Windows key does not open the application launcher, this is because of an old configuration file.

As discussed in an older question, if you have mapped it to something else, setting the shortcut key to Alt-F1 automatically enables the super key as a shortcut to open the application launcher. Here it is for kickoff (a.k.a. Application Launcher):

Application Launcher Settings, Keyboard shortcuts

and here it is for kicker (a.k.a. Application Menu):

Application Menu Settings, Keyboard shortcuts

I have verified that this works for both on my machine running 18.04. It looks like you are using kicker, so you should be able to enable this behavior on your machine.

This feature was announced at the time:

Thanks to our Wayland effort, we can finally offer so-called “modifier-only shortcuts”, enabling you to open the application menu by just pressing the Meta key. Due to popular demand, this feature also got backported to the X11 session.

https://kde.org/announcements/plasma-5.8.0.php

Today I’m happy to announce that for the first time we were able to backport a new feature from our Wayland offerings to X11: modifier only shortcut support. This is one of the most often requested features in Plasma and I’m very happy that we finally have an implementation for it.

Modifier only shortcuts mean that an action is triggered if one clicks a modifier key without any other key. By default the Meta (also known as super and windows) key triggers the main application launcher of your Plasma session. But the implementation is way more flexible and allows to use any modifier (ctrl, alt or shift) as a trigger for an action (currently configuration is only possible through manual modification of kwinrc).

https://blog.martin-graesslin.com/blog/2016/08/modifier-only-shortcuts-available-in-plasma-5-8/

Here are the commits in August 2016 that added this:

Launch Plasma's launcher menu on meta modifier only shortcut by default

Invokes org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.activateLauncherMenu.

https://phabricator.kde.org/D2357

https://github.com/KDE/kwin/commit/9b30cfef1d212ed2b40510a70d1f92c497f44398

Add a dbus call to activate the "main" application launcher

ShellCorona provides a new DBus method "activateLauncherMenu". If that is invoked it will look through all panels for an applet which has X-Plasma-Provides with org.kde.plasma.launchermenu. If that also has a global shortuct it gets activated and no further applet is searched.

The idea behind this DBus call is to provide a way to KWin to activate the main appliction launcher when the Meta key is pressed.

https://phabricator.kde.org/D2356

https://github.com/KDE/plasma-workspace/commit/267b6a8dfb4ad3b4f9da010d2aeaeebec25c5c0f

Related:

Share:
5,450

Related videos on Youtube

Dims
Author by

Dims

Updated on September 18, 2022

Comments

  • Dims
    Dims over 1 year

    Is it possible to make windows button alone to open Main menu in KDE?

    enter image description here

    If I am trying to do this with standard settings dialog, it waits for some additional key to be pressed.

    • Nathaniel M. Beaver
      Nathaniel M. Beaver almost 5 years
      Using the Windows button / super key works by default in Kubuntu 18.04. What is different about your configuration?
    • Dims
      Dims almost 5 years
      @NathanielM.Beaver did you try to enter it in configuration window I showed?
    • Archisman Panigrahi
      Archisman Panigrahi over 3 years
      Does this answer your question? How to activate application launcher using meta key
  • DK Bose
    DK Bose almost 5 years
    I think the questioner seems to want to use the GUI indicated in the question. I'm guessing that that GUI is not meant for "modifier-only" shortcuts. For that one has to add a section to ~/.config/kwinrc as mentioned here and elsewhere or to run kwriteconfig5 --file kwinrc --group ModifierOnlyShortcuts --key Meta "". And, as you pointed out, Meta does what is wanted by default unless something, not mentioned, has been done to disrupt that.
  • Nathaniel M. Beaver
    Nathaniel M. Beaver almost 5 years
    @DKBose Hm, interesting. I was able to get kicker / Application Menu working with just the Meta/Super key, and I don't see that section in my kwinrc. It seems more investigation is required. Edit: I see you having the same discussion on the other thread. Funny how things repeat sometimes.
  • HilarieAK
    HilarieAK over 2 years
    The year 2021 is coming to a close, and none of these solutions work anymore.
  • Nathaniel M. Beaver
    Nathaniel M. Beaver over 2 years
    @HilarieAK These solutions work fine for me on Ubuntu 18.04. Perhaps you could start a new question if you are using a different version?