benfry / processing4

Processing 4.x releases for Java 17
https://processing.org
Other
1.31k stars 236 forks source link

Typing some characters in P2D won't return what character was pressed with keyPressed in Processing 4.3 #824

Open bugreporter0 opened 4 months ago

bugreporter0 commented 4 months ago
## 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

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

bugreporter0 commented 4 months ago

I'm sorry for the weird behavior, I'm new to GitHub and I don't know English very well

Hellcat554 commented 4 months ago

I really don’t know what I am doing I’m trying to learn new things I new to the community in just want to learn….

On Sun, Feb 25, 2024 at 8:31 PM bugreporter0 @.***> wrote:

I'm sorry for the weird behavior, I'm new to GitHub and I don't know English very well

— Reply to this email directly, view it on GitHub https://github.com/benfry/processing4/issues/824#issuecomment-1963213850, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGCSUAIGZEWUBIBKIY27HU3YVPXYDAVCNFSM6AAAAABDZMBDBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRTGIYTGOBVGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>