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

Create a list of global keyboard shortcuts. #188

Closed
pixelzoom opened this issue Mar 15, 2022 · 4 comments
Closed

Create a list of global keyboard shortcuts. #188

pixelzoom opened this issue Mar 15, 2022 · 4 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Mar 15, 2022

From code_review_checklist.md, aka the CRC:

There's currently no "global shortcuts" list, and it's impractical to expect code reviewers (or even the sim developer) to search the code. So a list would be useful during development, to prevent collisions in the first place.

In Slack, @jessegreenberg said:

We don't have a list like that, we need to make one.

In the meantime, I'll link this issue into the CRC.

@pixelzoom
Copy link
Contributor Author

I'm also wondering... Is a list of sim-specific shortcuts also needed? When someone adds a new global shortcut, how do they know if it's already used by a sim?

@zepumph
Copy link
Member

zepumph commented Mar 15, 2022

Ideally globalKeyStateTracker would have a way of registering particular ones in code, so we could assert if there was an overlap. I'm not sure how challenging that would be, or if it is futile to think that we can have all commands go through that channel. Worth that shot though!

@jessegreenberg
Copy link
Contributor

Part of phetsims/scenery#1298.

@jessegreenberg
Copy link
Contributor

Lets pick this up in scenery, an automated registry would involve or be used by KeyStateTracker and other classes in that repo. Closing this issue. I noted this issue in phetsims/scenery#1445 and that if there isn't a good way to automate we can fall back to documentation.

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