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.

187 lines
7.4 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 is a text string corresponding to a pin. 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. ### RGB Lighting
  88. 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.
  89. The following items can be set. Not every value is required.
  90. * `led_count`
  91. * The number of LEDs in your strip
  92. * `pin`
  93. * The GPIO pin that your LED strip is connected to
  94. * `animations`
  95. * A dictionary that lists enabled and disabled animations. See [RGB Light Animations](#rgb_light_animations) below.
  96. * `sleep`
  97. * Set to `true` to enable lighting during host sleep
  98. * `split`
  99. * Set to `true` to enable synchronization functionality between split halves
  100. * `split_count`
  101. * For split keyboards, the number of LEDs on each side
  102. * `max_brightness`
  103. * (0-255) What the maxmimum brightness (value) level is
  104. * `hue_steps`
  105. * How many steps of adjustment to have for hue
  106. * `saturation_steps`
  107. * How many steps of adjustment to have for saturation
  108. * `brightness_steps`
  109. * How many steps of adjustment to have for brightness (value)
  110. Example:
  111. ```json
  112. {
  113. "rgblight": {
  114. "led_count": 4,
  115. "pin": "F6",
  116. "hue_steps": 10,
  117. "saturation_steps": 17,
  118. "brightness_steps": 17,
  119. "animations": {
  120. "all": true
  121. }
  122. }
  123. }
  124. ```
  125. #### RGBLight Animations
  126. The following animations can be enabled:
  127. |Key |Description |
  128. |-----------------|--------------------------------------|
  129. |`all` |Enable all additional animation modes.|
  130. |`alternating` |Enable alternating animation mode. |
  131. |`breathing` |Enable breathing animation mode. |
  132. |`christmas` |Enable christmas animation mode. |
  133. |`knight` |Enable knight animation mode. |
  134. |`rainbow_mood` |Enable rainbow mood animation mode. |
  135. |`rainbow_swirl` |Enable rainbow swirl animation mode. |
  136. |`rgb_test` |Enable RGB test animation mode. |
  137. |`snake` |Enable snake animation mode. |
  138. |`static_gradient`|Enable static gradient mode. |
  139. |`twinkle` |Enable twinkle animation mode. |
  140. ### USB
  141. Every USB keyboard needs to have its USB parmaters defined. At a minimum you need to set vid, pid, and device version.
  142. Example:
  143. ```json
  144. {
  145. "usb": {
  146. "vid": "0xC1ED",
  147. "pid": "0x23B0",
  148. "device_ver": "0x0001"
  149. }
  150. }
  151. ```