🖲 Returns true if the user is pressing the specified key, false otherwise. Accepts case-insensitive key names.
key to check
true if the key is pressed, false otherwise
q5.draw = function () { background(0.8); if (keyIsDown('f') && keyIsDown('j')) { rect(-50, -50, 100, 100); }}; Copy
q5.draw = function () { background(0.8); if (keyIsDown('f') && keyIsDown('j')) { rect(-50, -50, 100, 100); }};
🖲 Returns true if the user is pressing the specified key, false otherwise. Accepts case-insensitive key names.