How to bind the Super-key to whiskermenu without breaking Super+Other combinations

keyboard shortcutsxfce

Coming back from Windows 7 I'd like two kinds of shortcuts to work at the same time:

  • Pressing Win (a.k.a. Super) alone should open the whiskermenu e.g. for quick application launch
  • Pressing Win + an arrow should provide the same behaviour as Windows does, i.e. Maximizing/Restoring, Minimizing, Tiling Left/Right

Unfortunately when I set up both the Window manager shortcuts for the latter and the keyboard application shortcut xfce4-popup-whiskermenu to Super-L, the Window manager combination are ignored and upon releasing the Win the whiskermenu opens nonetheless.

How can this be fixed?

(I'm running Arch Linux, if that is relevant)

Best Answer

Use xcape to fix this (KDE users might be interested in ksuperkey). While this small background daemon is useful to bind keys to another (combination of) keys, it also comes along with the feature of running actions only when keys are released, not when they are pressed.

  1. Install xcape.

  2. Assign Linux key Super to a placeholder shortcut like ⎈ Shift⎇ Ctrl⇧ AltLinux key SuperD or any other shortcut that is not taken by another application:

    xcape -e 'Super_L=Shift_L|Control_L|Alt_L|Super_L|D'
    
  3. Make sure to start whiskermenu with the same shortcut. Do this by adding a shortcut in Settings > Keyboard > Shortcuts.

  4. Add your xcape command in Settings > Session and Startup > Application Autostart to automatically start xcape when xfce boots up.
Related Question