Handle 19925

This commit is contained in:
zvecr 2023-03-08 23:42:19 +00:00
commit d8988ead43
2 changed files with 16 additions and 1 deletions

View File

@ -93,6 +93,15 @@ class XAPShell(cmd.Cmd):
# cache keycodes for this device
self.keycodes = _load_keycodes(device.version().get('keycodes', 'latest'))
# TODO: dummy code is only to PoC kb/user keycodes
kb_keycodes = self.device.info().get('keycodes', [])
for index, item in enumerate(kb_keycodes):
self.keycodes[0x7E00 + index] = item['key']
user_keycodes = self.device.info().get('user_keycodes', [])
for index, item in enumerate(user_keycodes):
self.keycodes[0x7E40 + index] = item['key']
def do_about(self, arg):
"""Prints out the version info of QMK
"""

View File

@ -894,7 +894,13 @@ def keymap_json_config(keyboard, keymap):
keymap_folder = locate_keymap(keyboard, keymap).parent
km_info_json = parse_configurator_json(keymap_folder / 'keymap.json')
return km_info_json.get('config', {})
ret = km_info_json.get('config', {})
# TODO: dummy code is only to PoC kb/user keycodes
if 'keycodes' in km_info_json:
ret['user_keycodes'] = km_info_json['keycodes']
return ret
def keymap_json(keyboard, keymap):