Skip to content
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

Redundant isKeyPressed property #7444

Closed
bensgilbert opened this issue Dec 22, 2024 · 3 comments
Closed

Redundant isKeyPressed property #7444

bensgilbert opened this issue Dec 22, 2024 · 3 comments

Comments

@bensgilbert
Copy link
Contributor

Topic

Whilst looking through the codebase's event handling logic I found this property that doesn't seem to be used or documented. Here is the Github search result:
image
As you can see from the image above, it's only referenced four times in the codebase, and only once in a file that isn't for testing.
I may be mistaken but it doesn't actually seem to be used for anything as it's replaced by keyIsDown which is documented.
This brings up the question, is there any point keeping track of this variable and should it be removed (I think it should as there's no point keeping it).

@limzykenneth
Copy link
Member

I believe isKeyPressed predates keyIsPressed and is leftover as a legacy/backwards compatible thing. We'll remove it for p5.js 2.0.

@AbhigyanSrivastav
Copy link

I believe isKeyPressed predates keyIsPressed and is leftover as a legacy/backwards compatible thing. We'll remove it for p5.js 2.0.

Hey @limzykenneth can i go ahead and remove the redundant isKeyPressed usage?

@limzykenneth
Copy link
Member

@AbhigyanSrivastav Thanks for the interest in helping! isKeyPressed is already removed from p5.js 2.0 so I'll close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants