Processing 3.0a10 recognizes keyboard input only after a click into the sketch window #3389

Closed
RetainCountZero opened this Issue Jun 16, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@RetainCountZero

Processing 3.0a10 seems to recognize any keyboard input only after the frame has at least been clicked once.
To reproduce the issue, try the following simple sketch:

// setup
void setup() {
  size(320, 200, JAVA2D);
}

// draw
void draw() {
  line(0, height/2,width, height/2);
}

// keyboard events
void keyPressed() {
  println("You pressed key: " + key);
  // q = ascii:113, Q = ascii:81
  if (key == 113 || key == 81) {
    println("quit initiated.");
    exit();
  }
}

Run the sketch. The window of the sketch becomes the active window. Now press any key. Nothing happens.
There's the problem. The pressed key should be displayed in the console, and if the key q is pressed the sketch should quit. However, once you clicked into the active sketch, the keypresses are shown in the console and everything works as it should.

I was able to reproduce this issue with Processing 3.0a10 on MacOSX and on Windows x86_32. This problem did not occur with Processing 3.0a9.

@RetainCountZero RetainCountZero changed the title from Processing 3.0a10 recognized keyboard input only after a click into the window to Processing 3.0a10 recognizes keyboard input only after a click into the sketch window Jun 16, 2015

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Jun 18, 2015

Member

Fixed: #3389

Member

benfry commented Jun 18, 2015

Fixed: #3389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment