I suppose you could start a timer when the user clicks (onMousePressed event) and then stop it when they release the mouse button (onMouseReleased event).
You could then decide if you think it was a long click or not, you would also need to check the mouse hasn't moved .
If it's for use on a touch screen you could use the onTouchStationary event to detect a long click.