var rightPressed = false; function mouseClicked() { if(mouseButton === RIGHT) { rightPressed = true; } }