Prevent launcher from showing when Super key is merely held down or when it's combined with another key

Context

I like using the Super key as a modifier key as part of various keyboard shortcut combinations. For example, as part of grid I have two shortcut keys (Super+H and Super+L) that put windows to the left and right respectively.

However, when ever I use these shortcut keys the Unity launcher menu is displayed as well. This does not happen when I press Windows+1,2,3.

I also like the fact that in general the Unity launcher menu is triggered by the Super key (i.e., when not pressed in combination with another key). So I don't want to disable it completely.

Question

  • Is there a way of preventing the Unity launcher menu from displaying when the Super key is combined with another key?

Solution 1:

You probably can't get the functionality you want without making some edits to Unity itself. (Requires programming knowledge)

There's no clear way to tell the difference between the two cases. Either Unity can bind to key press/release events on Super (which won't see other keys being pressed while it's held) or it can bind to key combinations, in which case it won't see Super except as a modifier on whatever key that was pressed in combination with it.

It should, theoretically, be possible to achieve the functionality you want by having Unity use XGrabKeyboard when you press Super and and XUngrabKeyboard when you release it, but it's not exactly common to go whole-hog on it.

What I usually see in things like IceWM and Windows is for there to be a global keybinding on the Super key and then local keybindings on the window that it calls up for things like Super+R (Windows Run... dialog) and so on.

My advice would be to rebind your launcher shortcut to something almost as easy to hit as a bare Super. (I use Super+Space for the copy of gmrun I use in Lubuntu which matches nicely with using Ctrl+Space and Alt+Space for other launchers like SiteLauncher in Firefox)