23

In Ubuntu 18.04.1, I would like to use my left Super-key only to simply open the Show Applications menu (aka Dash) like a left click on the dock-icon (with the 9 dots) does and preferably close it again without showing me any open programs.

I can open it with Super + A and even close it again with Super R, but Super L appears to do nothing at all.

In Xfce, something similar was possible by adding a custom keyboard shortcut for Super L and setting the command to xfce4-popup-whiskermenu, which would open and close a menu with favourite applications. Unfortunately, I don't know the command that opens and closes the Show Applications menu.

Is there any way to add such a shortcut in the new Gnome Shell?

Prototype700
  • 910
  • 9
  • 29
  • 57

4 Answers4

23

Solution 1: Gnome extensions

Install the extension Start Overlay in Application View to use the Super key alone to open the Application overview.

Solution 2: xcape (more universal approach that allows you to do whatever you want with super)

With the utility xcape, you can remap a press/release of the super key alone to any key combination. xcape can be installed with the command sudo apt install xcape.

In this case, you would launch xcape with the command xcape -e "Super_L=Super_L|a". This will remap hitting and releasing super alone to the default key combination for opening the applications menu.

  • Disable the default binding of super to show the overview. You can do this with the command gsettings set org.gnome.mutter overlay-key '', or using dconf-editor.
  • Have xcape autostart using a .desktop file that you place in your ~/.config/autostart folder.

An example of such xcape.desktop file:

[Desktop Entry]
Categories=Utility;
Comment=Map super key
Exec=sh -c 'sleep 0.4 ; xcape -e "Super_L=Super_L|space"' 
Icon=keyboard
Name=xcape
StartupNotify=false
Type=Application
X-GNOME-Autostart-enabled=true

Optionally, install the extension ESC to close overview from applications list to have Esc return you to your desktop rather than to the overview. In Ubuntu 20.04, use a forked extension: ESC to close overview from applications list | UPDATED by paperthin or ESCape Overview.

vanadium
  • 82,909
  • 6
  • 116
  • 186
  • Hi vanadium, thank you for the hint. I will take this into consideration, but I don't like the fact that I have to download a utility just for this completely simple change of shortcuts and that "The normal operation of super in Gnome Shell needs to be disabled first." – Prototype700 Sep 29 '18 at 20:49
  • Like it or not, that's the only way I know. "Disabling" the normal operation means nothing here. With a single command, you can reset this to default. You also can use dconf-editor. Used this approach myself to launch Albert with . – vanadium Oct 01 '18 at 08:33
  • 2
    Found the extension that does the trick. I edited my solution to include that approach, but I left ksuperkey in, because it might be useful for other Gnome Shell tweakers. Thank you for the bounty ;) – vanadium Oct 01 '18 at 16:05
  • Well, there you are. I'd still be interested in the dconf solution you were mentionining, if you're considering to expand your answer even more. The extensions work fine, though. How were you able to find them? They don't share a single keyword, but I might also have searched badly and had no time to look any further so far. – Prototype700 Oct 05 '18 at 12:51
  • I am using the second extension. I saw the first extension long time ago, but actually forgot about it. Very much by hazard, I bumped on to it again, and indeed realized my first answer (retained as second option here) was too complex ;) The only thing happening with dconf is that the keybinding of in Gnome Shell is turned off, so that the utility ksuperkey can take over without interference. Works seamlessly, and you can bind anything you want to , Gnome Application view or a launcher of your own or anything else. – vanadium Oct 05 '18 at 14:13
  • "ESC to close overview from applications list", at this moment, is not working in Gnome 3.36 (shipped in Ubuntu 20.04). – Rael Gugelmin Cunha Apr 25 '20 at 14:37
7

For Ubuntu 22.04 use these extensions:

Rael Gugelmin Cunha
  • 6,745
  • 2
  • 34
  • 35
3

You can also use xmodmap to change what a specific button would do

xmodmap -e 'keycode 68 = Menu'

Here you can find which key triggers the Menu:

xmodmap -pke | grep Menu

Ruben Verster
  • 141
  • 1
  • 5
0

You can use the following commands:

gsettings set org.gnome.mutter overlay-key '' 2> /dev/null
gsettings set org.gnome.shell.keybindings toggle-application-view "['Super_L']" 2> /dev/null
BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77