Bind 'Press Pointer Key' and 'input action mapping' on the same button doesn't work?

You should go to

EditProject Settings…

EngineInput

And create action mappings that you can then use in your BPs.

If you want your inputs to toggle, or do multiple things, you can use Branch and Sequence accordingly.

Edit to address misfiring:

I think the problem is that the Left Click is reaching the Button before the Right Click.

If you…

  • Click on a button with left mouse and hold
  • Then click with right mouse
  • Then release left mouse
  • Then release right mouse

Then the button will not be clicked. Which I think is the same behavior, you’re experiencing.

You can add a delay of 0.0 to perhaps circumvent this or use a different button to simulate this besides the Right Click. Because RightClick is still clicking.

Why do you want to have the Right Mouse Button click the Left Mouse Button?

Updated answer to address this.

One button shouldn’t be doing both the right and left click… those cancel each other out.

Just like if on your computer you click with left and right and hold in specific orders.

No problem, happy to help

Action Mappings just create Action Events when you press that input. UMG Widgets by default take in pointer events to fire pressed and unpressed events. So you wouldn’t need to make the mousebuttons do anything in action mapping to be able to use A for the pointers.

you can have it do other things, just check to see if linetrace is hitting a widget.

And don’t use the same button for left and right mouse clicks… you probably won’t need anything to do a right mouse click anyway.

you can just Sequence those events then, use a Sequence Node, you can also add a Delay node so the task is queued. Even for 0 seconds, so it executes right after the current sequence.

Hi everyone, I want to use the ‘right mouse button’ to simulate the ‘left mouse button’ by using the ‘‘Press Pointer Key’’ node. At the same time , I want the ‘right mouse button’ to do another action.
But when I achieve this, Only the ‘‘Press Pointer Key’’ works.

Is there any solution to solve this ,or I just have to divide them into different buttons?
Hope for ur help, thank u.

Hi
I think u may misunderstand what I mean.
I have already make the Project Setting right, but when I use the ‘‘Press Pointer Key’’ node to make the Right mouse button simulate the Left mouse button , what I found is that I can’t use the right mouse button to do thing I defined before.
I tried the branch and sequence but they didn’t work.

Actually I want to use the “Press Pointer Key” in VR . I have to make the “Motion Controller Trigger” to simulate the “Left Mouse Button” in order to communicate with the umg button.
I found that when I use the press pointer key node , I can’t use the trigger to do other things.
It is quite the same as what I mention above.

I am just considering one button can only do the “Press Pointer Key” or “Input Action”, but not both?

Another question,
If I use ‘Press Pointer Key’ to make one button (can be any button,for example ‘A’) simulate what ‘left mouse button’ do, and I set the project input and create action mappings for ‘left mouse button’. Is it possible that I press ‘A’ to do the action that I create for ‘left mouse button’?
BTW thanks for ur patience with my nonstandard English.

But in VR project, there is no mouse. I have to use other button to simulate Mouse Click. However when I do this, the button I use to simulate just can’t do anything else.

It’s a good solution, but sometimes I need to call some function or events when I am communicating with UMG. However it failed. Maybe I still need to use 2 buttons?

How about this