# keyPressed and keyReleased with java(eclipse)

**URL:** <https://discourse.processing.org/t/keypressed-and-keyreleased-with-java-eclipse/12994>\
**Category:** Coding Questions\
**Created:** [July 26, 2019, 8:12am UTC](https://discourse.processing.org/t/keypressed-and-keyreleased-with-java-eclipse/12994 "2019-07-26T08:12:49Z")\
**Posts on this page:** 2\
**Page:** 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:** [October 30, 2019, 2:35pm UTC](https://discourse.processing.org/t/keypressed-and-keyreleased-with-java-eclipse/12994/21 "2019-10-30T14:35:46Z")

</div>

no , works here  
can you put in some prints?

```auto
37 1
[0] true
[1] false
37 2
[0] false
[1] false
37 3
39 1
[0] false
[1] true
39 2
[0] false
[1] false
39 3

```

i used

```auto
    if ( button > 0 ) println(button, buttonID);

```

and

```auto
    println(mouses);

```

---

<div class="post-metadata">

**Author:** ![vincentstrebelle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/vincentstrebelle/32/6963_2.png) [@vincentstrebelle](https://discourse.processing.org/u/vincentstrebelle)\
**Post date:** [October 30, 2019, 3:45pm UTC](https://discourse.processing.org/t/keypressed-and-keyreleased-with-java-eclipse/12994/22 "2019-10-30T15:45:41Z")

</div>

i found what’s wrong, i forgot to put

```auto
pa.registerMethod("mouseEvent", this);

```

sorry for my bad post

[Previous page](https://discourse.processing.org/t/keypressed-and-keyreleased-with-java-eclipse/12994.md?page=1)
