# \[UMG\] Right Mouse click on a button

**URL:** <https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027>\
**Category:** UI\
**Tags:** button, event-firing, unreal-engine, question, UMG\
**Created:** [November 27, 2014, 7:51pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027 "2014-11-27T19:51:27Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flakky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/flakky/32/918696_2.png) [@Flakky](https://forums.unrealengine.com/u/Flakky)\
**Post date:** [November 27, 2014, 7:51pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/1 "2014-11-27T19:51:27Z")

</div>

Is there any way to fire OnClicked event, when I press RMB on a UMG Button?

Right now it fires only when i press Left mouse button, so i have to compare cursor position with button pos&scale in Character. Its not the best way to make, but I didn’t find any other way to do this yet.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e2bc4174](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e2bc4174](https://forums.unrealengine.com/u/anonymous_user_e2bc4174)\
**Post date:** [December 2, 2014, 10:05am UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/2 "2014-12-02T10:05:21Z")

</div>

Conditions: cursor is over the button → true + right mouse button pressed event → true = umg button is pressed by right mouse click.

---

<div class="post-metadata">

**Author:** ![Flakky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/flakky/32/918696_2.png) [@Flakky](https://forums.unrealengine.com/u/Flakky)\
**Post date:** [December 2, 2014, 10:49am UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/3 "2014-12-02T10:49:13Z")

</div>

I do the same thing, but thank you for answering.

Hope Epic will add OnRightClick event to UMG button 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a2509f6c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a2509f6c](https://forums.unrealengine.com/u/anonymous_user_a2509f6c)\
**Post date:** [July 11, 2016, 2:18pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/4 "2016-07-11T14:18:04Z")

</div>

I’m also interest in OnRightClick Event, I’m currently using hover + right click event dispatcher, however when I right click and drag from one widget to another it thinks both are hovered.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e815e8ea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e815e8ea](https://forums.unrealengine.com/u/anonymous_user_e815e8ea)\
**Post date:** [July 25, 2016, 11:40pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/5 "2016-07-25T23:40:46Z")

</div>

Also interested in this.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [August 4, 2016, 4:00am UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/6 "2016-08-04T04:00:34Z")

</div>

Where is this “right click event dispatcher” of which you speak? I can’t find that node in my widget.

---

<div class="post-metadata">

**Author:** ![wellbye](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wellbye](https://forums.unrealengine.com/u/wellbye)\
**Post date:** [August 10, 2016, 10:01am UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/7 "2016-08-10T10:01:05Z")

</div>

+1…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a2509f6c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a2509f6c](https://forums.unrealengine.com/u/anonymous_user_a2509f6c)\
**Post date:** [August 10, 2016, 1:17pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/8 "2016-08-10T13:17:49Z")

</div>

There is no “Rightclick Event dispatcher” I created a custom event dispatcher in my controller that’s fired off on right click. Then each widget receives the custom event dispatch it then checks if it’s “hovered” If true it executes that it’s been right clicked.

---

<div class="post-metadata">

**Author:** ![wellbye](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wellbye](https://forums.unrealengine.com/u/wellbye)\
**Post date:** [August 10, 2016, 1:24pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/9 "2016-08-10T13:24:21Z")

</div>

thanks for explain!  
it’s a little trick, but better than nothing

---

<div class="post-metadata">

**Author:** ![danieru](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@danieru](https://forums.unrealengine.com/u/danieru)\
**Post date:** [August 16, 2016, 8:03am UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/10 "2016-08-16T08:03:06Z")

</div>

You can use “IsMouseButtonDown” upon the “Mouse Event” to see exactly which key triggered the event. This allows you to filter depending on if it is left or right.

Like this:

 ![103016-screenshot_210.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/4/184f626205e2f09e4f38e7a8b682d08156268cfe.png)

---

<div class="post-metadata">

**Author:** ![enzyme42](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/enzyme42/32/703661_2.png) [@enzyme42](https://forums.unrealengine.com/u/enzyme42)\
**Post date:** [December 2, 2016, 9:58pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/11 "2016-12-02T21:58:18Z")

</div>

this is actually a better way than what is chosen as the answer

---

<div class="post-metadata">

**Author:** ![enzyme42](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/enzyme42/32/703661_2.png) [@enzyme42](https://forums.unrealengine.com/u/enzyme42)\
**Post date:** [December 2, 2016, 10:04pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/12 "2016-12-02T22:04:10Z")

</div>

![117210-rightmouseclick.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/d/80d3bb244887d82a16e9b0ab6963e85b58cc22d6.gif)

---

<div class="post-metadata">

**Author:** ![rit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rit](https://forums.unrealengine.com/u/rit)\
**Post date:** [October 2, 2017, 5:04pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/13 "2017-10-02T17:04:27Z")

</div>

I’m still trying to figure out a way to make UMG notice right mouse drag so far no progress… ☹

---

<div class="post-metadata">

**Author:** ![DesolanceR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DesolanceR](https://forums.unrealengine.com/u/DesolanceR)\
**Post date:** [March 19, 2018, 3:19am UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/14 "2018-03-19T03:19:45Z")

</div>

This is how I do it.

 ![234265-rightmousebutton.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/f/d3f26ec2d3a91bbe7d8b8ad3f1657450642ee371.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e168914d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e168914d](https://forums.unrealengine.com/u/anonymous_user_e168914d)\
**Post date:** [May 17, 2019, 7:03pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/15 "2019-05-17T19:03:58Z")

</div>

On drag detected, but change the parameter from left mouse button to indicate that it is the right mouse button you are interested in. This works as intended. It works well. You can click and drag with left mouse, middle mouse, right mouse, ThumbMouseButton, ThumbMouseButton2, and also any of the KB keys…

---

<div class="post-metadata">

**Author:** ![Aikirob](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aikirob](https://forums.unrealengine.com/u/Aikirob)\
**Post date:** [January 1, 2021, 12:57pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/16 "2021-01-01T12:57:12Z")

</div>

![326053-best-way.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/e/6/9e61d1d2b437c33b6ed998715d1edab1d6fa9133.png)

I just made a boolean activate on right click on my player controller and deactivate on release, then cast to my player controller to get the boolean for the right click function, this way actually works, all the ones above this dont work anymore.

---

<div class="post-metadata">

**Author:** ![CudaCal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CudaCal](https://forums.unrealengine.com/u/CudaCal)\
**Post date:** [June 27, 2022, 5:33pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/17 "2022-06-27T17:33:41Z")

</div>

Still work even in UE5. Thanks!

---

<div class="post-metadata">

**Author:** ![ShadiezTTV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ShadiezTTV](https://forums.unrealengine.com/u/ShadiezTTV)\
**Post date:** [November 21, 2022, 4:27pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/18 "2022-11-21T16:27:37Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/e/4/9e4bc7f06b7403b202fdc8795ccdea7739312c71.png)  
The image above is created from this video: [UE4 Inventory And Crafting / Use and Drop from Right click menu - YouTube](https://youtu.be/IG7lxTXy1pw)

This worked for me

The solutions didn’t really work for me (well I didn’t want to use event tick)

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/6/0f696d751752d8495ec0735f327f35ca279a5087.png)  
Another side note is On Preview Mouse Button Down is for left click and I guess On Mouse Button Down is for right click.

I’m using EU5

---

<div class="post-metadata">

**Author:** ![Xvixicho](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xvixicho](https://forums.unrealengine.com/u/Xvixicho)\
**Post date:** [May 6, 2024, 1:36pm UTC](https://forums.unrealengine.com/t/umg-right-mouse-click-on-a-button/300027/19 "2024-05-06T13:36:19Z")

</div>

+1
