# Key and mouse pressed with boolean

**URL:** <https://discourse.processing.org/t/key-and-mouse-pressed-with-boolean/15274>\
**Category:** Coding Questions\
**Created:** [November 6, 2019, 9:57am UTC](https://discourse.processing.org/t/key-and-mouse-pressed-with-boolean/15274 "2019-11-06T09:57:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [November 6, 2019, 10:16am UTC](https://discourse.processing.org/t/key-and-mouse-pressed-with-boolean/15274/2 "2019-11-06T10:16:53Z")

</div>

-a- is that same like this?  
[Solution for repeating keyPressed while holding key](https://discourse.processing.org/t/solution-for-repeating-keypressed-while-holding-key/3989/11) ?

-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](https://processing.org/reference/mousePressed_.html)  
possibly in combo with  
[https://processing.org/reference/mouseButton.html](https://processing.org/reference/mouseButton.html)

possibly need just to redesign your program flow.

---

_[View the full topic](https://discourse.processing.org/t/key-and-mouse-pressed-with-boolean/15274)._
