keyboard.jsonschema 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. {
  2. "$schema": "http://json-schema.org/schema#",
  3. "$id": "qmk.keyboard.v1",
  4. "title": "Keyboard Information",
  5. "type": "object",
  6. "properties": {
  7. "keyboard_name": {
  8. "type": "string",
  9. "minLength": 2,
  10. "maxLength": 250
  11. },
  12. "maintainer": {
  13. "type": "string",
  14. "minLength": 2,
  15. "maxLength": 250
  16. },
  17. "manufacturer": {
  18. "type": "string",
  19. "minLength": 2,
  20. "maxLength": 250
  21. },
  22. "url": {
  23. "type": "string",
  24. "format": "uri"
  25. },
  26. "processor": {
  27. "type": "string",
  28. "enum": ["MK20DX128", "MK20DX256", "MKL26Z64", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "at90usb1286", "at90usb646", "atmega16u2", "atmega328p", "atmega32a", "atmega32u2", "atmega32u4", "attiny85", "cortex-m4"]
  29. },
  30. "bootloader": {
  31. "type": "string",
  32. "enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp"]
  33. },
  34. "diode_direction": {
  35. "type": "string",
  36. "enum": ["COL2ROW", "ROW2COL"]
  37. },
  38. "debounce": {
  39. "type": "number",
  40. "min": 0,
  41. "multipleOf": 1
  42. },
  43. "height": {
  44. "type": "number",
  45. "min": 0.25
  46. },
  47. "width": {
  48. "type": "number",
  49. "min": 0.25
  50. },
  51. "community_layouts": {
  52. "type": "array",
  53. "items": {
  54. "type": "string",
  55. "minLength": 2,
  56. "pattern": "^[0-9a-z_]*$"
  57. }
  58. },
  59. "features": {
  60. "type": "object",
  61. "additionalProperties": {"type": "boolean"}
  62. },
  63. "indicators": {
  64. "type": "object",
  65. "properties": {
  66. "caps_lock": {
  67. "type": "string",
  68. "pattern": "^[A-K]\\d{1,2}$"
  69. },
  70. "num_lock": {
  71. "type": "string",
  72. "pattern": "^[A-K]\\d{1,2}$"
  73. },
  74. "scroll_lock": {
  75. "type": "string",
  76. "pattern": "^[A-K]\\d{1,2}$"
  77. }
  78. }
  79. },
  80. "layout_aliases": {
  81. "type": "object",
  82. "additionalProperties": {
  83. "type": "string",
  84. "pattern": "^LAYOUT_[0-9a-z_]*$"
  85. }
  86. },
  87. "layouts": {
  88. "type": "object",
  89. "additionalProperties": {
  90. "type": "object",
  91. "additionalProperties": false,
  92. "properties": {
  93. "filename": {
  94. "type": "string"
  95. },
  96. "c_macro": {
  97. "type": "boolean"
  98. },
  99. "key_count": {
  100. "type": "number",
  101. "min": 0,
  102. "multipleOf": 1
  103. },
  104. "layout": {
  105. "type": "array",
  106. "items": {
  107. "type": "object",
  108. "additionalProperties": false,
  109. "properties": {
  110. "label": {"type": "string"},
  111. "matrix": {
  112. "type": "array",
  113. "minItems": 2,
  114. "maxItems": 2,
  115. "items": {
  116. "type": "number",
  117. "min": 0,
  118. "multipleOf": 1
  119. }
  120. },
  121. "h": {
  122. "type": "number",
  123. "min": 0.25
  124. },
  125. "r": {
  126. "type": "number",
  127. "min": 0
  128. },
  129. "rx": {
  130. "type": "number",
  131. "min": 0
  132. },
  133. "ry": {
  134. "type": "number",
  135. "min": 0
  136. },
  137. "w": {
  138. "type": "number",
  139. "min": 0.25
  140. },
  141. "x": {
  142. "type": "number",
  143. "min": 0
  144. },
  145. "y": {
  146. "type": "number",
  147. "min": 0
  148. }
  149. }
  150. }
  151. }
  152. }
  153. }
  154. },
  155. "matrix_pins": {
  156. "type": "object",
  157. "additionalProperties": false,
  158. "properties": {
  159. "direct": {
  160. "type": "array",
  161. "items": {
  162. "type": "array",
  163. "items": {
  164. "oneOf": [
  165. {
  166. "type": "string",
  167. "pattern": "^[A-K]\\d{1,2}$"
  168. },
  169. {
  170. "type": "number",
  171. "multipleOf": 1
  172. },
  173. {
  174. "type": "null"
  175. }
  176. ]
  177. }
  178. }
  179. },
  180. "cols": {
  181. "type": "array",
  182. "items": {
  183. "oneOf": [
  184. {
  185. "type": "string",
  186. "pattern": "^[A-K]\\d{1,2}$"
  187. },
  188. {
  189. "type": "number",
  190. "multipleOf": 1
  191. },
  192. {
  193. "type": "null"
  194. }
  195. ]
  196. }
  197. },
  198. "rows": {
  199. "type": "array",
  200. "items": {
  201. "oneOf": [
  202. {
  203. "type": "string",
  204. "pattern": "^[A-K]\\d{1,2}$"
  205. },
  206. {
  207. "type": "number",
  208. "multipleOf": 1
  209. },
  210. {
  211. "type": "null"
  212. }
  213. ]
  214. }
  215. }
  216. }
  217. },
  218. "rgblight": {
  219. "type": "object",
  220. "additionalProperties": false,
  221. "properties": {
  222. "animations": {
  223. "type": "object",
  224. "additionalProperties": {
  225. "type": "boolean"
  226. }
  227. },
  228. "brightness_steps": {
  229. "type": "number",
  230. "min": 0,
  231. "multipleOf": 1
  232. },
  233. "hue_steps": {
  234. "type": "number",
  235. "min": 0,
  236. "multipleOf": 1
  237. },
  238. "led_count": {
  239. "type": "number",
  240. "min": 0,
  241. "multipleOf": 1
  242. },
  243. "max_brightness": {
  244. "type": "number",
  245. "min": 0,
  246. "max": 255,
  247. "multipleOf": 1
  248. },
  249. "pin": {
  250. "type": "string",
  251. "pattern": "^[A-K]\\d{1,2}$"
  252. },
  253. "saturation_steps": {
  254. "type": "number",
  255. "min": 0,
  256. "multipleOf": 1
  257. },
  258. "sleep": {"type": "boolean"},
  259. "split": {"type": "boolean"},
  260. "split_count": {
  261. "type": "array",
  262. "minLength": 2,
  263. "maxLength": 2,
  264. "items": {
  265. "type": "number",
  266. "min": 0,
  267. "multipleOf": 1
  268. }
  269. }
  270. }
  271. },
  272. "usb": {
  273. "type": "object",
  274. "additionalProperties": false,
  275. "properties": {
  276. "device_ver": {
  277. "type": "string",
  278. "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
  279. },
  280. "pid": {
  281. "type": "string",
  282. "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
  283. },
  284. "vid": {
  285. "type": "string",
  286. "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
  287. }
  288. }
  289. }
  290. }
  291. }