Recognize/handle pinch gesture

Any short/easy path to handling a pinch gesture (zoom in/zoom out)?
Java mode, Processing 3.3.7, running on a Windows 10 laptop with a touch screen.


  1. Rolling my own. But mousePressed/Dragged/Released doesn’t get called on pinch (only on single mouse down/drag/release).

  2. Register TouchEvent (compiles, but never calls touchEvent()):
    void setup() {
    registerMethod(“touchEvent”, this);
    void draw() { }
    public void touchEvent(TouchEvent event) {

  3. SMT Simple Multi-Touch examples choke on init() (PApplet$7 can’t be cast to a JFrame).

  4. Leap Motion Library: LM_2_Gestures example runs, but never calls handlers for swipe/circle/tap.

Thanks for any help!

I believe that SMT is for Processing 2. You could try downloading Processing 2 and running it with that…?

I’m not sure about touchEvent. It isn’t listed here:

but is listed here:

…perhaps open an issue?

However both SMT and Ketai have notes in their code indicating that registerMethod(“touchEvent”, this) is not working – although these seem to be Processing 2 era.

Hi! Could you find any way to get a multitouch event in P3??

Is this to run on Android or your Win10 device?

1 Like