keyboard.jsonschema 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  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": "null"
  171. }
  172. ]
  173. }
  174. }
  175. },
  176. "cols": {
  177. "type": "array",
  178. "items": {
  179. "type": "string",
  180. "pattern": "^[A-K]\\d{1,2}$"
  181. }
  182. },
  183. "rows": {
  184. "type": "array",
  185. "items": {
  186. "type": "string",
  187. "pattern": "^[A-K]\\d{1,2}$"
  188. }
  189. }
  190. }
  191. },
  192. "rgblight": {
  193. "type": "object",
  194. "additionalProperties": false,
  195. "properties": {
  196. "animations": {
  197. "type": "object",
  198. "additionalProperties": {
  199. "type": "boolean"
  200. }
  201. },
  202. "brightness_steps": {
  203. "type": "number",
  204. "min": 0,
  205. "multipleOf": 1
  206. },
  207. "hue_steps": {
  208. "type": "number",
  209. "min": 0,
  210. "multipleOf": 1
  211. },
  212. "led_count": {
  213. "type": "number",
  214. "min": 0,
  215. "multipleOf": 1
  216. },
  217. "max_brightness": {
  218. "type": "number",
  219. "min": 0,
  220. "max": 255,
  221. "multipleOf": 1
  222. },
  223. "pin": {
  224. "type": "string",
  225. "pattern": "^[A-K]\\d{1,2}$"
  226. },
  227. "saturation_steps": {
  228. "type": "number",
  229. "min": 0,
  230. "multipleOf": 1
  231. },
  232. "sleep": {"type": "boolean"},
  233. "split": {"type": "boolean"},
  234. "split_count": {
  235. "type": "array",
  236. "minLength": 2,
  237. "maxLength": 2,
  238. "items": {
  239. "type": "number",
  240. "min": 0,
  241. "multipleOf": 1
  242. }
  243. }
  244. }
  245. },
  246. "usb": {
  247. "type": "object",
  248. "additionalProperties": false,
  249. "properties": {
  250. "device_ver": {
  251. "type": "string",
  252. "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
  253. },
  254. "pid": {
  255. "type": "string",
  256. "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
  257. },
  258. "vid": {
  259. "type": "string",
  260. "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
  261. }
  262. }
  263. }
  264. }
  265. }