Skip to content

configure shortcuts via .leptonrc #404

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

Merged
merged 2 commits into from
Mar 14, 2020
Merged

Conversation

moia-sven-ole
Copy link
Contributor

Hey I really like the project! Great work!
From my point, configuring the shortcuts were missing - so here we go.

I have added the possibility to override the shortcuts in the main.js by setting them in .leptonrc file.
This would also work for partial overrides.

e.g. in your < homeDir >/.leptonrc

partial

{
    "theme": "dark",
    ...
    "shortcuts": {
        "keyNewGist": "CMD+C",
        "keyDashboard": "CommandOrControl+D",
        "keyEditorExit": "CommandOrControl+Escape",
        "keySyncGists": "CommandOrControl+R"
    }
}

full

{
    "theme": "dark",
    ...
    "shortcuts": {
        "keyShortcutForSearch": "CMD+F",
        "keyNewGist": "CommandOrControl+N",
        "keyEditGist": "CommandOrControl+E",
        "keySubmitGist": "CommandOrControl+S",
        "keyImmersiveMode": "CommandOrControl+I",
        "keyAboutPage": "CommandOrControl+,",
        "keyDashboard": "CommandOrControl+D",
        "keyEditorExit": "CommandOrControl+Escape",
        "keySyncGists": "CommandOrControl+R"
    }
}

@kjellski
Copy link

Awesome PR - love me some configuration options! :) @hackjutsu can we help to make this happen?

@hackjutsu
Copy link
Owner

Yes, let's merge it. Thanks!

@hackjutsu hackjutsu merged commit c4fd0fc into hackjutsu:master Mar 14, 2020
@hackjutsu hackjutsu linked an issue Mar 22, 2020 that may be closed by this pull request
@anthonyattard
Copy link
Contributor

Loving this addition! Thanks @moia-sven-ole

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

Successfully merging this pull request may close these issues.

Can I customize my favorite keyboard shortcuts?
4 participants