From 883465d9fb29cd793684ee0ac688ff3517cf8bc0 Mon Sep 17 00:00:00 2001
From: Joel Challis
Date: Mon, 22 Sep 2025 00:01:23 +0100
Subject: Add generic handling to cycle LED/RGB Matrix flags (#24649)
---
docs/reference_info_json.md | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'docs/reference_info_json.md')
diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md
index 84377ef36c..e7cb8c31e8 100644
--- a/docs/reference_info_json.md
+++ b/docs/reference_info_json.md
@@ -415,6 +415,9 @@ Configures the [LED Matrix](features/led_matrix) feature.
* `center_point` Array: Number
* The centroid (geometric center) of the LEDs. Used for certain effects.
* Default: `[112, 32]`
+ * `flag_steps` Array: Number
+ * A list of flag bitfields that can be cycled through.
+ * Default: `[255, 5, 0]`
* `default`
* `animation` String
* The default effect. Must be one of `led_matrix.animations`
@@ -660,6 +663,9 @@ Configures the [RGB Matrix](features/rgb_matrix) feature.
* `center_point` Array: Number
* The centroid (geometric center) of the LEDs. Used for certain effects.
* Default: `[112, 32]`
+ * `flag_steps` Array: Number
+ * A list of flag bitfields that can be cycled through.
+ * Default: `[255, 5, 2, 0]`
* `default`
* `animation` String
* The default effect. Must be one of `rgb_matrix.animations`
--
cgit v1.2.3
From 0a4c1caf204bd9750ef8af8296b2e225682b6029 Mon Sep 17 00:00:00 2001
From: Joel Challis
Date: Mon, 29 Sep 2025 20:26:47 +0100
Subject: Add DD {LED,RGB}_MATRIX_DEFAULT_FLAGS support (#25671)
---
data/mappings/info_config.hjson | 2 ++
data/mappings/info_defaults.hjson | 6 ++++--
data/schemas/keyboard.jsonschema | 6 ++++--
docs/reference_info_json.md | 6 ++++++
keyboards/xelus/valor/rev2/keyboard.json | 3 +++
keyboards/xelus/valor/rev2/rev2.c | 5 -----
6 files changed, 19 insertions(+), 9 deletions(-)
(limited to 'docs/reference_info_json.md')
diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson
index c4052c64f6..1c6e86d876 100644
--- a/data/mappings/info_config.hjson
+++ b/data/mappings/info_config.hjson
@@ -112,6 +112,7 @@
"LED_MATRIX_DEFAULT_ON": {"info_key": "led_matrix.default.on", "value_type": "bool"},
"LED_MATRIX_DEFAULT_VAL": {"info_key": "led_matrix.default.val", "value_type": "int"},
"LED_MATRIX_DEFAULT_SPD": {"info_key": "led_matrix.default.speed", "value_type": "int"},
+ "LED_MATRIX_DEFAULT_FLAGS": {"info_key": "led_matrix.default.flags", "value_type": "int"},
// Locking Switch
"LOCKING_SUPPORT_ENABLE": {"info_key": "qmk.locking.enabled", "value_type": "flag"},
@@ -166,6 +167,7 @@
"RGB_MATRIX_DEFAULT_SAT": {"info_key": "rgb_matrix.default.sat", "value_type": "int"},
"RGB_MATRIX_DEFAULT_VAL": {"info_key": "rgb_matrix.default.val", "value_type": "int"},
"RGB_MATRIX_DEFAULT_SPD": {"info_key": "rgb_matrix.default.speed", "value_type": "int"},
+ "RGB_MATRIX_DEFAULT_FLAGS": {"info_key": "rgb_matrix.default.flags", "value_type": "int"},
// RGBLight
"RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"},
diff --git a/data/mappings/info_defaults.hjson b/data/mappings/info_defaults.hjson
index b33cb4fa1f..d1f1579c55 100644
--- a/data/mappings/info_defaults.hjson
+++ b/data/mappings/info_defaults.hjson
@@ -23,7 +23,8 @@
"animation": "solid",
"on": true,
"val": 255,
- "speed": 128
+ "speed": 128,
+ "flags": 255
},
"led_flush_limit": 16,
"max_brightness": 255,
@@ -53,7 +54,8 @@
"hue": 0,
"sat": 255,
"val": 255,
- "speed": 128
+ "speed": 128,
+ "flags": 255
},
"hue_steps": 8,
"led_flush_limit": 16,
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 93fc4ed8a2..57aeb3de22 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -543,7 +543,8 @@
"on": {"type": "boolean"},
"animation": {"type": "string"},
"val": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
- "speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
+ "speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
+ "flags": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
}
},
"driver": {
@@ -631,7 +632,8 @@
"hue": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
"sat": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
"val": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
- "speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
+ "speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
+ "flags": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
}
},
"driver": {
diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md
index e7cb8c31e8..91ab7f4577 100644
--- a/docs/reference_info_json.md
+++ b/docs/reference_info_json.md
@@ -431,6 +431,9 @@ Configures the [LED Matrix](features/led_matrix) feature.
* `speed` Number
* The default animation speed.
* Default: `128`
+ * `flags` Number
+ * The default LED flags.
+ * Default: `255`
* `driver` String Required
* The driver to use. Must be one of `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`.
* `layout` Array: Object Required
@@ -685,6 +688,9 @@ Configures the [RGB Matrix](features/rgb_matrix) feature.
* `speed` Number
* The default animation speed.
* Default: `128`
+ * `flags` Number
+ * The default LED flags.
+ * Default: `255`
* `driver` String Required
* The driver to use. Must be one of `aw20216s`, `custom`, `is31fl3218`, `is31fl3236`, `is31fl3729`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`, `ws2812`.
* `hue_steps` Number
diff --git a/keyboards/xelus/valor/rev2/keyboard.json b/keyboards/xelus/valor/rev2/keyboard.json
index 451eeb99ff..6356f69646 100644
--- a/keyboards/xelus/valor/rev2/keyboard.json
+++ b/keyboards/xelus/valor/rev2/keyboard.json
@@ -67,6 +67,9 @@
"solid_splash": true,
"solid_multisplash": true
},
+ "default": {
+ "flags": 7
+ },
"driver": "ws2812",
"max_brightness": 200,
"sleep": true
diff --git a/keyboards/xelus/valor/rev2/rev2.c b/keyboards/xelus/valor/rev2/rev2.c
index 34a32cfc61..99db45e08d 100644
--- a/keyboards/xelus/valor/rev2/rev2.c
+++ b/keyboards/xelus/valor/rev2/rev2.c
@@ -64,9 +64,4 @@ led_config_t g_led_config = { {
8, 8, 8, 8
} };
-
-void keyboard_pre_init_kb(void) {
- rgb_matrix_set_flags(LED_FLAG_MODIFIER|LED_FLAG_UNDERGLOW|LED_FLAG_KEYLIGHT);
- keyboard_pre_init_user();
-}
#endif
--
cgit v1.2.3