Skip to content

configure shortcuts via .leptonrc#404

Merged
hackjutsu merged 2 commits intohackjutsu:masterfrom
moia-sven-ole:master
Mar 14, 2020
Merged

configure shortcuts via .leptonrc#404
hackjutsu merged 2 commits intohackjutsu:masterfrom
moia-sven-ole:master

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