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 platform aware key shortcuts #7589

Merged
merged 14 commits into from Dec 23, 2019

Conversation

groutr
Copy link
Contributor

@groutr groutr commented Dec 4, 2019

References

Supersedes #7581

Code changes

Relies on jupyterlab/lumino#11 to normalize key shortcuts before reconciling key shortcuts in jupyterlab.

Waiting on a new release of lumino before finishing this PR. I will comment below when ready for review. Thanks!

User-facing changes

Backwards-incompatible changes

groutr and others added 2 commits Dec 4, 2019
Normalizing keys will return a list of shortcuts available for the
running platform (so platform specific keys + keys).  Process that
normalized list instead of the shortcut keys directly.

This means that winKeys, linuxKeys, and macKeys are properly supported
in jupyterlab shortcuts.
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

jupyterlab-dev-mode bot commented Dec 4, 2019

Thanks for making a pull request to JupyterLab!

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

@groutr groutr changed the title Platformshortcuts Allow platform aware key shortcuts Dec 4, 2019
packages/coreutils/package.json Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
@jasongrout jasongrout added this to the 2.0 milestone Dec 21, 2019
Copy link
Contributor

@jasongrout jasongrout left a comment

I merged in master to take care of conflicts, and tested once again. Looks good to me!

The Linux usage test failure looks like it is a Lumino issue that should be solved there, and looks like it is specific to the testing framework not running in an actual browser?

@groutr
Copy link
Contributor Author

groutr commented Dec 23, 2019

Thanks @jasongrout.

@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

3 participants