You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the error, you will see just an empty string " " on the console.
Snippet:
// Click on the canvas to begin detecting key presses.letvalue=0;functionsetup(){createCanvas(100,100);describe('A gray square with a black square at its center. The inner square becomes white when the user releases the "w" key.');}functiondraw(){background(200);// Style the square.fill(value);// Draw the square.square(25,25,50);// console.log(key)}// Set value to 255 the user releases the 'w' key.functionkeyReleased(){if(key==='w'){value=255;}else{console.log(key);}// Uncomment to prevent any default behavior.// return false;}
The expected behavior should be, when we press any key, the key must be shown on our console. The problem likely points to keyReleased().
The text was updated successfully, but these errors were encountered:
Most appropriate sub-area of p5.js?
p5.js version
2.0
Web browser and version
firefox, chrome
Operating system
linux
Steps to reproduce this
Steps:
Snippet:
The expected behavior should be, when we press any key, the key must be shown on our console. The problem likely points to
keyReleased()
.The text was updated successfully, but these errors were encountered: