From 36b5559b997cedd14a352aa70891558936b8b3a3 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 20 Nov 2024 22:31:54 -0800 Subject: [Core] Add Layer Lock feature (#23430) Co-authored-by: Daniel <1767914+iamdanielv@users.noreply.github.com> Co-authored-by: Pascal Getreuer Co-authored-by: Pascal Getreuer <50221757+getreuer@users.noreply.github.com> --- data/constants/keycodes/keycodes_0.0.6_quantum.hjson | 7 +++++++ data/mappings/info_config.hjson | 3 +++ data/schemas/keyboard.jsonschema | 6 ++++++ 3 files changed, 16 insertions(+) (limited to 'data') diff --git a/data/constants/keycodes/keycodes_0.0.6_quantum.hjson b/data/constants/keycodes/keycodes_0.0.6_quantum.hjson index 814cd66a5b..be3285f9e4 100644 --- a/data/constants/keycodes/keycodes_0.0.6_quantum.hjson +++ b/data/constants/keycodes/keycodes_0.0.6_quantum.hjson @@ -3,5 +3,12 @@ "0x7C20": "!delete!", // old QK_OUTPUT_AUTO "0x7C21": "!delete!", // old QK_OUTPUT_USB "0x7C22": "!delete!", // old QK_OUTPUT_BLUETOOTH + "0x7C7B": { + "group": "quantum", + "key": "QK_LAYER_LOCK", + "aliases": [ + "QK_LLCK" + ] + } } } diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index 4c895cf5d5..8d3e3c7f0e 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -64,6 +64,9 @@ "WEAR_LEVELING_BACKING_SIZE": {"info_key": "eeprom.wear_leveling.backing_size", "value_type": "int", "to_json": false}, "WEAR_LEVELING_LOGICAL_SIZE": {"info_key": "eeprom.wear_leveling.logical_size", "value_type": "int", "to_json": false}, + // Layer locking + "LAYER_LOCK_IDLE_TIMEOUT": {"info_key": "layer_lock.timeout", "value_type": "int"}, + // Indicators "LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"}, "LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 9f1f6dd74a..ec87680fa0 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -375,6 +375,12 @@ } }, "keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"}, + "layer_lock": { + "type": "object", + "properties": { + "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + }, "layout_aliases": { "type": "object", "additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"} -- cgit v1.2.3