From eb8046f7316ab99582d4e4ee2078f2aa9b4142e7 Mon Sep 17 00:00:00 2001 From: jack <0x6A73@pm.me> Date: Wed, 25 Oct 2023 03:15:27 -0600 Subject: [PATCH] Add DD mappings for locking switch (#22242) Co-authored-by: Ryan --- data/mappings/info_config.hjson | 4 ++++ data/schemas/keyboard.jsonschema | 10 +++++++++- docs/reference_info_json.md | 7 +++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index 4cebe906b4ce..03c52df948c1 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -79,6 +79,10 @@ "LED_MATRIX_VAL_STEP": {"info_key": "led_matrix.val_steps", "value_type": "int"}, "LED_MATRIX_LED_COUNT": {"info_key": "led_matrix.led_count", "value_type": "int", "to_json": false}, + // Locking Switch + "LOCKING_SUPPORT_ENABLE": {"info_key": "qmk.locking.enabled", "value_type": "bool"}, + "LOCKING_RESYNC_ENABLE": {"info_key": "qmk.locking.resync", "value_type": "bool"}, + // LUFA Bootloader "QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"}, "QMK_ESC_OUTPUT": {"info_key": "qmk_lufa_bootloader.esc_output"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 8ff94fb9f269..c1200997453b 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -756,7 +756,15 @@ "properties": { "keys_per_scan": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, "tap_keycode_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"}, - "tap_capslock_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"} + "tap_capslock_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "locking": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": {"type": "boolean"}, + "resync": {"type": "boolean"} + } + } } }, "qmk_lufa_bootloader": { diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index e05b09c6cde0..6b60bb20c419 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -60,6 +60,13 @@ You can create `info.json` files at every level under `qmk_firmware/keyboards/