qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

commit 6fabc330e3bd8156e84ef3106c07e93d210c37d1
parent 80c6fbad1cd25071942f44119d76d29adcccd9f3
Author: Ryan <fauxpark@gmail.com>
Date:   Thu,  2 Mar 2023 10:56:45 +1100

Check all keys have matrix positions when parsing C LAYOUT macros (#19781)


Diffstat:
Mlib/python/qmk/c_parse.py | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/python/qmk/c_parse.py b/lib/python/qmk/c_parse.py @@ -88,7 +88,9 @@ def find_layouts(file): for i, key in enumerate(parsed_layout): if 'label' not in key: cli.log.error('Invalid LAYOUT macro in %s: Empty parameter name in macro %s at pos %s.', file, macro_name, i) - elif key['label'] in matrix_locations: + elif key['label'] not in matrix_locations: + cli.log.error('Invalid LAYOUT macro in %s: Key %s in macro %s has no matrix position!', file, key['label'], macro_name) + else: key['matrix'] = matrix_locations[key['label']] parsed_layouts[macro_name] = {