Added support for a json file for keymapping - #653
Open
MoeFwacky wants to merge 3 commits into
Open
Conversation
Changed keymap behavior to look first for keymap.json in the same directory, if not found falls back to defaults. keymap.json file uses the same format as `KEY_MAPPINGS`
|
The existing script reads custom exec mappings from "runtime/remote_callback_map.json", while the new keymap file in this commit would be read from os.path.join(os.getcwd(),'keymap.json'). Wouldn't it make more sense to read both config files from the same place? |
Modified the keymap file lookup location to be in-line with similar lookups in the runtime directory
The script now looks for DEBOUNCE_TIME, USE_SYSTEMCTL and SYSTEMCTL_TO_TOGGLE in the json file, as well as the keymap, allowing these to be set outside of the script. Anything not found in the external file falls back to the defaults set in the script.
Contributor
Author
|
I've moved the file lookup to be under runtime to match the remote_callback_map.json file, and it's been expanded to include other user-configurable variables. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed keymap behavior to look first for keymap.json in the same directory, if not found falls back to defaults. keymap.json file uses the same format as
KEY_MAPPINGS