Key and mouse pressed with boolean

-a- is that same like this?
Solution for repeating keyPressed while holding key ?

-b- there you posted under the question: repeated keypressed
your mousePressed code, understandable there was no answer.

-c- now you ask again?
KEY pressed with boolean?

but there is no key code i can see?

-d- a boolean can not act like a integer rightClick++;
also sorry, the use of this i do not understand

-e- can you give a detailed description why you start with this
difficult mouse even code (with registered eventcoding ) instead of just using
https://processing.org/reference/mousePressed_.html
possibly in combo with
https://processing.org/reference/mouseButton.html

possibly need just to redesign your program flow.