We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 316a902 commit 0bfa3d8Copy full SHA for 0bfa3d8
core/src/processing/core/PApplet.java
@@ -2630,13 +2630,15 @@ protected void handleKeyEvent(KeyEvent event) {
2630
2631
switch (event.getAction()) {
2632
case KeyEvent.PRESS -> {
2633
- Long hash = ((long) keyCode << Character.SIZE) | key;
+ Long hash = (long) keyCode;
2634
if (!pressedKeys.contains(hash)) pressedKeys.add(hash);
2635
keyPressed = true;
2636
keyPressed(keyEvent);
2637
}
2638
case KeyEvent.RELEASE -> {
2639
- pressedKeys.remove(((long) keyCode << Character.SIZE) | key);
2640
+ pressedKeys.remove(hash);
2641
+
2642
keyPressed = !pressedKeys.isEmpty();
2643
keyReleased(keyEvent);
2644
0 commit comments