kivy/kivy — pull request #1718 by matham (2013-12-17 02:49:27+00:00)
Title: Adds simulated touch as a profile option.

For a mouse click, if the click is a right or middle click, or if it's a left click + ctrl, it'll add `multitouch_sim` to the profile of that touch as well as a property `multitouch_sim` to the touch. By default this property is False. If the user sets `multitouch_sim` to true in on_touch_down/move before the touch is released, the touch becomes a simulated multitouch. Otherwise, this touch is removed from the multitouch simulation.

I also set scatter to set `multitouch_sim` to True when 'multitouch_sim' is in the profile. This seems to work very well, a circle is still shown for a right/middle click, but it's removed instantly when the mouse is released, unless it's in a scatter.

A minor alternative is to by default make it a multitouch, unless the user sets it to False. But this seems unnecessary.

This could be extended such that a user can set _any_ touch to be a multi-touch, even if it didn't originate from e.g. a right click, or even if it's not from a mouse. But that seems more complicated, and would require some kind of function to be attached to the touch which the user can call many times to set/unset it to be multitouch.