# How can I test with a function whether another function is being executed?

**URL:** https://discourse.processing.org/t/how-can-i-test-with-a-function-whether-another-function-is-being-executed/27460
**Category:** Coding Questions
**Created:** [January 29, 2021, 3:34pm UTC](https://discourse.processing.org/t/how-can-i-test-with-a-function-whether-another-function-is-being-executed/27460 "2021-01-29T15:34:57Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [January 29, 2021, 4:47pm UTC](https://discourse.processing.org/t/how-can-i-test-with-a-function-whether-another-function-is-being-executed/27460/2 "2021-01-29T16:47:23Z")

</div>

> [@Handle (and consume) mouse events in classes](https://discourse.processing.org/t/handle-and-consume-mouse-events-in-classes/17689/4):
>
> To my surprise, Processing doesn’t directly call back input events such as mousePressed(), keyReleased(), etc. open_mouth But only these 2 input events: mouseEvent() & keyEvent(). drooling_face So we can only use those 2 for registerMethod() as input events: /\*\* \* RegisterMethod MouseEvent (v1.0) \* GoToLoop (2020/Feb/10) \* \* https://Discourse.Processing.org/t/ \* handle-and-consume-mouse-events-in-classes/17689/4 \* \* https://GitHub.com/processing/processing/wiki/ \* Library-Basics#w…

---

_[View the full topic](https://discourse.processing.org/t/how-can-i-test-with-a-function-whether-another-function-is-being-executed/27460)._
