# Touch Event fires on both pressed and released

**URL:** <https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343>\
**Category:** Platform & Builds\
**Tags:** toggle, unreal-engine, gui, touch-event, question\
**Created:** [March 8, 2017, 8:02pm UTC](https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343 "2017-03-08T20:02:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![HaxO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haxo/32/1008648_2.png) [@HaxO](https://forums.unrealengine.com/u/HaxO)\
**Post date:** [March 8, 2017, 8:02pm UTC](https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343/1 "2017-03-08T20:02:55Z")

</div>

Hey everyone,

There seems to be some weird issue with toggles on touch screens, when using a touch display ( laptop and stand alone display tested, not mobile ) a single touch turns this toggle on and then back off. The video below shows what is happening, interestingly when the button is held down for an amount of time ( right click ) it only fires once. Which is what should be happening on a tap as well.

Video of issue: [UE4 Touchscreen Error - YouTube](https://youtu.be/kGarGEJIdUI)

Attempted Fixes:

- Turned off / on Click Events in  
PlayerController
- Turned off / on Touch Events in  
PlayerController
- Turned off / on Touch Over Events in  
PlayerController
- Set Touch 1 as a Click Event
- Turned On / Off 'Use Mouse for Touch"

Please let me know if you have any other ideas!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d2b909bf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d2b909bf](https://forums.unrealengine.com/u/anonymous_user_d2b909bf)\
**Post date:** [March 13, 2017, 1:45pm UTC](https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343/2 "2017-03-13T13:45:54Z")

</div>

Hello HaxO,

I was unable to reproduce your issue on our end, I have a couple of questions that will help me narrow down the issue you are experiencing.

1. Are you able to reproduce your issue in a new project?
2. If so could you provide a detailed list of steps so I can reproduce your issue on our end?
3. Could you provide screenshots of your UI that is causing the issue?

Thanks!

---

<div class="post-metadata">

**Author:** ![HaxO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haxo/32/1008648_2.png) [@HaxO](https://forums.unrealengine.com/u/HaxO)\
**Post date:** [March 13, 2017, 8:48pm UTC](https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343/3 "2017-03-13T20:48:47Z")

</div>

I cannot reproduce it in a new project either, guess I messed something up on the way.

Here are the settings of the toggle in the video. Will get more info up here soon.

 ![129907-togglesettings.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/1/54189eec8c3a9546dfa5e6ddcda5a3a7fec779ef.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d2b909bf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d2b909bf](https://forums.unrealengine.com/u/anonymous_user_d2b909bf)\
**Post date:** [March 14, 2017, 5:25pm UTC](https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343/4 "2017-03-14T17:25:30Z")

</div>

Could you also post screenshots of your Widget’s event graph & any other blueprints that use these buttons? This would help me investigate your issue further.

---

<div class="post-metadata">

**Author:** ![HaxO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haxo/32/1008648_2.png) [@HaxO](https://forums.unrealengine.com/u/HaxO)\
**Post date:** [March 15, 2017, 3:19pm UTC](https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343/5 "2017-03-15T15:19:22Z")

</div>

Yes, sorry to not be very responsive. Will get to this asap.

---

<div class="post-metadata">

**Author:** ![HaxO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haxo/32/1008648_2.png) [@HaxO](https://forums.unrealengine.com/u/HaxO)\
**Post date:** [March 15, 2017, 9:04pm UTC](https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343/6 "2017-03-15T21:04:22Z")

</div>

Alright, sorry about that. Here is the blueprint that is called when the Secondary\_T toggle is pressed:

 ![130197-togglescript.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/e/d3ec372f5ec2d53d8e7606a10751dae7346c1c48.jpeg)

Maybe it is because the Primary\_T and Secondary\_T can turn each other off, that is somehow counting as an OnCheckStateChange Event for the touchscreen but not for clicks?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d2b909bf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d2b909bf](https://forums.unrealengine.com/u/anonymous_user_d2b909bf)\
**Post date:** [March 16, 2017, 4:06pm UTC](https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343/7 "2017-03-16T16:06:11Z")

</div>

I was still not able to reproduce your issue on our end. To investigate further, I would need to see your project, which you can privately message me on the forums here:

Thanks!

---

<div class="post-metadata">

**Author:** ![HaxO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haxo/32/1008648_2.png) [@HaxO](https://forums.unrealengine.com/u/HaxO)\
**Post date:** [March 21, 2017, 3:09pm UTC](https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343/8 "2017-03-21T15:09:18Z")

</div>

After a couple more days of trying to debug this I settled for just brute forcing it. With this macro the toggle is disabled for 0.2 seconds then re-enabled, solving the issue.

If it’s dumb and it works, it isn’t dumb. Right? right?!\>!?!

 ![131071-togglefix.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/f/56febaec0815d6b00435d9769989b65a7b9ce65b.jpeg)

---

<div class="post-metadata">

**Author:** ![BigJohn83](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BigJohn83](https://forums.unrealengine.com/u/BigJohn83)\
**Post date:** [October 26, 2018, 4:55am UTC](https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343/9 "2018-10-26T04:55:13Z")

</div>

I’m having this exact same issue. Have you ever figured out a better solution?

---

<div class="post-metadata">

**Author:** ![HaxO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haxo/32/1008648_2.png) [@HaxO](https://forums.unrealengine.com/u/HaxO)\
**Post date:** [October 26, 2018, 1:25pm UTC](https://forums.unrealengine.com/t/touch-event-fires-on-both-pressed-and-released/387343/10 "2018-10-26T13:25:33Z")

</div>

No, had to just go with this and move onto other things.
