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.

298 lines
10 KiB

  1. # `info.json`
  2. This file is used by the [QMK API](https://github.com/qmk/qmk_api). It contains the information [QMK Configurator](https://config.qmk.fm/) needs to display a representation of your keyboard. You can also set metadata here.
  3. You can create `info.json` files at every level under `qmk_firmware/keyboards/<name>` to specify this metadata. These files are combined, with more specific files overriding keys in less specific files. This means you do not need to duplicate your metadata information. For example, `qmk_firmware/keyboards/clueboard/info.json` specifies `manufacturer` and `maintainer`, while `qmk_firmware/keyboards/clueboard/66/info.json` specifies more specific information about Clueboard 66%.
  4. ## `info.json` Format
  5. The `info.json` file is a JSON formatted dictionary with the following keys available to be set. You do not have to set all of them, merely the keys that apply to your keyboard.
  6. * `keyboard_name`
  7. * A free-form text string describing the keyboard.
  8. * Example: `Clueboard 66%`
  9. * `manufacturer`
  10. * A free-form text string describing the keyboard's manufacturer.
  11. * Example: `Clueboard`
  12. * `url`
  13. * A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard.
  14. * Example: `https://clueboard.co`
  15. * `maintainer`
  16. * GitHub username of the maintainer, or `qmk` for community maintained boards.
  17. * Example: `skullydazed`
  18. * `debounce`
  19. * The amount of time in milliseconds to wait for debounce to happen.
  20. * Default: `5`
  21. * `diode_direction`
  22. * The direction diodes face. See [`DIRECT_PINS` in the hardware configuration](https://docs.qmk.fm/#/config_options?id=hardware-options) for more details.
  23. * `layout_aliases`
  24. * A dictionary containing layout aliases. The key is the alias and the value is a layout in `layouts` it maps to.
  25. * `layouts`
  26. * Physical Layout representations. See the [Layout Format](#layout-format) section for more detail.
  27. * `matrix_pins`
  28. * Configure the pins corresponding to columns and rows, or direct pins. See the [Matrix Pins](#matrix-pins) section for more detail.
  29. * `rgblight`
  30. * Configure the [RGB Lighting feature](feature_rgblight.md). See the [RGB Lighting](#rgb-lighting) section for more detail.
  31. * `usb`
  32. * Configure USB VID, PID, and other parameters. See the [USB](#USB) section for more detail.
  33. ### Layout Format
  34. Within our `info.json` file the `layouts` portion of the dictionary contains several nested dictionaries. The outer layer consists of QMK layout macros, for example `LAYOUT_ansi` or `LAYOUT_iso`.
  35. * `layout`
  36. * A list of Key Dictionaries describing the physical layout. See the next section for more details.
  37. ### Key Dictionary Format
  38. Each Key Dictionary in a layout describes the physical properties of a key. If you are familiar with the Raw Code for <https://keyboard-layout-editor.com> you will find many of the concepts the same. We re-use the same key names and layout choices wherever possible, but unlike keyboard-layout-editor each key is stateless, inheriting no properties from the keys that came before it.
  39. All key positions and rotations are specified in relation to the top-left corner of the keyboard, and the top-left corner of each key.
  40. * `x`
  41. * **Required**. The absolute position of the key in the horizontal axis, in Key Units.
  42. * `y`
  43. * **Required**. The absolute position of the key in the vertical axis, in Key Units.
  44. * `w`
  45. * The width of the key, in Key Units.
  46. * Default: `1`
  47. * `h`
  48. * The height of the key, in Key Units.
  49. * Default: `1`
  50. * `label`
  51. * What to name this position in the matrix. This should usually correspond to the keycode for the first layer of the default keymap.
  52. * `matrix`
  53. * A two item list describing the row and column location for this key.
  54. * Example: `[0, 4]`
  55. ### Matrix Pins
  56. Currently QMK supports connecting switches either directly to GPIO pins or via a switch matrix. At this time you can not combine these, they are mutually exclusive.
  57. #### Switch Matrix
  58. Most keyboards use a switch matrix to connect keyswitches to the MCU. You can define your pin columns and rows to configure your switch matrix. When defining switch matrices you should also define your `diode_direction`.
  59. Example:
  60. ```json
  61. {
  62. "diode_direction": "COL2ROW",
  63. "matrix_pins": {
  64. "cols": ["F4", "E6", "B1", "D2"],
  65. "rows": ["B0", "D3", "D5", "D4", "D6"]
  66. }
  67. }
  68. ```
  69. #### Direct Pins
  70. Direct pins are when you connect one side of the switch to GND and the other side to a GPIO pin on your MCU. No diode is required, but there is a 1:1 mapping between switches and pins.
  71. When specifying direct pins you need to arrange them in nested arrays. The outer array consists of rows, while the inner array uses text strings to identify the pins used in each row. You can use `null` to indicate an empty spot in the matrix.
  72. Example:
  73. ```json
  74. {
  75. "matrix_pins": {
  76. "direct": [
  77. ["A10", "A9"],
  78. ["A0", "B8"],
  79. [null, "B11"],
  80. ["B9", "A8"],
  81. ["A7", "B1"],
  82. [null, "B2"]
  83. ]
  84. }
  85. }
  86. ```
  87. ## Non-RGB LED Lighting
  88. This section controls basic 2-pin LEDs, which typically pass through keyswitches and are soldered into the PCB, or are placed in PCB sockets.
  89. ### Backlight
  90. * `breathing`
  91. * Enable backlight breathing, if supported
  92. * `breathing_period`
  93. * The length of one backlight โ€œbreathโ€ in seconds
  94. * `levels`
  95. * The number of brightness levels (maximum 31, excluding off)
  96. * `pin`
  97. * The pin that controls the backlight LED(s)
  98. Example:
  99. ```json
  100. {
  101. "backlight": {
  102. "breathing": true,
  103. "breathing_period": 5,
  104. "levels": 15,
  105. "pin": "B7"
  106. }
  107. }
  108. ```
  109. ### LED Indicators
  110. Used for indicating Num Lock, Caps Lock, and Scroll Lock. May be soldered in-switch or in a dedicated area.
  111. * `num_lock`
  112. * The pin that controls the `Num Lock` LED
  113. * `caps_lock`
  114. * The pin that controls the `Caps Lock` LED
  115. * `scroll_lock`
  116. * The pin that controls the `Scroll Lock` LED
  117. Example:
  118. ```json
  119. {
  120. "indicators": {
  121. "num_lock": "B6",
  122. "caps_lock": "D2",
  123. "scroll_lock": "A3"
  124. }
  125. }
  126. ```
  127. ## RGB Lighting
  128. This section controls the legacy WS2812 support in QMK. This should not be confused with the RGB Matrix feature, which can be used to control both WS2812 and ISSI RGB LEDs.
  129. The following items can be set. Not every value is required.
  130. * `led_count`
  131. * The number of LEDs in your strip
  132. * `pin`
  133. * The GPIO pin that your LED strip is connected to
  134. * `animations`
  135. * A dictionary that lists enabled and disabled animations. See [RGB Light Animations](#rgb_light_animations) below.
  136. * `sleep`
  137. * Set to `true` to enable lighting during host sleep
  138. * `split`
  139. * Set to `true` to enable synchronization functionality between split halves
  140. * `split_count`
  141. * For split keyboards, the number of LEDs on each side
  142. * `max_brightness`
  143. * (0-255) What the maxmimum brightness (value) level is
  144. * `hue_steps`
  145. * How many steps of adjustment to have for hue
  146. * `saturation_steps`
  147. * How many steps of adjustment to have for saturation
  148. * `brightness_steps`
  149. * How many steps of adjustment to have for brightness (value)
  150. Example:
  151. ```json
  152. {
  153. "rgblight": {
  154. "led_count": 4,
  155. "pin": "F6",
  156. "hue_steps": 10,
  157. "saturation_steps": 17,
  158. "brightness_steps": 17,
  159. "animations": {
  160. "all": true
  161. }
  162. }
  163. }
  164. ```
  165. ### RGBLight Animations
  166. The following animations can be enabled:
  167. |Key |Description |
  168. |-----------------|--------------------------------------|
  169. |`all` |Enable all additional animation modes.|
  170. |`alternating` |Enable alternating animation mode. |
  171. |`breathing` |Enable breathing animation mode. |
  172. |`christmas` |Enable christmas animation mode. |
  173. |`knight` |Enable knight animation mode. |
  174. |`rainbow_mood` |Enable rainbow mood animation mode. |
  175. |`rainbow_swirl` |Enable rainbow swirl animation mode. |
  176. |`rgb_test` |Enable RGB test animation mode. |
  177. |`snake` |Enable snake animation mode. |
  178. |`static_gradient`|Enable static gradient mode. |
  179. |`twinkle` |Enable twinkle animation mode. |
  180. ### USB
  181. Every USB keyboard needs to have its USB parameters defined. At a minimum you need to set the Vendor ID, Product ID, and device version.
  182. Example:
  183. ```json
  184. {
  185. "usb": {
  186. "vid": "0xC1ED",
  187. "pid": "0x23B0",
  188. "device_version": "1.0.0"
  189. }
  190. }
  191. ```
  192. The device version is a BCD (binary coded decimal) value, in the format `MMmr`, so the below value would look like `0x0100` in the generated code. This also means the maximum valid values for each part are `99.9.9`, despite it being a hexadecimal value under the hood.
  193. ### Encoders
  194. This section controls the basic [rotary encoder](feature_encoders.md) support.
  195. The following items can be set. Not every value is required.
  196. * `pin_a`
  197. * __Required__. A pad definition
  198. * `pin_b`
  199. * __Required__. B pad definition
  200. * `resolution`
  201. * How many pulses the encoder registers between each detent
  202. Examples:
  203. ```json
  204. {
  205. "encoder": {
  206. "rotary": [
  207. { "pin_a": "B5", "pin_b": "A2" }
  208. ]
  209. }
  210. }
  211. ```
  212. ```json
  213. {
  214. "encoder": {
  215. "rotary": [
  216. { "pin_a": "B5", "pin_b": "A2", "resolution": 4 }
  217. { "pin_a": "B6", "pin_b": "A3", "resolution": 2 }
  218. ]
  219. }
  220. }
  221. ```
  222. ### Secure
  223. The following options can be configured:
  224. |Key |Description |
  225. |------------------|---------------------------------------------------------------------------------|
  226. |`unlock_sequence` | Timeout for the user to perform the configured unlock sequence - `0` to disable |
  227. |`unlock_timeout` | Timeout while unlocked before returning to locked - `0` to disable |
  228. |`idle_timeout` | Array of matrix locations describing a sequential sequence of keypresses |
  229. Example:
  230. ```json
  231. {
  232. "secure": {
  233. "unlock_sequence": [ [0,0], [0,1] ],
  234. "unlock_timeout": 5000,
  235. "idle_timeout": 60000
  236. }
  237. }
  238. ```