[solved] MultitouchInputMode.TOUCH_POINT on ios (legacy)

So far I’ve been always using MouseEvents in my apps since I didn’t need multitouch. However now I have implemented my own system for pinching and in order it to work I must set Multitouch.inputMode to MultitouchInputMode.TOUCH_POINT. Everything works great, however…all my MouseEvents stopped working on ios. On Android I get both MouseEvents and TouchEvents however on ios all I get are TouchEvents, so big part of my code stopped working : (
Is there a way to still recieve mouse events even when input mode is set to touch point? I don’t want to use conditionals like this:

#if neko
addEventListener(MouseEvent.CLICK, clickFunction);
#else
addEventListener(TouchEvent.TOUCH_BEGIN, touchFunction);
#end

edit: ok, so MouseEvents work on ios, however I must set input mode to touch input before adding any MouseEvent listeners :slight_smile:

Oh interesting, so if you set the inputMode then it disables your previous mouse event listeners? That doesn’t sound right :frowning:

I’m having the same problem on iOS right now.
MouseEvent listeners stopped working when I set

Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

Any solution? Setting this before adding listeners didn’t help.

Are you using legacy?

Yes, I’m using legacy.
Can you share an example of working code?

I’m not really doing anything special, in my Main class I use

#if mobile
      Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
#end

and it works just fine. I’m recieving both mouse and touch events. I’m using openfl 3.5.3.

I do the same, but MouseEvent stops working on iOS.
While I can replace MOUSE_DOWN and MOUSE_UP with TOUCH_BEGIN and TOUCH_END.
Both CLICK and TOUCH_TAP stop working completely.

Can you try this project? It works fine for me.

1 Like

Ok, that actually helped.
So

Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

Should be set at the very beginning, when app starts.
But even with that, TOUCH_TAP is not firing, which is not a big problem for me. All other events are working fine.

Thanks a lot Mathew!

Hmm, you are right about TOUCH_TAP, it doesn’t work :confused: I’ve never noticed this. CLICK seems to work fine though.

Yes, CLICK works, TOUCH_TAP doesn’t.
Thank you again for help! :slightly_smiling: