diff options
author | Drashna Jael're <drashna@live.com> | 2022-11-08 17:14:27 -0800 |
---|---|---|
committer | Drashna Jael're <drashna@live.com> | 2022-11-08 17:14:27 -0800 |
commit | 64f04b30c2f48fc0e7c49ca043443f03dc56df94 (patch) | |
tree | e0f374d3b92bacefd22c31e7bda8ee1c6fcb37de /data/schemas/keyboard.jsonschema | |
parent | d9f575fa86ca10b990958d4e677c6a0a387dc7c3 (diff) | |
parent | 96c48a5f4aa461ed31fd4ee61151ac206e16fb5f (diff) |
Merge tag '0.18.16' into firmware22
Diffstat (limited to 'data/schemas/keyboard.jsonschema')
-rw-r--r-- | data/schemas/keyboard.jsonschema | 177 |
1 files changed, 122 insertions, 55 deletions
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index dc5592220b..4c785a968a 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -1,7 +1,27 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "$id": "qmk.keyboard.v1", "title": "Keyboard Information", + "definitions": { + "encoder_config": { + "type": "object", + "properties": { + "rotary": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": ["pin_a", "pin_b"], + "properties": { + "pin_a": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "pin_b": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "resolution": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + } + } + } + } + }, "type": "object", "properties": { "keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"}, @@ -14,7 +34,7 @@ }, "development_board": { "type": "string", - "enum": ["promicro", "elite_c", "proton_c", "bluepill", "blackpill_f401", "blackpill_f411"] + "enum": ["promicro", "elite_c", "proton_c", "kb2040", "promicro_rp2040", "blok", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4"] }, "pin_compatible": { "type": "string", @@ -22,7 +42,7 @@ }, "processor": { "type": "string", - "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66FX1M0", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F405", "STM32F407", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L432", "STM32L433", "STM32L442", "STM32L443", "GD32VF103", "WB32F3G71", "WB32FQ95", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] + "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK64FX512", "MK66FX1M0", "RP2040", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F405", "STM32F407", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L432", "STM32L433", "STM32L442", "STM32L443", "GD32VF103", "WB32F3G71", "WB32FQ95", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] }, "audio": { "type": "object", @@ -40,12 +60,12 @@ "breathing": {"type": "boolean"}, "breathing_period": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, "levels": { - "type": "number", - "min": 1, - "max": 31, - "multipleOf": 1 + "type": "integer", + "minimum": 1, + "maximum": 31 }, - "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"} + "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "on_state": {"$ref": "qmk.definitions.v1#/bit"} } }, "bluetooth": { @@ -56,7 +76,7 @@ "type": "string", "enum": ["BluefruitLE", "RN42"] }, - "lto": {"type": "boolean"}, + "lto": {"type": "boolean"} } }, "board": { @@ -66,7 +86,29 @@ }, "bootloader": { "type": "string", - "enum": ["atmel-dfu", "bootloadhid", "bootloadHID", "custom", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "md-boot", "qmk-dfu", "qmk-hid", "stm32-dfu", "stm32duino", "gd32v-dfu", "wb32-dfu", "unknown", "usbasploader", "USBasp", "tinyuf2"], + "enum": [ + "atmel-dfu", + "bootloadhid", + "bootloadHID", + "caterina", + "custom", + "gd32v-dfu", + "halfkay", + "kiibohd", + "lufa-dfu", + "lufa-ms", + "md-boot", + "qmk-dfu", + "qmk-hid", + "rp2040", + "stm32-dfu", + "stm32duino", + "tinyuf2", + "unknown", + "usbasploader", + "USBasp", + "wb32-dfu" + ] }, "bootloader_instructions": { "type": "string", @@ -78,13 +120,13 @@ "properties": { "debounce_type": { "type": "string", - "enum": ["custom", "eager_pk", "eager_pr", "sym_defer_pk", "sym_defer_pr", "sym_eager_pk"] + "enum": ["asym_eager_defer_pk", "custom", "sym_defer_g", "sym_defer_pk", "sym_defer_pr", "sym_eager_pk", "sym_eager_pr"] }, "firmware_format": { "type": "string", "enum": ["bin", "hex", "uf2"] }, - "lto": {"type": "boolean"}, + "lto": {"type": "boolean"} } }, "diode_direction": { @@ -99,8 +141,8 @@ "enabled": {"type": "boolean"}, "both_shifts_turns_on": {"type": "boolean"}, "double_tap_shift_turns_on": {"type": "boolean"}, - "idle_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}, - }, + "idle_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } }, "combo": { "type": "object", @@ -113,13 +155,22 @@ "type": "array", "items": {"$ref": "qmk.definitions.v1#/filename"} }, + "encoder": { + "$ref": "#/definitions/encoder_config", + "properties": { + "enabled": {"type": "boolean"} + } + }, "features": {"$ref": "qmk.definitions.v1#/boolean_array"}, "indicators": { "type": "object", "properties": { "caps_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}, "num_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}, - "scroll_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"} + "scroll_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "compose": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "kana": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "on_state": {"$ref": "qmk.definitions.v1#/bit"} } }, "layout_aliases": { @@ -145,18 +196,20 @@ "type": "object", "additionalProperties": false, "properties": { - "label": {"type": "string"}, + "label": { + "type": "string", + "pattern": "^[^\\n]*$" + }, "matrix": { "type": "array", "minItems": 2, "maxItems": 2, "items": { - "type": "number", - "min": 0, - "multipleOf": 1 + "type": "integer", + "minimum": 0 } }, - "r": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, + "r": {"$ref": "qmk.definitions.v1#/signed_decimal"}, "rx": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, "ry": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, "h": {"$ref": "qmk.definitions.v1#/key_unit"}, @@ -190,18 +243,17 @@ "items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} }, "cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, - "rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, - "unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} + "rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} } }, "mouse_key": { "type": "object", "properties": { "enabled": {"type": "boolean"}, - "delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} - "interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} - "max_speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} - "time_to_max": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + "delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "max_speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "time_to_max": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, "wheel_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} } }, @@ -227,14 +279,13 @@ "minItems": 2, "maxItems": 2, "items": { - "type": "number", - "min": 0, - "multipleOf": 1 + "type": "integer", + "minimum": 0 } }, "x": {"$ref": "qmk.definitions.v1#/key_unit"}, "y": {"$ref": "qmk.definitions.v1#/key_unit"}, - "flags": {"$ref": "qmk.definitions.v1#/unsigned_decimal"} + "flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} } } } @@ -255,14 +306,13 @@ "minItems": 2, "maxItems": 2, "items": { - "type": "number", - "min": 0, - "multipleOf": 1 + "type": "integer", + "minimum": 0 } }, "x": {"$ref": "qmk.definitions.v1#/key_unit"}, "y": {"$ref": "qmk.definitions.v1#/key_unit"}, - "flags": {"$ref": "qmk.definitions.v1#/unsigned_decimal"} + "flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} } } } @@ -287,10 +337,9 @@ "blink": {"type": "boolean"}, "enabled": {"type": "boolean"}, "max": { - "type": "number", - "min": 1, - "max": 32, - "multipleOf": 1 + "type": "integer", + "minimum": 1, + "maximum": 32 }, "override_rgb": {"type": "boolean"} } @@ -304,8 +353,8 @@ "split": {"type": "boolean"}, "split_count": { "type": "array", - "minLength": 2, - "maxLength": 2, + "minItems": 2, + "maxItems": 2, "items": {"$ref": "qmk.definitions.v1#/unsigned_int"} } } @@ -319,21 +368,31 @@ "idle_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "unlock_sequence": { "type": "array", - "minLength": 1, - "maxLength": 5, + "minItems": 1, + "maxItems": 5, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": { - "type": "number", - "min": 0, - "multipleOf": 1 + "type": "integer", + "minimum": 0 } } } } }, + "stenography": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": {"type": "boolean"}, + "protocol": { + "type": "string", + "enum": ["all", "geminipr", "txbolt"] + } + } + }, "split": { "type": "object", "additionalProperties": false, @@ -362,16 +421,24 @@ } } }, + "encoder": { + "type": "object", + "additionalProperties": false, + "properties": { + "right": { + "$ref": "#/definitions/encoder_config" + } + } + }, "main": { "type": "string", "enum": ["eeprom", "left", "matrix_grid", "pin", "right"] }, "soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, "soft_serial_speed": { - "type": "number", - "min": 0, - "max": 5, - "multipleOf": 1 + "type": "integer", + "minimum": 0, + "maximum": 5 }, "transport": { "type": "object", @@ -413,7 +480,7 @@ "retro_per_key": {"type": "boolean"}, "term": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "term_per_key": {"type": "boolean"}, - "toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"} } }, "usb": { @@ -425,7 +492,7 @@ "force_nkro": {"type": "boolean"}, "pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, "vid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, - "max_power": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "max_power": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "no_startup_check": {"type": "boolean"}, "polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, "shared_endpoint": { @@ -436,8 +503,8 @@ "mouse": {"type": "boolean"} } }, - "suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, - "wait_for": {"type": "boolean"}, + "suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "wait_for": {"type": "boolean"} } }, "qmk": { @@ -445,8 +512,8 @@ "additionalProperties": false, "properties": { "keys_per_scan": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, - "tap_keycode_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, - "tap_capslock_delay": {"$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"} } }, "qmk_lufa_bootloader": { |