summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2022-09-30 05:19:53 +1000
committerfauxpark <fauxpark@gmail.com>2022-09-30 05:19:53 +1000
commitdbb70871fcb98b98dd5544b53f4083dfc2aeefff (patch)
tree75839f796a26c2f2908b584e3ca0a35457f83fe2 /docs
parentdbe214c3268d9a316a137471a7679f7e45046e49 (diff)
parent45b5ed5c6e1ecdf95e9ce0523a8ff49d45b8822f (diff)
Merge remote-tracking branch 'upstream/master' into develop
Diffstat (limited to 'docs')
-rw-r--r--docs/config_options.md12
-rw-r--r--docs/reference_info_json.md29
2 files changed, 31 insertions, 10 deletions
diff --git a/docs/config_options.md b/docs/config_options.md
index 05e27a835c..5d5cae2184 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -2,7 +2,17 @@
2 2
3QMK is nearly infinitely configurable. Wherever possible we err on the side of allowing users to customize their keyboard, even at the expense of code size. That level of flexibility makes for a daunting configuration experience, however. 3QMK is nearly infinitely configurable. Wherever possible we err on the side of allowing users to customize their keyboard, even at the expense of code size. That level of flexibility makes for a daunting configuration experience, however.
4 4
5There are two main types of configuration files in QMK- `config.h` and `rules.mk`. These files exist at various levels in QMK and all files of the same type are combined to build the final configuration. The levels, from lowest priority to highest priority, are: 5There are three main types of configuration files in QMK:
6
7* `config.h`, which contains various preprocessor directives (`#define`, `#ifdef`)
8* `rules.mk`, which contains additional variables
9* `info.json`, which is utilized for [data-driven configuration](https://docs.qmk.fm/#/data_driven_config)
10
11This page will only discuss the first two types, `config.h` and `rules.mk`.
12
13?> While not all settings have data-driven equivalents yet, keyboard makers are encouraged to utilize the `info.json` file to set the metadata for their boards when possible. See the [`info.json` Format](https://docs.qmk.fm/#/reference_info_json) page for more details.
14
15These files exist at various levels in QMK and all files of the same type are combined to build the final configuration. The levels, from lowest priority to highest priority, are:
6 16
7* QMK Default 17* QMK Default
8* Keyboard 18* Keyboard
diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md
index 34c536b329..05d4ef1113 100644
--- a/docs/reference_info_json.md
+++ b/docs/reference_info_json.md
@@ -1,12 +1,12 @@
1# `info.json` 1# `info.json`
2 2
3This 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. 3The information contained in `info.json` is combined with the `config.h` and `rules.mk` files, dynamically generating the necessary configuration for your keyboard at compile time. It is also used by the [QMK API](https://github.com/qmk/qmk_api), and contains the information [QMK Configurator](https://config.qmk.fm/) needs to display a representation of your keyboard.
4 4
5You 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%. 5You can create `info.json` files at every level under `qmk_firmware/keyboards/<name>`. 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%.
6 6
7## `info.json` Format 7## `info.json` Format
8 8
9The `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. 9The `info.json` file is a JSON formatted dictionary. The first six keys noted here must be defined in `info.json`, or your keyboard will not be accepted into the QMK repository.
10 10
11* `keyboard_name` 11* `keyboard_name`
12 * A free-form text string describing the keyboard. 12 * A free-form text string describing the keyboard.
@@ -20,6 +20,11 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai
20* `maintainer` 20* `maintainer`
21 * GitHub username of the maintainer, or `qmk` for community maintained boards. 21 * GitHub username of the maintainer, or `qmk` for community maintained boards.
22 * Example: `skullydazed` 22 * Example: `skullydazed`
23* `usb`
24 * Configure USB VID, PID, and device version. See the [USB](#USB) section for more detail.
25
26There are many more optional keys, some of which are described below. Others may be found by examining `data/schemas`.
27
23* `debounce` 28* `debounce`
24 * The amount of time in milliseconds to wait for debounce to happen. 29 * The amount of time in milliseconds to wait for debounce to happen.
25 * Default: `5` 30 * Default: `5`
@@ -33,8 +38,6 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai
33 * Configure the pins corresponding to columns and rows, or direct pins. See the [Matrix Pins](#matrix-pins) section for more detail. 38 * Configure the pins corresponding to columns and rows, or direct pins. See the [Matrix Pins](#matrix-pins) section for more detail.
34* `rgblight` 39* `rgblight`
35 * Configure the [RGB Lighting feature](feature_rgblight.md). See the [RGB Lighting](#rgb-lighting) section for more detail. 40 * Configure the [RGB Lighting feature](feature_rgblight.md). See the [RGB Lighting](#rgb-lighting) section for more detail.
36* `usb`
37 * Configure USB VID, PID, and other parameters. See the [USB](#USB) section for more detail.
38 41
39### Layout Format 42### Layout Format
40 43
@@ -45,7 +48,7 @@ Within our `info.json` file the `layouts` portion of the dictionary contains sev
45 48
46### Key Dictionary Format 49### Key Dictionary Format
47 50
48Each 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. 51Each Key Dictionary in a layout describes the physical properties of a key. If you are familiar with the Raw Data 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.
49 52
50All key positions and rotations are specified in relation to the top-left corner of the keyboard, and the top-left corner of each key. 53All key positions and rotations are specified in relation to the top-left corner of the keyboard, and the top-left corner of each key.
51 54
@@ -115,7 +118,7 @@ Example:
115This section controls basic 2-pin LEDs, which typically pass through keyswitches and are soldered into the PCB, or are placed in PCB sockets. 118This section controls basic 2-pin LEDs, which typically pass through keyswitches and are soldered into the PCB, or are placed in PCB sockets.
116### Backlight 119### Backlight
117 120
118Enable by setting 121Enable by setting
119 122
120```json 123```json
121 "features": { 124 "features": {
@@ -155,6 +158,13 @@ Used for indicating Num Lock, Caps Lock, and Scroll Lock. May be soldered in-swi
155 * The pin that controls the `Caps Lock` LED 158 * The pin that controls the `Caps Lock` LED
156* `scroll_lock` 159* `scroll_lock`
157 * The pin that controls the `Scroll Lock` LED 160 * The pin that controls the `Scroll Lock` LED
161* `compose`
162 * The pin that controls the `Compose` LED
163* `kana`
164 * The pin that controls the `Kana` LED
165* `on_state`
166 * The state of the indicator pins when the LED is "on" - `1` for high, `0` for low
167 * Default: `1`
158 168
159Example: 169Example:
160 170
@@ -208,7 +218,8 @@ Example:
208 "saturation_steps": 17, 218 "saturation_steps": 17,
209 "brightness_steps": 17, 219 "brightness_steps": 17,
210 "animations": { 220 "animations": {
211 "all": true 221 "knight": true,
222 "rainbow_swirl": true
212 } 223 }
213 } 224 }
214} 225}
@@ -254,7 +265,7 @@ The device version is a BCD (binary coded decimal) value, in the format `MMmr`,
254 265
255This section controls the basic [rotary encoder](feature_encoders.md) support. 266This section controls the basic [rotary encoder](feature_encoders.md) support.
256 267
257Enable by setting 268Enable by setting
258 269
259```json 270```json
260 "features": { 271 "features": {