summaryrefslogtreecommitdiff
path: root/data/schemas/keymap.jsonschema
blob: 1b8d01bcc617b7f1ac1f72046aeb6d3913a78664 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
    "$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",
            "enum": ["elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "bit_c_pro", "stemcell", "bonsai_c4"]
        },
        "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"}
            }
        },
        "macros": {
            "type": "array",
            "items": {
                "type": "array",
                "items": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                                "action": {
                                    "type": "string",
                                    "enum": ["beep", "delay", "down", "tap", "up"]
                                },
                                "keycodes": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "qmk.definitions.v1#/text_identifier"
                                    }
                                },
                                "duration": {
                                    "$ref": "qmk.definitions.v1#/unsigned_int"
                                }
                            }
                        }
                    ]
                }
            }
        },
        "config": {"$ref": "qmk.keyboard.v1"},
        "notes": {
            "type": "string"
        }
    },
    "required": [
        "keyboard",
        "layout",
        "layers"
    ]
}