Skip to content

fixing keyReleased() function. #7758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025
Merged

Conversation

perminder-17
Copy link
Contributor

@perminder-17 perminder-17 commented Apr 19, 2025

Fixes : #7759

PROBLEM:
Inside our custom _onkeyup handler we cleared this.key (and other state) before calling the user‑defined keyReleased() callback. By the time the sketch’s keyReleased() ran, key had already been wiped, so console.log(key) showed an empty string.

SOLUTION:

Move the user‑callback block to the very top so it doesn’t touch key until the sketch has read it, letting sketches read the correct key.

@ksen0 ksen0 merged commit 9189b84 into processing:dev-2.0 Apr 23, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants