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) {

or even easier just use …

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

— mnse


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

1 Like