Area:EventsBugHelp Wanted
Description
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
1.11.3
Web browser and version
Firefox 135.0 / Chromium 133
Operating system
Linux 6.13.2
Steps to reproduce this
Steps:
- Press key
d - Press and then release key
a - Release key
d. InkeyReleasedkeywill be equal toa, thoughev.keywill be correct (d).
This happens since 1.11.3. In 1.11.2 and before everything works correctly.
There's also an issue with keyPressed in Firefox (not in Chromium). It fires continuously while a key is pressed, not just once. It is probably linked to this issue, since it started happening in 1.11.3, I don't know if I should create a new issue about that too.
Snippet:
function keyPressed(ev) {
console.log(`pressed ${ev.key} (p5.key = ${key})`);
}
function keyReleased(ev) {
console.log(`released ${ev.key} (p5.key = ${key})`);
}