8

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

Pablo Bianchi
  • 15,657
janw
  • 546
  • 8
  • 24

2 Answers2

2

You can use xbindkeys

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

For more info, see man xbindkeys.

Pablo Bianchi
  • 15,657
  • 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 07 '16 at 20:42
  • 1
    Please edit your post with the contents of ~/xbindkeysrc. – ijustlovemath Nov 07 '16 at 20:46
  • 1
    I got it Mod2+Mod4 + e = super+e but normal super is just plain old Super_L – janw Nov 07 '16 at 21:00
  • You should try binding both Super_L and Mod2+Mod4 to the script. – ijustlovemath Nov 07 '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 08 '16 at 15:18
0

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