Closed
Description
Created by: bugreporter0
Description
Expected Behavior
"< was pressed" should be written in the console
Current Behavior
keyPressed detects that a character was typed but not which one when "<" is typed
Steps to Reproduce
Works:
void setup()
{
size(400, 400);
}
void draw()
{
}
void keyPressed()
{
if(key == '<')
println("< was pressed");
}
Doesn't work:
void setup()
{
size(400, 400, P2D);
}
void draw()
{
}
void keyPressed()
{
if(key == '<')
println("< was pressed");
}
Your Environment
- Processing version: 4.3
- Operating System and OS version: both windows (10, 11) and Ubuntu 22.04
- Other information:
Possible Causes / Solutions
Maybe some characters have been forgotten in the keyPressed P2D API in Processing 4 and above because it worked in the last Processing 3 version, I've checked