The field PApplet.keyEvent is deprecated?

Does anybody know what this means?

Hi @nuhuhwy,

it means, that the PApplet.keyevent class attribute is deprecated, resp. shouldn’t be used that way anymore.
If you really want to use the keyEvent, you should call it like

void keyPressed(KeyEvent e) {
  println(e.getKeyCode());
}

or even easier just use …

void keyPressed() {
  if (key == ESC) {
    println("Escape pressed ("+keyCode+")!");
  }  
}

Cheers
— mnse

3 Likes

Im using this for a game which needs to use multiple keys at once, but this still helped! Thank you!

Reddit.com/r/processing/comments/bshqa8/comment/eor5epo/

1 Like