question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Touch input events

See original GitHub issue

Simulating touch events is difficult.

For tapping: Input.synthesizeTapGesture appears to only work on android Input.dispatchTouchEvent doesn’t click events like normal tapping would Input.emulateTouchFromMouseEvent fires mouse events, but only after an undefined delay.

The best way to emulate touch right now appears to be setting the device mode to iPhone, which sends touchStart and touchEnd along with every mouse press.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

28reactions
LHoincommented, Jan 19, 2018

Why not just provide API like touchScreen.touchStart/touchMove/touchEnd, so we can do Swipe by combining these methods ?

0reactions
zhgqthomascommented, Mar 20, 2019

@RainUUU I tested the codes. And the touch start, touch move and touch end event all get called. Maybe you can look into the codes again. And the tap method will not trigger the touchmove event

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Touch Events - Web APIs | MDN
The TouchEvent interface represents an event sent when the state of contacts with a touch-sensitive surface changes. The state changes are ...
Read more >
The TouchEvent - W3Schools
Events that occur when user touches a touch-based device, belongs to the TouchEvent Object. TouchEvent Properties and Methods. Property/Method, Description.
Read more >
Touch Input | Docs - Snap Inc.
Lenses can respond to touch events that trigger when the user touches the screen. For example, your Lens can play a sound any...
Read more >
6 Working with Touch Events (Release 8) - Oracle Help Center
Touch events are generated to track the actions of touch points. A touch event is represented by an instance of the TouchEvent class....
Read more >
Explain touch events in JavaScript - Tutorialspoint
Explain touch events in JavaScript ; touchmove, It is fired when the touch point is moved along the touch surface. ; touchend, It...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found