Can I change Synapse shortcut to Super/Windows key alone?

When I try to edit the synapse config it does not allow me to use the left Super as a shortcut to invoke it. Is there a round-about way that I can go through.

Synapse Configuration

When I just press the Windows/Super key the configuration window does not acknowledge it. However, a combination shortcut (such as Super+A) does work fine.

Since I'm using Precise, with Unity, I'd also need a way to change the default dash behaviour for Windows/Super key to something else.


Solution 1:

I know this is a little old now but thought solution by be useful anyway.

First remove any super key bindings e.g. <super>+p is a common one for screen settings

Then close Synapse

In ~/.config/hotkeys/synapse.hotkeys

change

Signature=<Control>space

to

Signature=Super_L

Relaunch Synapse

Solution 2:

In later versions of synapse installed from the launchpad ppa the setting is in .config/synapse/config.json. Edit it while synapse is closed to specify Super_L as activation key.

{
  "ui" : {
    "shortcuts" : {
      "activate" : "Super_L",
      ...
    }
  }
}

See https://launchpad.net/~synapse-core/+archive/ubuntu/testing.

Solution 3:

See better answer below this one.

You must bind the action to the Super's scancode or keycode; normal hotkeys record the state of the modifier keys and throw away their keypress events; so you never see something that reacts to just pressing Alt, but instead to the A key plus the Alt key's recorded state.

The hotkey library in use is libgtkhotkey (0.2 on 12.04) and it doesn't support using the key press event from modifier's. You'd have to write your own patch to catch that and perhaps support such a thing in the signature format.

All tests with the existing signature format failed to produce anything but an error.

Solution 4:

A temporary workaround is to remove the modifier from super and remap the key to a "normal key" you do not use. I choose "µ", which is named "mu".

xmodmap -e 'keysym Super_L = mu mu mu'

xmodmap -e 'clear Mod4'

The first command will pretty much make super useless for anything else than typing "µ" and the second command will clear all Mod4 modifiers (I do not use them anyway). Use xev to find the name of a key, look for a line similar to:

state 0x80, keycode 58 (keysym 0xb5, mu), same_screen YES,

The changes will be lost after logging out. To make them permanent, add the commands to your .bashrc OR create a file named .Xmodmap in your home directory with the content:

keysym Super_L = mu mu mu

clear Mod4

If you mess up while playing around with xmodmap, just log out and log back in again to restore your old settings.

I've only tested with this one key, and I can still type µ by pressing Alt Gr + M without having Synapse pop up. I also tried remapping Super to Page Up; Synapse was able to detect the key while entering it in the settings, but failed to open the launcher when pressing it.