How to Disable Super Key in Ubuntu While Running Full Screen Apps


There are times when we use our Ubuntu systems for playing games, watching movies, or working on applications in full screen mode, and what we really don’t want while doing these activities is to accidentally trigger any form of distraction. One such distraction is the opening of Ubuntu’s Unity Dash when the Super (Windows) key is mistakenly pressed.

Of course, you can permanently disable the key to make sure that nothing happens when it is pressed, but that’s not the best solution given all you want is to prevent the key from doing anything when an application is running in full screen mode. Thankfully, there’s now a way – although not official – to disable the Super key only for full-screen apps.

Please note that the solution we’ll be discussing here has been tested on Ubuntu 16.04 LTS.

Disable Super Key

The tool that does the trick in this case is nothing but a small python script written by an AskUbuntu user Serg. To download and set up the script, execute the following commands:

cd /opt
sudo git clone
sudo chmod -R +x sergrep

Once downloaded, the script can be executed in the following way (assuming that you are in the /opt directory):

python sergrep/

The aforementioned command will not produce any output on the terminal.


But it will do what it promises – prevent Super key from opening Unity Dash for full-screen applications.

The script also has a debugging option which can be enabled by changing line number 34 from debug = False to debug = True and running it from the command line again. The following screen shot shows the output the script produces when run with the debugging option enabled.


In the screenshot above, the lines beginning with the word “Disabled” were printed when I tried pressing the Super key while a full-screen application was running.

Keep in mind that the “disable_super_key” script only disables the Super key; it doesn’t prevent Super key combinations like “Super + L” from¬†initiating any corresponding action. But that, I personally believe, should not be a major problem, as the accidental pressing of a key combination should be rare.

It’s worth mentioning that Serg also came up with a solution to make sure that the disabling of the Super key can be made workspace-specific. The solution, he says, is generic and basically consists of a wrapper script that executes the user’s command upon entering a workspace, and sends SIGTERM to it when the user enters a workspace not on the list. Sadly, however, the solution – as per my testing – doesn’t work on Ubuntu 16.04.


The “disable_super_key” script created by the author undoubtedly is a very good solution to the problem it caters. It’s really easy to download, install, and execute. Needless to say, you can always make the script start automatically when logging in to make things more convenient.

Himanshu Arora
Himanshu Arora

Himanshu Arora is a freelance technical writer by profession but a software programmer and Linux researcher at heart. He covers software tutorials, reviews, tips/tricks, and more. Some of his articles have been featured on IBM developerworks, ComputerWorld, and in Linux Journal.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox