# Bug: Mouse Clicks not responding after set Input UI, then to Game

**URL:** <https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023>\
**Category:** UI\
**Tags:** unreal-engine, bug-report, UI, question, Blueprint, UMG\
**Created:** [April 22, 2016, 2:18am UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023 "2016-04-22T02:18:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f54268a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f54268a3](https://forums.unrealengine.com/u/anonymous_user_f54268a3)\
**Post date:** [April 22, 2016, 2:18am UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/1 "2016-04-22T02:18:40Z")

</div>

In 4.10 I didn’t have any missed mouse clicks. In 4.11 I did, I would have to click 10 or 11 times to get it to register once.

In my main menu map, as the UMG is loaded I was setting the controller to InputMode UI only. When the map was launched I set the InputMode to Game Only.

The result was, keyboard would work, but mouse clicks not registering.

Removing both nodes fixed the problem, but I would have prefered there to be no game input when there was a full screen UMG widget.

This is a bug. I already have a fix, by not using the nodes. It might cause someone else a headache if they run into it so I’m reporting it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [April 22, 2016, 6:11pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/2 "2016-04-22T18:11:25Z")

</div>

Hi ,

- Does this occur in a clean, blank project with no additional content or is it limited to one project?
- What steps can I take to reproduce this error on my end?
- Do you have any other assets or blueprints that may be consuming the mouse input?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f54268a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f54268a3](https://forums.unrealengine.com/u/anonymous_user_f54268a3)\
**Post date:** [April 22, 2016, 8:15pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/3 "2016-04-22T20:15:16Z")

</div>

I only tried this in the specific project.

To reproduce:  
In Input file add a MouseClicked event.  
In controller, put a print statement off the event. Test that each time you click, it prints.  
open a UMG Widget and set InputMode to UI Only.  
Close the Widget, (from the widget) and set the InputMode to Game Only.

Now test clicking the mouse button. Only about 1 in 10 will respond and print.

I don’t believe anything else is consuming them. Because, if I unhook all the SetInput nodes, it works fine.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f54268a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f54268a3](https://forums.unrealengine.com/u/anonymous_user_f54268a3)\
**Post date:** [April 24, 2016, 8:24pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/4 "2016-04-24T20:24:37Z")

</div>

This got stranger. I found some notes from on the forums.

Apparently, calling Set Input Mode UI, or Game and UI or Game no longer works except if you call it from inside the PlayerController. Even setting the reference to the PlayerController does not work correctly if from the UMG.

Setting an Event on the PlayerController, and have the UMG call the Event and pass itself to the PlayerController at the end of consrtuct seemed to fix the problem of having focus, and can again get Gamepad events in the UMG.

Edit: The events are not in the OnKeyDown, they are getting handled under the hood somewhere, with DPad changing highlighing on the buttons. It has now hyjacked handling Controller input.

The Controller bottom face button now simulates a mouse click.

But, the Hover, UnHover shows a dotted line around the bounding box of the Buttons instead of switching to the images to Hovered and back to normal.

4.11 really messed up the UMG with focus. Especially since it didn’t support Gamepad and the mouse enter and leave functions were private, many people will have their own solution to Simulate Button Hovers and Clicks so the GamePad can navigate.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [April 26, 2016, 6:19pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/5 "2016-04-26T18:19:59Z")

</div>

Hi ,

There are several known issues with set input UI. The one I think is applying in this case is UE-14476. Switching set input to either UI/Game/Game and UI consumes all controller input, which could cause errors such as the one you are seeing. I am going to update this bug report to reflect that additional developers are experiencing it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f54268a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f54268a3](https://forums.unrealengine.com/u/anonymous_user_f54268a3)\
**Post date:** [April 27, 2016, 7:38pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/6 "2016-04-27T19:38:41Z")

</div>

Thanks,

I thought I had it sorted out, by setting it through an event on the PlayerController as I saw in 's post but, I’m left with one unresolved issue.

My game is either in GameController mode, or Keyboard and mouse, which is set on game launching as a variable in the GameState class.

If I don’t use those input sets, I can’t use the UMG menu’s with the Controller, but if I do, the mouse clicks are messed up.

Also, the way UMG and the Controller is working has changed, and not for the good. In 4.10 I processed the OnKeyDown event on the UMG and then tested the key for type and called functions explicitly which navigated my buttons. I extended the UMG Button to call the hover event to do this.

Now, the OnKeyDown is not getting called for the D-Pad, the input is being captured under the hood in Slate somewhere. There is now some automatic button navigation with the D-Pad, but it is not calling the hover events correctly, it creates a dotted line box around the button’s image. The bottom face button now simulates a mouse click on the button as well. I didn’t see this stuff in the upgrade notes, and it is not working correctly. Because it is hijacking the input at a low level it’s difficult to work with from a launcher version of the engine.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [April 28, 2016, 5:22pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/7 "2016-04-28T17:22:41Z")

</div>

This is another known issue and is in our system as UE-28825.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f54268a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f54268a3](https://forums.unrealengine.com/u/anonymous_user_f54268a3)\
**Post date:** [May 18, 2016, 2:58pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/8 "2016-05-18T14:58:27Z")

</div>

It’s been 3 weeks, has this bug been addressed? In 4.12 it is still broken, only about 1 out of 10 mouse clicks is registered. Shooting works good with controller but sucks with mouse, basically unplayable as a pc game with mouse and keyboard.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [May 18, 2016, 4:54pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/9 "2016-05-18T16:54:50Z")

</div>

HI ,

This error is still under assessment by the development staff. Unfortunately I do not have a timeframe of when it will be addressed.

---

<div class="post-metadata">

**Author:** ![tsaroth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tsaroth](https://forums.unrealengine.com/u/tsaroth)\
**Post date:** [June 15, 2016, 9:33pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/10 "2016-06-15T21:33:13Z")

</div>

I just had the same issue in 4.12 and I seem to have fixed it by not hooking anything up to the target pin on the Set Input Mode Game Only node inside the player controller BP

---

<div class="post-metadata">

**Author:** ![Harth\_Tuwist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Harth\_Tuwist](https://forums.unrealengine.com/u/Harth_Tuwist)\
**Post date:** [October 3, 2016, 1:13pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/11 "2016-10-03T13:13:50Z")

</div>

I am also experiencing this bug in 4.13. I haven’t checked 4.13.1 yet, but there is nothing in the patchnotes that seems to fix that problem.  
Google tells me that UE-14476, but it seems to me that this is not the bug OP was talking about. After switching to InputMode GameOnly, my game takes mouse down events only when I double click (resulting in the behavior described above if you are not aware of the situation and just randomly click in your window).

I have a main menu, where I set Input Mode UI only, and on PostLogin in the actual game I change the InputMode to GameOnly (I am copying MP behavior from the Shootout example).  
If i use tsaroths suggestion, the nodes do not seem to do anything at all.

I also tried a custom node with C++ Code [PlayerController]-\>SetInputMode(FInputModeGameOnly());, but that didn’t work either.

Are there workarounds? Besides not using these nodes at all?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [October 3, 2016, 1:57pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/12 "2016-10-03T13:57:21Z")

</div>

Hi Harth Tuwist,

UE-14476 was closed as ‘Cannot Reproduce’. Do you have any specific steps I can take to recreate this on my end?

---

<div class="post-metadata">

**Author:** ![Harth\_Tuwist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Harth\_Tuwist](https://forums.unrealengine.com/u/Harth_Tuwist)\
**Post date:** [October 3, 2016, 6:37pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/13 "2016-10-03T18:37:07Z")

</div>

I reproduced this on a new project:

1. Take the top down example
2. Add a keyboard bind and let it run the code “Get player controller (0) → Set Input Mode Game Only” in the level Blueprint (but anywhere else it is the same problem)
3. Build an actor that changes the Material when the “OnClick” event is run

When you run it:  
-Just clicking on the actor: A single click changes the material  
-Clicking on the actor after Input Mode Game Only was set: you need to double click on the actor to make it change Material (the first time after the input it actually works with a casual click, but after that you need a double click).

Edit: Sorry for formatting

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [October 3, 2016, 8:19pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/14 "2016-10-03T20:19:23Z")

</div>

Hi Harth Tuwist,

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it [here](https://issues.unrealengine.com/issue/UE-36760). You can track the report’s status as the issue is reviewed by our development staff.

---

<div class="post-metadata">

**Author:** ![Betazero](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Betazero](https://forums.unrealengine.com/u/Betazero)\
**Post date:** [December 13, 2016, 1:33pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/15 "2016-12-13T13:33:08Z")

</div>

I was experiencing the same problem. I start my game and everything is fine. I open the options menu UMG and it works fine. I click on the return to the game and my mouse will click about once every 20 attempts and always the 1st click works. Thankfully the removing the target on the set ‘input mode game only’ has done the trick. Thanks TSAROTH 🙂

---

<div class="post-metadata">

**Author:** ![Betazero](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Betazero](https://forums.unrealengine.com/u/Betazero)\
**Post date:** [December 13, 2016, 1:33pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/16 "2016-12-13T13:33:29Z")

</div>

Thanks this worked for me 🙂

---

<div class="post-metadata">

**Author:** ![Pypatron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pypatron](https://forums.unrealengine.com/u/Pypatron)\
**Post date:** [February 21, 2017, 10:39pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/17 "2017-02-21T22:39:28Z")

</div>

In the same example I only need to the node “Input Mode Game Only” with a “Get player controller” and I have this bug. This kill my actually project, but I havent any "Input Mode Game Only"nodes in my Project.  
I am not shure whats the problem, but need a resolve

---

<div class="post-metadata">

**Author:** ![Pypatron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pypatron](https://forums.unrealengine.com/u/Pypatron)\
**Post date:** [February 24, 2017, 8:28pm UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/18 "2017-02-24T20:28:51Z")

</div>

I found a solution. Disable the “Show Mouse Cursor” in the Controller and everthing works perfect. But if you have no other cursor and need someone you must create your own.

---

<div class="post-metadata">

**Author:** ![Exonfluxx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Exonfluxx](https://forums.unrealengine.com/u/Exonfluxx)\
**Post date:** [February 26, 2017, 4:09am UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/19 "2017-02-26T04:09:05Z")

</div>

This Worked for me for now. My Game I will need to show cursor Hoping it gets fixed soon.

---

<div class="post-metadata">

**Author:** ![Exonfluxx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Exonfluxx](https://forums.unrealengine.com/u/Exonfluxx)\
**Post date:** [February 26, 2017, 5:07am UTC](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023/20 "2017-02-26T05:07:03Z")

</div>

My Game is using 4.15 and this was a bug that I thought was an issue with my logic as my project relies heavily on mouse inputs and mouse click Combinations. I Ripped apart most of my logic to figure out where I messed up and after I stopped second guessing myself I decided to do a search and found this post. That will teach me lol. Once I realized it was a bug with UE4 thanks to this post I set to find a workaround. I think it was already mentioned here but I found out that just removing the Input mode nodes on my project the bug stopped and the lack of the nodes had no effect on my projects performance at all.

Attached A Screenshot for those who need a visual for this solution.

 ![127867-inputmode.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/8/4387ab8628799085df6ee9a4184b9dbd1184695b.png)

[Next page](https://forums.unrealengine.com/t/bug-mouse-clicks-not-responding-after-set-input-ui-then-to-game/355023.md?page=2)
