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

Allow shortcuts to be empty and to have win/mac/linux-specific keys. #7335

Closed
wants to merge 1 commit into from

Conversation

jasongrout
Copy link
Contributor

References

See phosphorjs/phosphor#438 for some discussion.

Code changes

Phosphor allows shortcuts to be empty, and it’s the only way to have platform-specific shortcuts (define keys to be [], and the platform keys to be something specific). We didn't allow this, but we should.

User-facing changes

Backwards-incompatible changes

None

Phosphor allows shortcuts to be empty, and it’s the only way to have platform-specific shortcuts (define keys to be [], and the platform keys to be something specific).

See phosphorjs/phosphor#438 for some discussion.
@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@jasongrout
Copy link
Contributor Author

Looks like there a few other places that have to change in the code to actually get this to work.

@jasongrout
Copy link
Contributor Author

In particular, having an empty list in the keys field triggers this error that skips the shortcut:

if (!keys) {
console.warn('Shortcut skipped because `keys` are [""].', shortcut);
return false;
}

So that needs to be fixed as well.

@jasongrout
Copy link
Contributor Author

#7589 supersedes this.

@jasongrout jasongrout closed this Dec 23, 2019
@jasongrout jasongrout modified the milestones: 2.0, Reference Dec 23, 2019
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Jan 24, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants