fix a dumb typo in keyPressed handling (fixes #5033)

This commit is contained in:
Ben Fry
2017-04-26 23:01:36 -04:00
parent f41360c0bf
commit 914fb8817c
3 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -658,7 +658,7 @@ public class PApplet implements PConstants {
* @see PApplet#keyReleased()
*/
public boolean keyPressed;
int keyPressedCount;
public int keyPressedCount;
/**
* The last KeyEvent object passed into a mouse function.
@@ -2941,7 +2941,7 @@ public class PApplet implements PConstants {
break;
case KeyEvent.RELEASE:
keyPressedCount--;
keyPressed = (keyPressedCount == 0);
keyPressed = (keyPressedCount > 0);
keyReleased(keyEvent);
break;
case KeyEvent.TYPE:
+2
View File
@@ -1,4 +1,6 @@
0260 (3.3.3 or 3.4)
X keyPressed not returning false once a key is released
X https://github.com/processing/processing/issues/5033
high