diff options
Diffstat (limited to 'lib/python')
-rw-r--r-- | lib/python/qmk/info.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index f63228b2bc..59a64095e7 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -800,6 +800,14 @@ def _extract_led_config(info_data, keyboard): if info_data[feature].get('layout', None) and not info_data[feature].get('led_count', None): info_data[feature]['led_count'] = len(info_data[feature]['layout']) + if info_data[feature].get('layout', None) and not info_data[feature].get('flag_steps', None): + flags = {0xFF, 0} + # if only a single flag is used, assume only all+none flags + unique_flags = set(x.get('flags', 0) for x in info_data[feature]['layout']) + if len(unique_flags) > 1: + flags.update(unique_flags) + info_data[feature]['flag_steps'] = sorted(list(flags), reverse=True) + return info_data |