From 914fb8817c682a59a0cce2bc77d0b87fbb2f96ac Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 26 Apr 2017 23:01:36 -0400 Subject: [PATCH] fix a dumb typo in keyPressed handling (fixes #5033) --- core/src/processing/core/PApplet.java | 4 ++-- core/todo.txt | 2 ++ todo.txt | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index fc176ced7..3554a2b31 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -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: diff --git a/core/todo.txt b/core/todo.txt index 5ce8c65d2..d189b04a8 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -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 diff --git a/todo.txt b/todo.txt index db0e7dd69..7ef5b8b30 100755 --- a/todo.txt +++ b/todo.txt @@ -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