aboutsummaryrefslogtreecommitdiff
path: root/data/schemas/keyboard.jsonschema
diff options
context:
space:
mode:
Diffstat (limited to 'data/schemas/keyboard.jsonschema')
-rw-r--r--data/schemas/keyboard.jsonschema362
1 files changed, 362 insertions, 0 deletions
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
new file mode 100644
index 000000000..308f9b782
--- /dev/null
+++ b/data/schemas/keyboard.jsonschema
@@ -0,0 +1,362 @@
1{
2 "$schema": "http://json-schema.org/draft-07/schema#",
3 "$id": "qmk.keyboard.v1",
4 "title": "Keyboard Information",
5 "type": "object",
6 "properties": {
7 "keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
8 "maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"},
9 "manufacturer": {"$ref": "qmk.definitions.v1#/text_identifier"},
10 "url": {
11 "type": "string",
12 "format": "uri"
13 },
14 "processor": {
15 "type": "string",
16 "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", "STM32L433", "STM32L443", "GD32VF103", "WB32F3G71", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
17 },
18 "audio": {
19 "type": "object",
20 "additionalProperties": false,
21 "properties": {
22 "macro_beep": {"type": "boolean"},
23 "pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
24 "voices": {"type": "boolean"}
25 }
26 },
27 "backlight": {
28 "type": "object",
29 "additionalProperties": false,
30 "properties": {
31 "breathing": {"type": "boolean"},
32 "breathing_period": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
33 "levels": {
34 "type": "number",
35 "min": 1,
36 "max": 31,
37 "multipleOf": 1
38 },
39 "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}
40 }
41 },
42 "bluetooth": {
43 "type": "object",
44 "additionalProperties": false,
45 "properties": {
46 "driver": {
47 "type": "string",
48 "enum": ["AdafruitBLE", "RN42"]
49 },
50 "lto": {"type": "boolean"},
51 }
52 },
53 "board": {
54 "type": "string",
55 "minLength": 2,
56 "pattern": "^[a-zA-Z_][0-9a-zA-Z_]*$"
57 },
58 "bootloader": {
59 "type": "string",
60 "enum": ["atmel-dfu", "bootloadhid", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "qmk-hid", "stm32-dfu", "stm32duino", "gd32v-dfu", "wb32-dfu", "unknown", "usbasploader", "USBasp", "tinyuf2"],
61 },
62 "bootloader_instructions": {
63 "type": "string",
64 "description": "Instructions for putting the keyboard into a mode that allows for firmware flashing."
65 },
66 "build": {
67 "type": "object",
68 "additionalProperties": false,
69 "properties": {
70 "debounce_type": {
71 "type": "string",
72 "enum": ["custom", "eager_pk", "eager_pr", "sym_defer_pk", "sym_eager_pk"]
73 },
74 "firmware_format": {
75 "type": "string",
76 "enum": ["bin", "hex", "uf2"]
77 },
78 "lto": {"type": "boolean"},
79 }
80 },
81 "diode_direction": {
82 "type": "string",
83 "enum": ["COL2ROW", "ROW2COL"]
84 },
85 "debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"},
86 "combo": {
87 "type": "object",
88 "properties": {
89 "count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
90 "term": {"$ref": "qmk.definitions.v1#/unsigned_int"}
91 }
92 },
93 "community_layouts": {
94 "type": "array",
95 "items": {"$ref": "qmk.definitions.v1#/filename"}
96 },
97 "features": {"$ref": "qmk.definitions.v1#/boolean_array"},
98 "indicators": {
99 "type": "object",
100 "properties": {
101 "caps_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
102 "num_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
103 "scroll_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}
104 }
105 },
106 "layout_aliases": {
107 "type": "object",
108 "additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"}
109 },
110 "layouts": {
111 "type": "object",
112 "additionalProperties": {
113 "type": "object",
114 "additionalProperties": false,
115 "properties": {
116 "filename": {
117 "type": "string"
118 },
119 "c_macro": {
120 "type": "boolean"
121 },
122 "layout": {
123 "type": "array",
124 "items": {
125 "type": "object",
126 "additionalProperties": false,
127 "properties": {
128 "label": {"type": "string"},
129 "matrix": {
130 "type": "array",
131 "minItems": 2,
132 "maxItems": 2,
133 "items": {
134 "type": "number",
135 "min": 0,
136 "multipleOf": 1
137 }
138 },
139 "r": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
140 "rx": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
141 "ry": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
142 "h": {"$ref": "qmk.definitions.v1#/key_unit"},
143 "w": {"$ref": "qmk.definitions.v1#/key_unit"},
144 "x": {"$ref": "qmk.definitions.v1#/key_unit"},
145 "y": {"$ref": "qmk.definitions.v1#/key_unit"}
146 }
147 }
148 }
149 }
150 }
151 },
152 "leader_key": {
153 "type": "object",
154 "properties": {
155 "timing": {"type": "boolean"},
156 "strict_processing": {"type": "boolean"},
157 "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
158 }
159 },
160 "matrix_pins": {
161 "type": "object",
162 "additionalProperties": false,
163 "properties": {
164 "custom": {"type": "boolean"},
165 "custom_lite": {"type": "boolean"},
166 "ghost": {"type": "boolean"},
167 "io_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
168 "direct": {
169 "type": "array",
170 "items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
171 },
172 "cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
173 "rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
174 "unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
175 }
176 },
177 "mouse_key": {
178 "type": "object",
179 "properties": {
180 "enabled": {"type": "boolean"},
181 "delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
182 "interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
183 "max_speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
184 "time_to_max": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
185 "wheel_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
186 }
187 },
188 "oneshot": {
189 "type": "object",
190 "properties": {
191 "tap_toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"},
192 "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
193 }
194 },
195 "rgblight": {
196 "type": "object",
197 "additionalProperties": false,
198 "properties": {
199 "animations": {
200 "type": "object",
201 "additionalProperties": {
202 "type": "boolean"
203 }
204 },
205 "brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
206 "hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
207 "layers": {
208 "type": "object",
209 "additionalProperties": false,
210 "properties": {
211 "blink": {"type": "boolean"},
212 "enabled": {"type": "boolean"},
213 "max": {
214 "type": "number",
215 "min": 1,
216 "max": 32,
217 "multipleOf": 1
218 },
219 "override_rgb": {"type": "boolean"}
220 }
221 },
222 "led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
223 "max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
224 "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
225 "rgbw": {"type": "boolean"},
226 "saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
227 "sleep": {"type": "boolean"},
228 "split": {"type": "boolean"},
229 "split_count": {
230 "type": "array",
231 "minLength": 2,
232 "maxLength": 2,
233 "items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
234 }
235 }
236 },
237 "split": {
238 "type": "object",
239 "additionalProperties": false,
240 "properties": {
241 "enabled": {"type": "boolean"},
242 "matrix_grid": {
243 "type": "array",
244 "items": {"$ref": "qmk.definitions.v1#/mcu_pin"}
245 },
246 "matrix_pins": {
247 "type": "object",
248 "additionalProperties": false,
249 "properties": {
250 "right": {
251 "type": "object",
252 "additionalProperties": false,
253 "properties": {
254 "direct": {
255 "type": "array",
256 "items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
257 },
258 "cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
259 "rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
260 "unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
261 }
262 }
263 }
264 },
265 "main": {
266 "type": "string",
267 "enum": ["eeprom", "left", "matrix_grid", "pin", "right"]
268 },
269 "soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
270 "soft_serial_speed": {
271 "type": "number",
272 "min": 0,
273 "max": 5,
274 "multipleOf": 1
275 },
276 "transport": {
277 "type": "object",
278 "additionalProperties": false,
279 "properties": {
280 "protocol": {
281 "type": "string",
282 "enum": ["custom", "i2c", "serial", "serial_usart"]
283 },
284 "sync_matrix_state": {"type": "boolean"},
285 "sync_modifiers": {"type": "boolean"}
286 }
287 },
288 "usb_detect": {
289 "type": "object",
290 "additionalProperties": false,
291 "properties": {
292 "enabled": {"type": "boolean"},
293 "polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int"},
294 "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
295 }
296 }
297 }
298 },
299 "tags": {
300 "type": "array",
301 "items": {"type": "string"}
302 },
303 "tapping": {
304 "type": "object",
305 "properties": {
306 "force_hold": {"type": "boolean"},
307 "force_hold_per_key": {"type": "boolean"},
308 "ignore_mod_tap_interrupt": {"type": "boolean"},
309 "ignore_mod_tap_interrupt_per_key": {"type": "boolean"},
310 "permissive_hold": {"type": "boolean"},
311 "permissive_hold_per_key": {"type": "boolean"},
312 "retro": {"type": "boolean"},
313 "retro_per_key": {"type": "boolean"},
314 "term": {"$ref": "qmk.definitions.v1#/unsigned_int"},
315 "term_per_key": {"type": "boolean"},
316 "toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"},
317 }
318 },
319 "usb": {
320 "type": "object",
321 "additionalProperties": false,
322 "properties": {
323 "device_ver": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
324 "force_nkro": {"type": "boolean"},
325 "pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
326 "vid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
327 "max_power": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
328 "no_startup_check": {"type": "boolean"},
329 "polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
330 "shared_endpoint": {
331 "type": "object",
332 "additionalProperties": false,
333 "properties": {
334 "keyboard": {"type": "boolean"},
335 "mouse": {"type": "boolean"}
336 }
337 },
338 "suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
339 "wait_for": {"type": "boolean"},
340 }
341 },
342 "qmk": {
343 "type": "object",
344 "additionalProperties": false,
345 "properties": {
346 "keys_per_scan": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
347 "tap_keycode_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
348 "tap_capslock_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
349 }
350 },
351 "qmk_lufa_bootloader": {
352 "type": "object",
353 "additionalProperties": false,
354 "properties": {
355 "esc_output": {"$ref": "qmk.definitions.v1#/mcu_pin"},
356 "esc_input": {"$ref": "qmk.definitions.v1#/mcu_pin"},
357 "led": {"$ref": "qmk.definitions.v1#/mcu_pin"},
358 "speaker": {"$ref": "qmk.definitions.v1#/mcu_pin"}
359 }
360 }
361 }
362}