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

Continuation of Allow shortcuts to be empty and to have win/mac/linux-specific keys #7581

Closed
wants to merge 3 commits into from

Conversation

groutr
Copy link
Contributor

@groutr groutr commented Dec 3, 2019

References

Continues #7335

Code changes

This PR removes jupyterlab checks for empty shortcuts allowing phosphor to handle platform specific keyboard shortcuts.

User-facing changes

Users can define platform specific shortcuts as follows:

{
    "shortcuts": [
        {
            "command": "filebrowser:create-main-launcher",
            "keys": ["Accel Shift L"],
            "selector": "body",
            "disabled": true
        },
        {
            "command": "filebrowser:create-main-launcher",
            "keys": [],
            "linuxKeys": ["Accel Y"],
            "winKeys": ["Accel Shift ;"],
            "selector": "body"
        },
    ]
}

Note that the "keys" list is still required, but can be empty now. As referenced in #7335, this allows phosphor to use "linuxKeys", "winKeys", or "macKeys" depending on the platform.

Backwards-incompatible changes

jasongrout and others added 3 commits October 11, 2019 22:59
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

@groutr groutr closed this Dec 6, 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 5, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 5, 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