6

The heading says it all. In short I want to have the behavior as in gnome-shell : when I release the super key, the overview is triggered. With xfce, I want it to trigger the main menu.

I have the whisker plugin installed, so its just the matter to selecting xfce4-popup-whiskermenu as the command for the shortcut, but the problem I am facing is that simply selecting Super key binds it to "press" event rather than release, which is not what I want.

There doesnt seem to be a way to do it via the settings manager GUI. Is there a way to edit xfce configuration files to achieve this ?

3
  • Hello, same problem here. Did you find a solution since then?
    – Louisbob
    Commented Jan 8, 2015 at 20:27
  • 3
    This question is similar to: Bind Windows key to xubuntu "Start Menu". If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. Commented Aug 10 at 14:17
  • 1
    Specifically look at my answer which use xcape for binding the appropriate keys to "Super": askubuntu.com/a/1356907/618353 Commented Aug 10 at 14:21

1 Answer 1

1
+50

Edit: A simpler solution is to use the xcape package, as described in this answer.

Wow. 10 years ago?! Better late than never, I guess? ;-)

You can certainly do this with xbindkeys.

sudo apt-get install xbindkeys

Run xbindkeys -k and press the "Super (Win) key" to find the key name.

For example:

system@/dev/pts/5:$ xbindkeys -k
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
    m:0x50 + c:133
    Mod2+Mod4 + Super_L

Now you can add the following to ~/.xbindkeysrc

# Run command on Super_L release event
"bash -c xfce4-popup-whiskermenu"
  release+Super_L

Now, run xbindkeys -p to poll for the changes.
If all went well, it works!


I have a hail mary workaround idea.

# Run command on Super_L release event
"bash -c 'sleep 0.1; xfce4-popup-whiskermenu'"
  release + m:0x50 + c:133

Introduce a slight delay to give the menu time, and hopefully trigger correctly upon release. If 0.1 doesn't work try up to .5, but if by half a second it doesn't work, it's not going to.

Make sure that, after changes, you run xbindkeys -p. To really make sure, pkill xbindkeys && xbindkeys Completely stopping and restarting the program is a guarantee.


If the "hail mary" fails, you could try a possible interception.

sudo apt-get install xdotool

Then run:

nano ~/super_key_menu.sh

Add the following:

#!/bin/bash

# Wait for the Super key to be released
while true; do
    # Check if the Super key is pressed
    if xdotool getkeystate 133; then
        sleep 0.1  # Delay to ensure key release is detected
    else
        # Trigger the Whisker menu
        xfce4-popup-whiskermenu
        break
    fi
    sleep 0.05  # Check every 50ms
done

Save & exit, then chmod +x ~/super_key_menu.sh

Now, change the bash -c line in ~/.xbindkeysrc to:

"bash ~/super_key_menu.sh"

Restart xbindkeys or use the xbindkeys -p
(I've run into a case before where a version of xbindkeys didn't have -p.)

9
  • Thank you for the answer! Unfortunately release + Super_L does not get triggered. Without the release+ it works. Something like release + Super_L + Q works correctly aswell. Any Ideas why that could be?
    – ChrisB
    Commented Aug 10 at 8:19
  • Because it's not really a "normal" action key it's a modifier like alt & ctrl. Try using the whole line. release+Mod2+Mod4 + Super_L It's worth a shot. I usually have to omit them, but this is a unique key situation.
    – JayCravens
    Commented Aug 10 at 12:54
  • 1
    @ChrisB I had answered a similar question a while ago. Please have a look: askubuntu.com/a/1356907/618353 Commented Aug 10 at 13:23
  • @BeastOfCaerbannog: Damn. Thank you so much! Xcape works flawlessly. If your comment was an answer I would accept it. Don't really know correct procedure here, maybe we should mark this as duplicate to redirect people to your answer?
    – ChrisB
    Commented Aug 10 at 14:12
  • 1
    I forgot you're not the OP and you cannot accept it as a dupe. :P Commented Aug 10 at 14:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .