Skip to content

[p5.js 2.0 Bug Report]: misleading keyIsDown() documentation #7786

Open
@MrDuckyTesla

Description

@MrDuckyTesla

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

2.0.1

Web browser and version

Google Chrome Version 23H2 (Build 22631.4460)

Operating system

Windows 11

Steps to reproduce this

Steps:

  1. Make new empty p5.js sketch
  2. paste "console.log(keyIsDown(88));" as shown below
  3. press down on "x" key and notice how console prints only false
  4. change version to 1.11.5
  5. run sketch again and notice how console prints true when key is down

Snippet:

function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  console.log(keyIsDown(88));
}

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Ready for Work

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions