touchEnded event location

Hello guys!
I am coding an app which needs to react when a touch is ended (touchEnded) and get the event’s location on the screen, but I failed to get where the event has been triggered.
Among other methods, I tried to use the native event (but any arithmetical or logical comparison systematically fails), and to compare the touches array (touches) with a touches history (prevTouches) I created. These two methods failed.
Is there a simple (or anyway easier) way to do it?

A last thing: I don’t and won’t use Ketai library, it did not work on the devices I tried, and until this point my code perfectly runs using parts of the Android API.

Hi and welcome

void setup() {

void draw() {
  if (touchIsStarted) {
  } else {

void touchStarted() {
  println("touch started");

void touchMoved() {
  println("touch moved"); 

void touchEnded() {
  println("touch ended");  

I know how to handle touchEnded events. Now the problem is to get the location of the events on the screen.
Thanks anyway!

1 Like


Mouse working the same

It does not work with multitouch