qmk_firmware/data/schemas/keymap.jsonschema

82 lines
2.7 KiB
Plaintext
Raw Permalink Normal View History

{
2022-06-17 22:30:46 -07:00
"$schema": "https://json-schema.org/draft/2020-12/schema#",
"$id": "qmk.keymap.v1",
"title": "Keymap Information",
"type": "object",
"properties": {
"author": {"type": "string"},
"converter": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][0-9a-z_]*$"
},
"host_language": {"$ref": "qmk.definitions.v1#/text_identifier"},
"keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"},
"keymap": {"$ref": "qmk.definitions.v1#/text_identifier"},
"layout": {"$ref": "qmk.definitions.v1#/layout_macro"},
"layers": {
"type": "array",
"items": {
"type": "array",
"items": {"type": "string"}
}
},
"encoders": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "object",
"required": ["ccw", "cw"],
"properties": {
"ccw": {"type": "string"},
"cw": {"type": "string"}
}
}
}
},
"macros": {
"type": "array",
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"action": {
"type": "string",
2022-08-28 11:24:11 -07:00
"enum": ["beep", "delay", "down", "tap", "up"]
},
"keycodes": {
"type": "array",
"items": {
"$ref": "qmk.definitions.v1#/text_identifier"
}
},
"duration": {
"$ref": "qmk.definitions.v1#/unsigned_int"
}
}
}
]
}
}
},
2023-03-27 12:01:07 -07:00
"keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"},
"config": {"$ref": "qmk.keyboard.v1"},
"notes": {
2022-06-17 22:30:46 -07:00
"type": "string"
}
},
"required": [
"keyboard",
"layout",
"layers"
]
}