processing4 icon indicating copy to clipboard operation
processing4 copied to clipboard

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

Open bugreporter0 opened this issue 1 year ago • 2 comments

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

bugreporter0 avatar Feb 26 '24 02:02 bugreporter0

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

bugreporter0 avatar Feb 26 '24 02:02 bugreporter0

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: @.***>

Hellcat554 avatar Feb 26 '24 05:02 Hellcat554