In Ubuntu (Unity), the Super (Windows) key is used to open Unity Dash. Accidentally pressing the Super key when playing fullscreen games can be quite annoying, because Dash covers quite a bit of the screen, so you can't see what's going on, and it also switches the keyboard input from the game to Unity.

If you've gotten used to using the Super key to open Dash and don't want to change it, you can use a Python script, created by Sergiy Kolodyazhnyy for AskUbuntu, which automatically disables the Super key from opening Unity Dash, if there are any fullscreen windows. Note that the script has only been tested in Ubuntu 16.04.

The script does not disable Super key combinations, so for instance, Super + L will continue to lock the screen, etc. Only opening the Dash is disabled, which is triggered by pressing the Super key alone.

Update: since the Alt key triggers the HUD by default, which causes the same issues as the Dash, I modified Sergiy's Python script to also disable the Alt key (only for opening HUD) while there are fullscreen windows. You can check out the script code HERE.

To install the modified script that disables both Alt and Super keys from opening Dash and Hud when a fullscreen window is focused, use the following commands: