summaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2025-09-22 00:01:23 +0100
committerGitHub <noreply@github.com>2025-09-22 00:01:23 +0100
commit883465d9fb29cd793684ee0ac688ff3517cf8bc0 (patch)
treeb63c7e5fc0ab06c7e34cb2c3001315623a716cc5 /lib/python
parent115bf771a8b07bd571ccac52f091e081794d40fd (diff)
Add generic handling to cycle LED/RGB Matrix flags (#24649)
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/qmk/info.py8
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):
800 if info_data[feature].get('layout', None) and not info_data[feature].get('led_count', None): 800 if info_data[feature].get('layout', None) and not info_data[feature].get('led_count', None):
801 info_data[feature]['led_count'] = len(info_data[feature]['layout']) 801 info_data[feature]['led_count'] = len(info_data[feature]['layout'])
802 802
803 if info_data[feature].get('layout', None) and not info_data[feature].get('flag_steps', None):
804 flags = {0xFF, 0}
805 # if only a single flag is used, assume only all+none flags
806 unique_flags = set(x.get('flags', 0) for x in info_data[feature]['layout'])
807 if len(unique_flags) > 1:
808 flags.update(unique_flags)
809 info_data[feature]['flag_steps'] = sorted(list(flags), reverse=True)
810
803 return info_data 811 return info_data
804 812
805 813