summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/python/qmk/c_parse.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/python/qmk/c_parse.py b/lib/python/qmk/c_parse.py
index 3d73e66091..83ab1d1e6d 100644
--- 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] = {