Skip to content

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

Closed
@processing-bot

Description

@processing-bot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcorehelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions