Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyPressed is true with no keys pressed after specific sequence of SHIFT and any letter key #779

Open
keppy442b opened this issue Sep 11, 2023 · 1 comment · May be fixed by #786
Open
Labels
Help Wanted We have very little time and would like some help OpenGL Issues connected to P2D and P3D

Comments

@keppy442b
Copy link

keppy442b commented Sep 11, 2023

Description

keyPressed is true with no keys actively pressed after doing a specific sequence of key presses with SHIFT and a letter key. It also occurs with CTRL and a letter key. This is more easily reproduced with P2D, but it does occur with the default renderer as well.

Expected Behavior

keyPressed should be false when no keys are actively pressed.

Current Behavior

Steps to Reproduce

  1. Press and hold a letter key
  2. While still holding letter key, press and hold SHIFT
  3. While still holding SHIFT, release the letter key
  4. Release SHIFT

Pressing CTRL instead of SHIFT will also produce the behavior. It appears the only way to set keyPressed back to false is to press/release the specific letter key again. So if you did SHIFT+a, press and release a to set keyPressed back to the expected behavior. You can try to reproduce the behavior with this sketch:

color black = color(36,39,45);
color green = color(141,187,110);
void setup(){
  size(1600,900,P2D); 
}

void draw(){
  if (keyPressed){
    background(green);
  } else{
    background(black);
  }
}

Your Environment

  • Processing version: 4.3
  • Operating System and OS version: Windows 10 Home 22H2 19045.3324
@benfry benfry added OpenGL Issues connected to P2D and P3D Help Wanted We have very little time and would like some help labels Sep 13, 2023
@harry1064 harry1064 linked a pull request Sep 23, 2023 that will close this issue
@T-vaccari
Copy link

Hello, I would like to contribute to this issue, is it still open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted We have very little time and would like some help OpenGL Issues connected to P2D and P3D
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants