# How do I program a shortcut to ONLY execute when I release the button for xfce?

**URL:** <https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458>\
**Category:** Newbie\
**Created:** [November 28, 2021, 7:57am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458 "2021-11-28T07:57:30Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![unix\_lover](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/unix_lover/32/5462_2.png) [@unix\_lover](https://forum.endeavouros.com/u/unix_lover)\
**Post date:** [November 28, 2021, 7:57am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/1 "2021-11-28T07:57:30Z")

</div>

![image](https://forum.endeavouros.com/uploads/default/original/3X/b/a/baaa78125a31d1df929cc380297d129c2eacea5f.png)

As you can see over here, currently the whiskermenu only opens up when I press the super key. But it opens up when I press the button without releasing it. This is an issue as you can see if I wanted to open something else such as `thunar`, I have to press `super`+`E` which causes whisker to open up as well which is something I don’t want. Any ideas how I can change it to open up only when I release the key?

---

<div class="post-metadata">

**Author:** ![Kresimir](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/kresimir/32/73739_2.png) [@Kresimir](https://forum.endeavouros.com/u/Kresimir)\
**Post date:** [November 28, 2021, 8:04am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/2 "2021-11-28T08:04:56Z")

</div>

Bind the whisker menu to Alt+F1. This works the same as Super, except it triggers properly when Super is released.

Don’t ask me why it’s Alt+F1… It just is. 🤣

That’s the standard way to set up a shortcut that triggers on release of Super.

---

<div class="post-metadata">

**Author:** ![unix\_lover](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/unix_lover/32/5462_2.png) [@unix\_lover](https://forum.endeavouros.com/u/unix_lover)\
**Post date:** [November 28, 2021, 8:10am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/3 "2021-11-28T08:10:29Z")

</div>

But I just did that and it doesn’t quite work

![image](https://forum.endeavouros.com/uploads/default/original/3X/a/7/a747aeae0845dd6b4d42662650df92c98845f54c.png)

I did this, and like when I press the `super` key it won’t open the whisker menu

---

<div class="post-metadata">

**Author:** ![Kresimir](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/kresimir/32/73739_2.png) [@Kresimir](https://forum.endeavouros.com/u/Kresimir)\
**Post date:** [November 28, 2021, 8:12am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/4 "2021-11-28T08:12:28Z")

</div>

You might need to run:

```auto
xcape -e 'Super_L=Alt_L|F1'

```

If it works with that, then you need to add that command to the autostart, see this:

[https://bbs.archlinux.org/viewtopic.php?id=255370](https://bbs.archlinux.org/viewtopic.php?id=255370)

---

<div class="post-metadata">

**Author:** ![unix\_lover](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/unix_lover/32/5462_2.png) [@unix\_lover](https://forum.endeavouros.com/u/unix_lover)\
**Post date:** [November 28, 2021, 8:29am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/5 "2021-11-28T08:29:50Z")

</div>

> [@Kresimir](#):
>
> You might need to run:
> 
> ```auto
> xcape -e 'Super_L=Alt_L|F1'
> 
> ```

Should I run this after I changed the keyboard shortcuts through xfce?

---

<div class="post-metadata">

**Author:** ![Kresimir](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/kresimir/32/73739_2.png) [@Kresimir](https://forum.endeavouros.com/u/Kresimir)\
**Post date:** [November 28, 2021, 8:31am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/6 "2021-11-28T08:31:41Z")

</div>

Yes. Set the shortcut as you did above to Alt+F1, and then just run this command in the terminal to see whether it works. If it does, you have to run it on every boot, that’s why you add it in the autostart settings.

---

<div class="post-metadata">

**Author:** ![unix\_lover](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/unix_lover/32/5462_2.png) [@unix\_lover](https://forum.endeavouros.com/u/unix_lover)\
**Post date:** [November 28, 2021, 8:35am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/7 "2021-11-28T08:35:12Z")

</div>

Thanks mate 🙂

It works.

So I decided to add this to my `/etc/rc.local` file as this is where I have saved other commands to run upon start 🙂

---

<div class="post-metadata">

**Author:** ![Kresimir](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/kresimir/32/73739_2.png) [@Kresimir](https://forum.endeavouros.com/u/Kresimir)\
**Post date:** [November 28, 2021, 8:37am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/8 "2021-11-28T08:37:40Z")

</div>

Yeah, that’s fine, too, I think. The post on the Arch forum I linked above suggested it being added through xfce settings, but if you prefer it in `rc.local`, I don’t think it should make a difference… If it works, it works 🙂

---

<div class="post-metadata">

**Author:** ![unix\_lover](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/unix_lover/32/5462_2.png) [@unix\_lover](https://forum.endeavouros.com/u/unix_lover)\
**Post date:** [November 28, 2021, 8:40am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/9 "2021-11-28T08:40:38Z")

</div>

Yep, thanks for your help mate =D

Although I really prefer if I could change xfce to execute the command upon key released to avoid having such complexity setup, you wouldn’t happen to know how to do this, right mate?

---

<div class="post-metadata">

**Author:** ![Kresimir](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/kresimir/32/73739_2.png) [@Kresimir](https://forum.endeavouros.com/u/Kresimir)\
**Post date:** [November 28, 2021, 8:43am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/10 "2021-11-28T08:43:15Z")

</div>

> [@unix\_lover](#):
>
> you wouldn’t happen to know how to do this, right mate?

No, I’m afraid not. I could be wrong, but I assume there’s no setting like that in xfce.

But if this does what you want it to do, I see nothing wrong with it. That’s how it’s setup on Plasma as well, all shortcuts trigger the moment they are pressed, except Super, which triggers Alt+F1 when released.

---

<div class="post-metadata">

**Author:** ![unix\_lover](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/unix_lover/32/5462_2.png) [@unix\_lover](https://forum.endeavouros.com/u/unix_lover)\
**Post date:** [November 28, 2021, 8:43am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/11 "2021-11-28T08:43:47Z")

</div>

Thanks anyways mate =D

---

<div class="post-metadata">

**Author:** ![system](https://forum.endeavouros.com/uploads/default/original/2X/9/9ea52f9fd5ef8e609e593c362d61a36295f48be8.png) [@system](https://forum.endeavouros.com/u/system)\
**Post date:** [November 30, 2021, 8:44am UTC](https://forum.endeavouros.com/t/how-do-i-program-a-shortcut-to-only-execute-when-i-release-the-button-for-xfce/20458/12 "2021-11-30T08:44:46Z")

</div>

Closed on November 30, 2021, 8:44am UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
