qmk_firmware

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

commit 0a4c1caf204bd9750ef8af8296b2e225682b6029
parent 883465d9fb29cd793684ee0ac688ff3517cf8bc0
Author: Joel Challis <git@zvecr.com>
Date:   Mon, 29 Sep 2025 20:26:47 +0100

Add DD {LED,RGB}_MATRIX_DEFAULT_FLAGS support (#25671)


Diffstat:
Mdata/mappings/info_config.hjson | 2++
Mdata/mappings/info_defaults.hjson | 6++++--
Mdata/schemas/keyboard.jsonschema | 6++++--
Mdocs/reference_info_json.md | 6++++++
Mkeyboards/xelus/valor/rev2/keyboard.json | 3+++
Mkeyboards/xelus/valor/rev2/rev2.c | 5-----
6 files changed, 19 insertions(+), 9 deletions(-)

diff --git 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 @@ -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 @@ -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 @@ -431,6 +431,9 @@ Configures the [LED Matrix](features/led_matrix) feature. * `speed` <Badge type="info">Number</Badge> * The default animation speed. * Default: `128` + * `flags` <Badge type="info">Number</Badge> + * The default LED flags. + * Default: `255` * `driver` <Badge type="info">String</Badge> <Badge>Required</Badge> * The driver to use. Must be one of `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`. * `layout` <Badge type="info">Array: Object</Badge> <Badge>Required</Badge> @@ -685,6 +688,9 @@ Configures the [RGB Matrix](features/rgb_matrix) feature. * `speed` <Badge type="info">Number</Badge> * The default animation speed. * Default: `128` + * `flags` <Badge type="info">Number</Badge> + * The default LED flags. + * Default: `255` * `driver` <Badge type="info">String</Badge> <Badge>Required</Badge> * 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` <Badge type="info">Number</Badge> diff --git 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 @@ -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