https://blog.hanschen.org/2012/10/17/open-application-launcher-with-super-key/
How to make it work
- Install ksuperkey. You can download the source and some distro-specific packages from Linux-apps, but compiling the latest version is also straightforward. First install the dependencies, for example on Ubuntu-based systems:
sudo apt-get install git gcc make libx11-dev libxtst-dev pkg-config
On some systems you’ll also need to install the
build-essential
package (otherwise you’ll get the following error:stdlib.h: No such file or directory
). Then run the following commands in a terminal:git clone https://github.com/hanschen/ksuperkey.git cd ksuperkey make ./ksuperkey
ksuperkey runs in the background so you won’t see it
- Make sure that the keyboard shortcut for your application launcher is set to Alt+F1 (this is what ksuperkey will send when you press and release the Super key on its alone). Right click on the application launcher icon → Application Launcher Settings → Keyboard Shortcut.
Checking that the shortcut for Application Launcher is set to Alt+F1
- Now pressing the Super key should open the application launcher! If you want this behavior every time you log in, you have to set ksuperkey to Autostart, for example in System Settings → Startup and Shutdown → Autostart → Add Program… → small Browse button → Select the ksuperkey application.
Add ksuperkey to Autostart
Tips
- It’s safe to move the ksuperkey directory to anywhere you want. If you’ve added it to Autostart in System Settings, don’t forget to update the “Command” field with the right path (or remove the old entry and add a new one).
- You can use ksuperkey for any action, for example to open KRunner – just bind Alt+F1 to the action.
- If you want to change the keys sent by ksuperkey to something else, e.g. Alt+F2, you can easily modify the source code. Open
xcape.c
in a text editor (e.g. Kate), go to line 92 and changeXK_F1);
to the key you want, e.g.XK_F2);
. Recompile withmake
and you’re done. - ksuperkey works fine on other workspaces/window managers as well, although it will probably cause problems if the workspace already uses the Super key as a non-modifier key (Unity, GNOME Shell).