I tried to add it in the default shortcuts application but it just won't accept super on it's own. It will accept Super + X But I just want to override the super key.

I'm using Mate so no Unity conflict.

I tried searching and did found a few very specific work around but none with the super key and a custom command/script.

Example what I want is:

Press Super
Do bash ~/rearange_windows.sh --all

  • Make sure that Super key isn't used, for MENU maybe,
    – Fcmam5
    Nov 6 '16 at 19:08

You can use xbindkeys

Put your command with a "release" event into ~/xbindkeysrc.

For more info, see man xbindkeys.

  • I did get it to work with super+e but nothing I tried will trigger the super action I defined. It's not bound to any other action currently. I tried multiple annotations which worked for super+e. Also when googleing 'xbindkeys windows' and related I can't find anything.
    – janw
    Nov 7 '16 at 20:42
  • 1
    Please edit your post with the contents of ~/xbindkeysrc. Nov 7 '16 at 20:46
  • 1
    I got it Mod2+Mod4 + e = super+e but normal super is just plain old Super_L
    – janw
    Nov 7 '16 at 21:00
  • You should try binding both Super_L and Mod2+Mod4 to the script. Nov 7 '16 at 21:11
  • I tried Mod2+Mod4 + Super_L and Mod2+Mod4 solo both didn't work. But like I said I got it working
    – janw
    Nov 8 '16 at 15:18

As mentioned by @ijustlovemath, yes, you can use xbindkeys, but I suggest a different format for your command.

Add this to ~/xbindkeysrc:

"xte 'keydown Super_L' 'key e' 'keyup Super_L'"
   bash ~/rearange_windows.sh --all

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.