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.

336 lines
11 KiB

  1. {
  2. "definitions": {},
  3. "$schema": "http://json-schema.org/draft-07/schema#",
  4. "type": "object",
  5. "title": "The Keymap definition",
  6. "required": [
  7. "keys",
  8. "parameters",
  9. "layers",
  10. "chord_sets",
  11. "pseudolayers",
  12. "leader_sequences",
  13. "extra_code",
  14. "extra_dependencies"
  15. ],
  16. "properties": {
  17. "keys": {
  18. "type": "array",
  19. "title": "The Internal Keycodes",
  20. "description": "Name Keycodes for the Chording Engine. These can be any string except already valid QMK keycodes.",
  21. "items": {
  22. "type": "string",
  23. "title": "Individual Keycode",
  24. "examples": [
  25. "L1",
  26. "R1",
  27. "TOP1",
  28. "THUMB_3",
  29. "Bottom_6"
  30. ]
  31. }
  32. },
  33. "parameters": {
  34. "type": "object",
  35. "title": "Keyboard Parameters",
  36. "description": "Keyboard, user and layout specific parameters like timers, max length for buffers and default pseudolayer.",
  37. "required": [
  38. "layout_function_name",
  39. "chord_timeout",
  40. "dance_timeout",
  41. "leader_timeout",
  42. "tap_timeout",
  43. "command_max_length",
  44. "leader_max_length",
  45. "dynamic_macro_max_length",
  46. "string_max_length",
  47. "long_press_multiplier",
  48. "default_pseudolayer"
  49. ],
  50. "properties": {
  51. "layout_function_name": {
  52. "type": "string",
  53. "examples": [
  54. "LAYOUT_ginny",
  55. ""
  56. ]
  57. },
  58. "chord_timeout": {
  59. "type": "integer",
  60. "title": "The Chord Timeout",
  61. "description": "The time in ms you have to press additional keys before the engine assumes you finished pressing keys that are part of a chord.",
  62. "default": 100
  63. },
  64. "dance_timeout": {
  65. "type": "integer",
  66. "title": "The Dance Timeout",
  67. "description": "The time in ms you have to repeatedly activate a chord before the engine assumes you finished a dance.",
  68. "default": 200
  69. },
  70. "leader_timeout": {
  71. "type": "integer",
  72. "title": "The Leader Timeout",
  73. "description": "The time in ms you have to activate additional chords before the engine assumes you finished adding chords to a leader sequence.",
  74. "default": 750
  75. },
  76. "tap_timeout": {
  77. "type": "integer",
  78. "title": "The Tap Timeout",
  79. "description": "The time in ms you have to finish pressing a chord before the engine assumes that you didn't just tap it but are holding it down.",
  80. "default": 50
  81. },
  82. "command_max_length": {
  83. "type": "integer",
  84. "title": "Command Max Length",
  85. "description": "The maximum length for chords buffered in command mode.",
  86. "default": 5
  87. },
  88. "leader_max_length": {
  89. "type": "integer",
  90. "title": "Leader Max Length",
  91. "description": "The maximum length of leader sequences you can define in your keymap",
  92. "default": 5
  93. },
  94. "dynamic_macro_max_length": {
  95. "type": "integer",
  96. "title": "Dynamic Macro Max Length",
  97. "description": "The maximum number of chords (including Dynamic Macro Next) you can record to a Dynamic Macro",
  98. "default": 20
  99. },
  100. "string_max_length": {
  101. "type": "integer",
  102. "title": "String Max Length",
  103. "description": "The maximum length of a string that the STR() chord can accept.",
  104. "default": 16
  105. },
  106. "long_press_multiplier": {
  107. "type": "integer",
  108. "title": "Long Press Multiplier",
  109. "description": "How many times does the chord timer have expire before a chord is registered as not only held but in a long press (for example for Autoshift). Has to be integer.",
  110. "default": 3
  111. },
  112. "default_pseudolayer": {
  113. "type": "string",
  114. "title": "Default Pseudolayer",
  115. "description": "Which pseudolayer should be active when the keyboard starts / restarts.",
  116. "examples": [
  117. "BASE",
  118. "QWERTY"
  119. ]
  120. }
  121. }
  122. },
  123. "layers": {
  124. "type": "array",
  125. "title": "QMK Layers",
  126. "description": "The layers QMK needs to know about. Can contain chording engine's internal keycodes or QMK's keycodes. Do not define chords here, those belong in pseudolayers.",
  127. "minItems": 1,
  128. "uniqueItems": false,
  129. "items": {
  130. "type": "object",
  131. "title": "Individual Layers",
  132. "required": [
  133. "type"
  134. ],
  135. "properties": {
  136. "type": {
  137. "type": "string",
  138. "title": "Type of Individual Layers",
  139. "description": "Auto layer fills all keycodes to be chording engine's internal keycodes, manual let's you place internal and QMK's keycodes however you wish.",
  140. "examples": [
  141. "auto",
  142. "manual"
  143. ]
  144. },
  145. "keycodes": {
  146. "type": "array",
  147. "title": "Individual Chord",
  148. "description": "A list of of keys that need to be pressed to activate this chord",
  149. "items": {
  150. "type": "string",
  151. "title": "Individual Keycodes",
  152. "description": "A keycode that is a part of the individual chord. Has to be an internal keycode."
  153. }
  154. }
  155. }
  156. }
  157. },
  158. "chord_sets": {
  159. "type": "array",
  160. "title": "Chord Sets Definitions",
  161. "description": "Describes predefined sets of chords to ease defining a number of chords in a pseudolayer.",
  162. "items": {
  163. "type": "object",
  164. "required": [
  165. "name",
  166. "chords"
  167. ],
  168. "properties": {
  169. "name": {
  170. "type": "string",
  171. "title": "Name of the Set",
  172. "examples": [
  173. "rows",
  174. "asetniop"
  175. ]
  176. },
  177. "chords": {
  178. "type": "array",
  179. "title": "Chords",
  180. "description": "List of all chords in this set",
  181. "minItems": 1,
  182. "uniqueItems": true,
  183. "items": {
  184. "type": "array",
  185. "title": "Individual Chord",
  186. "description": "A list of of keys that need to be pressed to activate this chord",
  187. "items": {
  188. "type": "string",
  189. "title": "Individual Keycodes",
  190. "description": "A keycode that is a part of the individual chord. Has to be an internal keycode."
  191. }
  192. }
  193. }
  194. }
  195. }
  196. },
  197. "pseudolayers": {
  198. "type": "array",
  199. "title": "Pseudolayers",
  200. "description": "The pseudolayers holding the chords to be processed by the chording engine.",
  201. "minItems": 1,
  202. "uniqueItems": true,
  203. "items": {
  204. "type": "object",
  205. "required": [
  206. "name"
  207. ],
  208. "properties": {
  209. "name": {
  210. "type": "string",
  211. "title": "Name of the Pseudolayer",
  212. "default": null,
  213. "examples": [
  214. "ALWAYS_ON",
  215. "QWERTY"
  216. ]
  217. },
  218. "chords": {
  219. "type": "array",
  220. "title": "Chords",
  221. "description": "List of chords belonging on the pseudolayer.",
  222. "items": {
  223. "type": "object",
  224. "required": [
  225. "type"
  226. ],
  227. "properties": {
  228. "type": {
  229. "type": "string",
  230. "title": "Type of the chord array",
  231. "description": "Defines how this objects describes one or more chords.",
  232. "examples": [
  233. "visual_array",
  234. "visual",
  235. "simple",
  236. "chord_set"
  237. ]
  238. },
  239. "keys": {
  240. "type": "array",
  241. "title": "Subset of keys",
  242. "description": "Subset of internal keycodes that will be used when defining the chords. For visual_array type only.",
  243. "examples": [
  244. "[\"L1\", \"L2\", \"L3\", \"L4\", \"R1\", \"R2\", \"R3\", \"R4\"]"
  245. ],
  246. "items": {
  247. "type": "string"
  248. }
  249. },
  250. "dictionary": {
  251. "type": "array",
  252. "title": "Dictionary",
  253. "description": "A table. Each row defines in a visual way which keys have to be pressed and what is the desired outcome. For visual_array type only.",
  254. "items": {
  255. "type": "array",
  256. "items": {
  257. "type": "string",
  258. "examples": [
  259. "[\"X"\, \" "\, \" "\, \"X"\, \"X"\, \" "\, \" "\, \"X"\, \"MO(BASE, NUM)\"]
  260. ]
  261. }
  262. }
  263. },
  264. "keycode": {
  265. "type": "string",
  266. "title": "Keycode",
  267. "description": "A keycode to be assigned to the chord when it is registered. For simple and visual types only."
  268. },
  269. "set": {
  270. "type": "string",
  271. "title": "Chord set",
  272. "description": "Name of the chord set to be used. Has to be one already defined in the chord_sets array. For chord_set type only."
  273. },
  274. "keycodes": {
  275. "type": "array",
  276. "title": "Keycodes",
  277. "description": "List of keycodes to be assigned to each chord when it is registered. For set type only.",
  278. "items": {
  279. "type": "string"
  280. }
  281. },
  282. "chord": {
  283. "type": "array",
  284. "title": "Chord",
  285. "description": "Array of \"X\"'s and \" \"'s that shows which keys have to be pressed to activate the chord. For visual type only ",
  286. "items": {
  287. "type": "string"
  288. }
  289. }
  290. }
  291. }
  292. }
  293. }
  294. }
  295. },
  296. "leader_sequences": {
  297. "type": "array",
  298. "items": {
  299. "type": "object",
  300. "properties": {
  301. "name": {
  302. "type": "string",
  303. "examples": ["fn_L1"]
  304. },
  305. "function": {
  306. "type": "string",
  307. "description": "C code the sequence should run. Instead of here, can be defined in extra_dependencies or extra_code",
  308. "examples": ["void fn_L1(void) { SEND(KC_LCTL); SEND(KC_LALT); SEND(KC_DEL); }"]
  309. },
  310. "sequence": {
  311. "type": "array",
  312. "items": {
  313. "type": "string"
  314. },
  315. "examples": [["KC_Q", "KC_Z"]]
  316. }
  317. }
  318. }
  319. },
  320. "extra_code": {
  321. "type": "string",
  322. "label": "Extra Code",
  323. "description": "C code to be inserted into the generated keymap",
  324. "examples": ["void fn_L1(void) {\n SEND(KC_LCTL);\n SEND(KC_LALT);\n SEND(KC_DEL);\n}\n"],
  325. "default": ""
  326. },
  327. "extra_dependencies": {
  328. "type": "array",
  329. "label": "Extra Dependencies",
  330. "description": "List of files to be #include'd in the generated keymap",
  331. "examples": [
  332. "[\"user_functions.c\"]"
  333. ],
  334. "default": ""
  335. }
  336. }
  337. }