From b1331d03ca52ecb1a7cdfb96dc199cbffb70b527 Mon Sep 17 00:00:00 2001 From: jack <0x6A73@pm.me> Date: Tue, 10 Oct 2023 00:37:05 -0600 Subject: [PATCH 1/5] initial --- data/mappings/info_config.hjson | 4 ++++ data/schemas/keyboard.jsonschema | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index e68a4439d05e..ee7763cfbdf6 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -66,6 +66,10 @@ "LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "bool"}, "LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"}, + // Locking Switch + "LOCKING_SUPPORT_ENABLE": {"info_key": "locking.enabled", "value_type": "bool"}, + "LOCKING_RESYNC_ENABLE": {"info_key": "locking.resync", "value_type": "bool"}, + // LED Matrix "LED_DISABLE_WHEN_USB_SUSPENDED": {"info_key": "led_matrix.sleep", "value_type": "bool"}, "LED_MATRIX_CENTER": {"info_key": "led_matrix.center_point", "value_type": "array.int"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index e0be8f5b972a..2db42854f0cb 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -346,6 +346,14 @@ "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} } }, + "locking": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": {"type": "boolean"}, + "resync": {"type": "boolean"} + } + }, "matrix_pins": { "type": "object", "additionalProperties": false, From 88606f530bb37ccfbd8dc6fac801aede82ffec91 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl <0x6A73@pm.me> Date: Tue, 10 Oct 2023 15:17:27 -0600 Subject: [PATCH 2/5] docs --- docs/reference_info_json.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index f31d3c4a2fd5..34fc13c437af 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -370,6 +370,16 @@ Configures the [LED Matrix](feature_led_matrix.md) feature. * The number of brightness adjustment steps. * Default: `8` +## Mechanical Lock Switch Support :id=locking-support + +* `locking` + * `enabled` + * Enable locking switch support + * Default: `false` + * `resync` + * Keep switch state consistent with keyboard LED state + * Default: `false` + ## Matrix :id=matrix * `debounce` From ba7834d30675fcf73d6be75ceb76cce2b222688b Mon Sep 17 00:00:00 2001 From: jack <0x6A73@pm.me> Date: Thu, 19 Oct 2023 11:15:49 -0600 Subject: [PATCH 3/5] changes based on feedback --- data/mappings/info_config.hjson | 8 ++++---- data/schemas/keyboard.jsonschema | 18 +++++++++--------- docs/reference_info_json.md | 18 ++++++++---------- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index ee7763cfbdf6..0aa25b230c06 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -66,10 +66,6 @@ "LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "bool"}, "LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"}, - // Locking Switch - "LOCKING_SUPPORT_ENABLE": {"info_key": "locking.enabled", "value_type": "bool"}, - "LOCKING_RESYNC_ENABLE": {"info_key": "locking.resync", "value_type": "bool"}, - // LED Matrix "LED_DISABLE_WHEN_USB_SUSPENDED": {"info_key": "led_matrix.sleep", "value_type": "bool"}, "LED_MATRIX_CENTER": {"info_key": "led_matrix.center_point", "value_type": "array.int"}, @@ -83,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 2db42854f0cb..cea7da8f53fe 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -346,14 +346,6 @@ "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} } }, - "locking": { - "type": "object", - "additionalProperties": false, - "properties": { - "enabled": {"type": "boolean"}, - "resync": {"type": "boolean"} - } - }, "matrix_pins": { "type": "object", "additionalProperties": false, @@ -742,7 +734,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 34fc13c437af..467206ca4101 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -66,6 +66,14 @@ You can create `info.json` files at every level under `qmk_firmware/keyboards/ Date: Fri, 20 Oct 2023 00:36:19 -0600 Subject: [PATCH 4/5] alphabetise --- docs/reference_info_json.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 467206ca4101..008d3d0bb8d5 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -60,12 +60,6 @@ You can create `info.json` files at every level under `qmk_firmware/keyboards/ Date: Wed, 25 Oct 2023 00:28:18 -0600 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Ryan --- docs/reference_info_json.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 008d3d0bb8d5..7dadddc33c6b 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -62,10 +62,10 @@ You can create `info.json` files at every level under `qmk_firmware/keyboards/