Skip to content

Commit 9b5824e

Browse files
committed
fix a dumb typo in keyPressed handling (fixes #5033)
1 parent 429fb36 commit 9b5824e

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

core/src/processing/core/PApplet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ public class PApplet implements PConstants {
658658
* @see PApplet#keyReleased()
659659
*/
660660
public boolean keyPressed;
661-
int keyPressedCount;
661+
public int keyPressedCount;
662662

663663
/**
664664
* The last KeyEvent object passed into a mouse function.
@@ -2941,7 +2941,7 @@ protected void handleKeyEvent(KeyEvent event) {
29412941
break;
29422942
case KeyEvent.RELEASE:
29432943
keyPressedCount--;
2944-
keyPressed = (keyPressedCount == 0);
2944+
keyPressed = (keyPressedCount > 0);
29452945
keyReleased(keyEvent);
29462946
break;
29472947
case KeyEvent.TYPE:

core/todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
0260 (3.3.3 or 3.4)
2+
X keyPressed not returning false once a key is released
3+
X https://github.com/processing/processing/issues/5033
24

35

46
high

todo.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ _ put the reference (and examples?) into .zip files
3232
_ unzipping the app takes forever
3333
_ see the 'examples' section below
3434

35-
_ EventQueue problems with "could not find sketch size" message?
35+
_ EventQueue problems with "could not find sketch size" message
3636
_ https://github.com/processing/processing/issues/4893
37+
_ https://github.com/processing/processing/issues/5030
3738

3839
_ "Sketch disappeared" infinite pop up dialogs
3940
_ https://github.com/processing/processing/pull/4808

0 commit comments

Comments
 (0)