Processing 3.2.3 Random Fail to Accept Keyboard Input - Bug?

edited January 2017 in Using Processing

I would like to know if anyone is experiencing problems with Processing 3.2.3 running under Windows 7 Pro failing to process keypressed() input. Basically I can run a sketch and all is fine but the next time I run the sketch, Processing does not recognize any keyboard input! The fact that this only ever happens inside a Processing sketch indicates to me that it is Processing that is at fault. Thanks in advance.

Tagged:

Answers

  • I can run a sketch and all is fine but the next time I run the sketch, Processing does not recognize any keyboard input

    Just as a sanity check:

    1. care you clicking inside the sketch window to give the sketch focus when you re-run the sketch?
    2. is it always the same sketch that stops keyboard input, or is it any sketch -- for example, do the example sketches do this?
    3. when keyboard input stops working, does it stop for that sketch only when re-run, or any sketch that is run after -- and does your keyboard continue to work in other applications?
  • Hi Jeremy, In response to your questions: 1) Yep 2) Not just one sketch. It spans multiple sketches. One run is fine and the next run isn't. 3) Inside sketches is the only time I've experienced issues. The keyboard is 100% all other times. As to stopping, when I start a sketch, the sketch will either process all keyboard inputs or none at all. So I stop the sketch and rerun it. Toss a coin as to whether keyboard input is recognized.

  • Same problem here. I check in the draw function for a key press; after a few recognitions, it fails to recognise the key pressed and I have to re-run the sketch. The same sketch was working perfectly in Processing from one year ago (don't remember the version)

  • Do you notice a difference for sketches using the default JAVA2D renderer And P2D/P3& which use OpenGL?

  • I have a sketch that after a few seconds of key presses fails to recognize any further key presses. Switching to the P2D renderer seems to have made the problem go away. This simple program does the trick. I'm running 3.2.1 on a Mac with OSX. void setup() { size(100,100); }

    int bg; void draw() { background(bg); if (keyPressed) { bg = 255-bg; } }

Sign In or Register to comment.