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
+2 -1
View File
@@ -32,8 +32,9 @@ _ put the reference (and examples?) into .zip files
_ unzipping the app takes forever
_ see the 'examples' section below
_ EventQueue problems with "could not find sketch size" message?
_ EventQueue problems with "could not find sketch size" message
_ https://github.com/processing/processing/issues/4893
_ https://github.com/processing/processing/issues/5030
_ "Sketch disappeared" infinite pop up dialogs
_ https://github.com/processing/processing/pull/4808