c3d.mousepressed

A callback function which gets ran when any mouse button is pressed you can also easily use it to handle things like double clicks, as it provides a click count on that button in the last 400ms

arguments

function c3d.mousepressed(x,y,btn,click_count)
    if btn == 0 and click_count == 2 then
        error("Double left clicked on "..x..","..y,0)
    end
end