Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
0dc0516f0c
18 changed files with 614 additions and 106 deletions
|
@ -13,6 +13,7 @@ from milc import cli
|
|||
|
||||
import qmk.keymap
|
||||
from qmk.constants import KEYBOARD_OUTPUT_PREFIX
|
||||
from qmk.json_schema import json_load
|
||||
|
||||
time_fmt = '%Y-%m-%d-%H:%M:%S'
|
||||
|
||||
|
@ -191,6 +192,15 @@ def parse_configurator_json(configurator_file):
|
|||
"""
|
||||
# FIXME(skullydazed/anyone): Add validation here
|
||||
user_keymap = json.load(configurator_file)
|
||||
orig_keyboard = user_keymap['keyboard']
|
||||
aliases = json_load(Path('data/mappings/keyboard_aliases.json'))
|
||||
|
||||
if orig_keyboard in aliases:
|
||||
if 'target' in aliases[orig_keyboard]:
|
||||
user_keymap['keyboard'] = aliases[orig_keyboard]['target']
|
||||
|
||||
if 'layouts' in aliases[orig_keyboard] and user_keymap['layout'] in aliases[orig_keyboard]['layouts']:
|
||||
user_keymap['layout'] = aliases[orig_keyboard]['layouts'][user_keymap['layout']]
|
||||
|
||||
return user_keymap
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue