Hello,
I’ve been stuck on this annoying bug in unreal 4.26 on my windows machine where when I try to click a button or anything that has a click function or does an action when pressed,(button, combo box, expandable area, checkbox…) they all get pressed twice the first time I select them when using my touch screen on my laptop. then when I select them a second time it only clicks it the expected one click. I’ve found a work around that requires me to edit the source code https://github.com/EpicGames/UnrealEngine/pull/3448 which is possible for me to do I just wanted to see if there were any more obvious fixes to my problem.
Not so much a solution as a decent workaround. Created a macrolibrary (class: UMG.Widget if you want to use it in Widgets, class: Actor elsewhere) with a macro called “InputFilter”, which I’m adding as the first node after every touch event. This avoids any logic being called >1 in the same tick and solves the issue.
Be careful not to add this to logic that should run >1 per tick (like multiple fingers touching at once)
Sorry that i’m bringing this back to life but i’m looking at this again and feeling like you gave me an answer but I have no idea what to do with this information. Where does this go? Is this a command line variable that I need to execute before launching the build? Is this something I put in the project settings?
This will go inside of the DefaultEngine.ini file that is located in /Config/DefaultEngine.ini
But this seems to only work for me when I am either in a packaged build or a standalone game not sure where I need to put it yet so the games run in the editor also work.
Edit:
This sort of fixes this issue. I have found that some things stop working because of how the input system works in unreal. What this setting does is makes it so unreal engine no longer calls the mouse versions of the input after the input returns FReply::Unhandled. That causes some issues in places like buttons inside of scroll boxes not being able to scroll anymore due to the SViewport capturing the mouse cursor instead of the button getting the mouse input. So while this may fix your issue where touch on a button gets called twice it may introduce other issues to your code.