You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

338 lines
12 KiB

  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": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
  29. },
  30. "board": {
  31. "type": "string",
  32. "minLength": 2,
  33. "pattern": "^[a-zA-Z_][0-9a-zA-Z_]*$"
  34. },
  35. "bootloader": {
  36. "type": "string",
  37. "enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp", "tinyuf2"]
  38. },
  39. "diode_direction": {
  40. "type": "string",
  41. "enum": ["COL2ROW", "ROW2COL"]
  42. },
  43. "debounce": {
  44. "type": "number",
  45. "min": 0,
  46. "multipleOf": 1
  47. },
  48. "height": {
  49. "type": "number",
  50. "min": 0.25
  51. },
  52. "width": {
  53. "type": "number",
  54. "min": 0.25
  55. },
  56. "community_layouts": {
  57. "type": "array",
  58. "items": {
  59. "type": "string",
  60. "minLength": 2,
  61. "pattern": "^[0-9a-z_]*$"
  62. }
  63. },
  64. "features": {
  65. "type": "object",
  66. "additionalProperties": {"type": "boolean"}
  67. },
  68. "indicators": {
  69. "type": "object",
  70. "properties": {
  71. "caps_lock": {
  72. "type": "string",
  73. "pattern": "^[A-K]\\d{1,2}$"
  74. },
  75. "num_lock": {
  76. "type": "string",
  77. "pattern": "^[A-K]\\d{1,2}$"
  78. },
  79. "scroll_lock": {
  80. "type": "string",
  81. "pattern": "^[A-K]\\d{1,2}$"
  82. }
  83. }
  84. },
  85. "layout_aliases": {
  86. "type": "object",
  87. "additionalProperties": {
  88. "oneOf": [
  89. {
  90. "type": "string",
  91. "enum": ["LAYOUT", "LAYOUT_planck_1x2uC"]
  92. },
  93. {
  94. "type": "string",
  95. "pattern": "^LAYOUT_[0-9a-z_]*$"
  96. }
  97. ]
  98. }
  99. },
  100. "layouts": {
  101. "type": "object",
  102. "additionalProperties": {
  103. "type": "object",
  104. "additionalProperties": false,
  105. "properties": {
  106. "filename": {
  107. "type": "string"
  108. },
  109. "c_macro": {
  110. "type": "boolean"
  111. },
  112. "key_count": {
  113. "type": "number",
  114. "min": 0,
  115. "multipleOf": 1
  116. },
  117. "layout": {
  118. "type": "array",
  119. "items": {
  120. "type": "object",
  121. "additionalProperties": false,
  122. "properties": {
  123. "label": {"type": "string"},
  124. "matrix": {
  125. "type": "array",
  126. "minItems": 2,
  127. "maxItems": 2,
  128. "items": {
  129. "type": "number",
  130. "min": 0,
  131. "multipleOf": 1
  132. }
  133. },
  134. "h": {
  135. "type": "number",
  136. "min": 0.25
  137. },
  138. "r": {
  139. "type": "number",
  140. "min": 0
  141. },
  142. "rx": {
  143. "type": "number",
  144. "min": 0
  145. },
  146. "ry": {
  147. "type": "number",
  148. "min": 0
  149. },
  150. "w": {
  151. "type": "number",
  152. "min": 0.25
  153. },
  154. "x": {
  155. "type": "number",
  156. "min": 0
  157. },
  158. "y": {
  159. "type": "number",
  160. "min": 0
  161. }
  162. }
  163. }
  164. }
  165. }
  166. }
  167. },
  168. "matrix_pins": {
  169. "type": "object",
  170. "additionalProperties": false,
  171. "properties": {
  172. "direct": {
  173. "type": "array",
  174. "items": {
  175. "type": "array",
  176. "items": {
  177. "oneOf": [
  178. {
  179. "type": "string",
  180. "pattern": "^[A-K]\\d{1,2}$"
  181. },
  182. {
  183. "type": "string",
  184. "pattern": "^LINE_PIN\\d{1,2}$"
  185. },
  186. {
  187. "type": "number",
  188. "multipleOf": 1
  189. },
  190. {
  191. "type": "null"
  192. }
  193. ]
  194. }
  195. }
  196. },
  197. "cols": {
  198. "type": "array",
  199. "items": {
  200. "oneOf": [
  201. {
  202. "type": "string",
  203. "pattern": "^[A-K]\\d{1,2}$"
  204. },
  205. {
  206. "type": "string",
  207. "pattern": "^LINE_PIN\\d{1,2}$"
  208. },
  209. {
  210. "type": "number",
  211. "multipleOf": 1
  212. },
  213. {
  214. "type": "null"
  215. }
  216. ]
  217. }
  218. },
  219. "rows": {
  220. "type": "array",
  221. "items": {
  222. "oneOf": [
  223. {
  224. "type": "string",
  225. "pattern": "^[A-K]\\d{1,2}$"
  226. },
  227. {
  228. "type": "string",
  229. "pattern": "^LINE_PIN\\d{1,2}$"
  230. },
  231. {
  232. "type": "number",
  233. "multipleOf": 1
  234. },
  235. {
  236. "type": "null"
  237. }
  238. ]
  239. }
  240. }
  241. }
  242. },
  243. "rgblight": {
  244. "type": "object",
  245. "additionalProperties": false,
  246. "properties": {
  247. "animations": {
  248. "type": "object",
  249. "additionalProperties": {
  250. "type": "boolean"
  251. }
  252. },
  253. "brightness_steps": {
  254. "type": "number",
  255. "min": 0,
  256. "multipleOf": 1
  257. },
  258. "hue_steps": {
  259. "type": "number",
  260. "min": 0,
  261. "multipleOf": 1
  262. },
  263. "led_count": {
  264. "type": "number",
  265. "min": 0,
  266. "multipleOf": 1
  267. },
  268. "max_brightness": {
  269. "type": "number",
  270. "min": 0,
  271. "max": 255,
  272. "multipleOf": 1
  273. },
  274. "pin": {
  275. "type": "string",
  276. "pattern": "^([A-K]\\d{1,2}|LINE_PIN\\d{1,2})$"
  277. },
  278. "saturation_steps": {
  279. "type": "number",
  280. "min": 0,
  281. "multipleOf": 1
  282. },
  283. "sleep": {"type": "boolean"},
  284. "split": {"type": "boolean"},
  285. "split_count": {
  286. "type": "array",
  287. "minLength": 2,
  288. "maxLength": 2,
  289. "items": {
  290. "type": "number",
  291. "min": 0,
  292. "multipleOf": 1
  293. }
  294. }
  295. }
  296. },
  297. "usb": {
  298. "type": "object",
  299. "additionalProperties": false,
  300. "properties": {
  301. "device_ver": {
  302. "type": "string",
  303. "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
  304. },
  305. "pid": {
  306. "type": "string",
  307. "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
  308. },
  309. "vid": {
  310. "type": "string",
  311. "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
  312. }
  313. }
  314. },
  315. "qmk_lufa_bootloader": {
  316. "type": "object",
  317. "additionalProperties": false,
  318. "properties": {
  319. "esc_output": {
  320. "type": "string",
  321. "pattern": "^[A-K]\\d{1,2}$"
  322. },
  323. "esc_input": {
  324. "type": "string",
  325. "pattern": "^[A-K]\\d{1,2}$"
  326. },
  327. "led": {
  328. "type": "string",
  329. "pattern": "^[A-K]\\d{1,2}$"
  330. },
  331. "speaker": {
  332. "type": "string",
  333. "pattern": "^[A-K]\\d{1,2}$"
  334. }
  335. }
  336. }
  337. }
  338. }