summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/mappings/defaults.json20
-rw-r--r--data/mappings/info_config.json4
-rw-r--r--data/mappings/info_rules.json3
-rw-r--r--data/schemas/definitions.jsonschema41
-rw-r--r--data/schemas/keyboard.jsonschema125
-rw-r--r--data/schemas/keymap.jsonschema5
6 files changed, 134 insertions, 64 deletions
diff --git a/data/mappings/defaults.json b/data/mappings/defaults.json
index e62ab688d6..b62e5450b3 100644
--- a/data/mappings/defaults.json
+++ b/data/mappings/defaults.json
@@ -16,6 +16,24 @@
"board": "QMK_PROTON_C",
"pin_compatible": "promicro"
},
+ "kb2040": {
+ "processor": "RP2040",
+ "bootloader": "rp2040",
+ "board": "QMK_PM2040",
+ "pin_compatible": "promicro"
+ },
+ "promicro_rp2040": {
+ "processor": "RP2040",
+ "bootloader": "rp2040",
+ "board": "QMK_PM2040",
+ "pin_compatible": "promicro"
+ },
+ "blok": {
+ "processor": "RP2040",
+ "bootloader": "rp2040",
+ "board": "QMK_PM2040",
+ "pin_compatible": "promicro"
+ },
"bluepill": {
"processor": "STM32F103",
"bootloader": "stm32duino",
@@ -32,4 +50,4 @@
"board": "BLACKPILL_STM32_F411"
}
}
-} \ No newline at end of file
+}
diff --git a/data/mappings/info_config.json b/data/mappings/info_config.json
index 5f0d903bd7..fcceb98025 100644
--- a/data/mappings/info_config.json
+++ b/data/mappings/info_config.json
@@ -12,6 +12,7 @@
"AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"},
"BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"},
"BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"},
+ "BACKLIGHT_ON_STATE": {"info_key": "backlight.on_state", "value_type": "int"},
"BACKLIGHT_PIN": {"info_key": "backlight.pin"},
"BOTH_SHIFTS_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.both_shifts_turns_on", "value_type": "bool"},
"CAPS_WORD_IDLE_TIMEOUT": {"info_key": "caps_word.idle_timeout", "value_type": "int"},
@@ -35,6 +36,9 @@
"LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"},
"LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"},
"LED_SCROLL_LOCK_PIN": {"info_key": "indicators.scroll_lock"},
+ "LED_COMPOSE_PIN": {"info_key": "indicators.compose"},
+ "LED_KANA_PIN": {"info_key": "indicators.kana"},
+ "LED_PIN_ON_STATE": {"info_key": "indicators.on_state", "value_type": "int"},
"MANUFACTURER": {"info_key": "manufacturer"},
"MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "bool"},
"MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"},
diff --git a/data/mappings/info_rules.json b/data/mappings/info_rules.json
index d4eec37ba0..279b5ac213 100644
--- a/data/mappings/info_rules.json
+++ b/data/mappings/info_rules.json
@@ -13,6 +13,7 @@
"BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false},
"BLUETOOTH": {"info_key": "bluetooth.driver"},
"CAPS_WORD_ENABLE": {"info_key": "caps_word.enabled", "value_type": "bool"},
+ "ENCODER_ENABLE": {"info_key": "encoder.enabled", "value_type": "bool"},
"FIRMWARE_FORMAT": {"info_key": "build.firmware_format"},
"KEYBOARD_SHARED_EP": {"info_key": "usb.shared_endpoint.keyboard", "value_type": "bool"},
"MOUSE_SHARED_EP": {"info_key": "usb.shared_endpoint.mouse", "value_type": "bool"},
@@ -27,6 +28,8 @@
"SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"},
"SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false},
"WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"},
+ "STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"},
+ "STENO_PROTOCOL": {"info_key": "stenography.protocol"},
# Items we want flagged in lint
"CTPC": {"info_key": "_deprecated.ctpc", "deprecated": true},
diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema
index 1bdfbbeb03..8b68a58482 100644
--- a/data/schemas/definitions.jsonschema
+++ b/data/schemas/definitions.jsonschema
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2020-12/schema#",
"$id": "qmk.definitions.v1",
"title": "Common definitions used across QMK's jsonschemas.",
"type": "object",
@@ -65,8 +65,7 @@
]
},
"key_unit": {
- "type": "number",
- "min": 0.25
+ "type": "number"
},
"keyboard": {
"oneOf": [
@@ -103,8 +102,11 @@
"pattern": "^LINE_PIN\\d{1,2}$"
},
{
- "type": "number",
- "multipleOf": 1
+ "type": "string",
+ "pattern": "^GP\\d{1,2}$"
+ },
+ {
+ "type": "integer"
},
{
"type": "null"
@@ -115,14 +117,12 @@
"type": "number"
},
"signed_int": {
- "type": "number",
- "multipleOf": 1
+ "type": "integer"
},
"signed_int_8": {
- "type": "number",
- "min": -127,
- "max": 127,
- "multipleOf": 1
+ "type": "integer",
+ "minimum": -127,
+ "maximum": 127
},
"string_array": {
"type": "array",
@@ -138,17 +138,20 @@
},
"unsigned_decimal": {
"type": "number",
- "min": 0
+ "minimum": 0
},
"unsigned_int": {
- "type": "number",
- "min": 0,
- "multipleOf": 1
+ "type": "integer",
+ "minimum": 0
},
"unsigned_int_8": {
- "type": "number",
- "min": 0,
- "max": 255,
- "multipleOf": 1
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 255
+ },
+ "bit": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1
}
}
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index fd60920578..46f840616a 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", "bluepill", "blackpill_f401", "blackpill_f411"]
},
"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": {
@@ -66,7 +86,7 @@
},
"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", "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", "rp2040"],
},
"bootloader_instructions": {
"type": "string",
@@ -113,13 +133,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": {
@@ -154,12 +183,11 @@
"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"},
@@ -230,14 +258,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"}
}
}
}
@@ -258,14 +285,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"}
}
}
}
@@ -290,10 +316,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"}
}
@@ -307,8 +332,8 @@
"split": {"type": "boolean"},
"split_count": {
"type": "array",
- "minLength": 2,
- "maxLength": 2,
+ "minItems": 2,
+ "maxItems": 2,
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
}
}
@@ -322,21 +347,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,
@@ -365,16 +400,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",
@@ -428,7 +471,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": {
@@ -439,7 +482,7 @@
"mouse": {"type": "boolean"}
}
},
- "suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
+ "suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"wait_for": {"type": "boolean"},
}
},
@@ -448,8 +491,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": {
diff --git a/data/schemas/keymap.jsonschema b/data/schemas/keymap.jsonschema
index 3803301a66..92a1ce533d 100644
--- a/data/schemas/keymap.jsonschema
+++ b/data/schemas/keymap.jsonschema
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2020-12/schema#",
"$id": "qmk.keymap.v1",
"title": "Keymap Information",
"type": "object",
@@ -50,8 +50,7 @@
},
"config": {"$ref": "qmk.keyboard.v1"},
"notes": {
- "type": "string",
- "description": "asdf"
+ "type": "string"
}
},
"required": [