From 961de3c20524ded55aa3778b15bedfa3f192905a Mon Sep 17 00:00:00 2001 From: Markus Knutsson Date: Thu, 29 Sep 2022 17:01:34 +0200 Subject: Update reference_info_json.md (#18518) * Update reference_info_json.md * Update docs/reference_info_json.md Co-authored-by: Ryan * Update docs/reference_info_json.md Co-authored-by: Ryan * Update docs/reference_info_json.md Co-authored-by: Ryan * Update docs/reference_info_json.md Co-authored-by: Ryan * Update docs/reference_info_json.md Co-authored-by: Ryan Co-authored-by: Ryan --- docs/reference_info_json.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'docs/reference_info_json.md') diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 52f16b4401..34c536b329 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -91,6 +91,8 @@ Direct pins are when you connect one side of the switch to GND and the other sid 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. +Notice that when using direct pins, `diode_direction` is left undefined. + Example: ```json @@ -113,6 +115,14 @@ Example: This section controls basic 2-pin LEDs, which typically pass through keyswitches and are soldered into the PCB, or are placed in PCB sockets. ### Backlight +Enable by setting + +```json + "features": { + "backlight": true + } +``` + * `breathing` * Enable backlight breathing, if supported * `breathing_period` @@ -177,8 +187,9 @@ The following items can be set. Not every value is required. * Set to `true` to enable synchronization functionality between split halves * `split_count` * For split keyboards, the number of LEDs on each side + * Example `[ 10 , 10 ]` * `max_brightness` - * (0-255) What the maxmimum brightness (value) level is + * What the maximum brightness (value) level is (0-255) * `hue_steps` * How many steps of adjustment to have for hue * `saturation_steps` @@ -243,6 +254,14 @@ The device version is a BCD (binary coded decimal) value, in the format `MMmr`, This section controls the basic [rotary encoder](feature_encoders.md) support. +Enable by setting + +```json + "features": { + "encoder": true + } +``` + The following items can be set. Not every value is required. * `pin_a` -- cgit v1.2.3 From 00dc764f7268bd2780645eb07ce59892faba0341 Mon Sep 17 00:00:00 2001 From: Less/Rikki <86894501+lesshonor@users.noreply.github.com> Date: Thu, 29 Sep 2022 13:08:45 -0400 Subject: [docs] Improve documentation regarding info.json (#18508) * docs: raise info.json awareness * docs: note that DD migration is WIP --- docs/reference_info_json.md | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'docs/reference_info_json.md') 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 @@ # `info.json` -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. +The 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. -You can create `info.json` files at every level under `qmk_firmware/keyboards/` 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%. +You can create `info.json` files at every level under `qmk_firmware/keyboards/`. 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%. ## `info.json` Format -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. +The `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. * `keyboard_name` * 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 * `maintainer` * GitHub username of the maintainer, or `qmk` for community maintained boards. * Example: `skullydazed` +* `usb` + * Configure USB VID, PID, and device version. See the [USB](#USB) section for more detail. + +There are many more optional keys, some of which are described below. Others may be found by examining `data/schemas`. + * `debounce` * The amount of time in milliseconds to wait for debounce to happen. * Default: `5` @@ -33,8 +38,6 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai * Configure the pins corresponding to columns and rows, or direct pins. See the [Matrix Pins](#matrix-pins) section for more detail. * `rgblight` * Configure the [RGB Lighting feature](feature_rgblight.md). See the [RGB Lighting](#rgb-lighting) section for more detail. -* `usb` - * Configure USB VID, PID, and other parameters. See the [USB](#USB) section for more detail. ### Layout Format @@ -45,7 +48,7 @@ Within our `info.json` file the `layouts` portion of the dictionary contains sev ### Key Dictionary Format -Each Key Dictionary in a layout describes the physical properties of a key. If you are familiar with the Raw Code for 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. +Each Key Dictionary in a layout describes the physical properties of a key. If you are familiar with the Raw Data for 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. 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. @@ -115,7 +118,7 @@ Example: This section controls basic 2-pin LEDs, which typically pass through keyswitches and are soldered into the PCB, or are placed in PCB sockets. ### Backlight -Enable by setting +Enable by setting ```json "features": { @@ -155,6 +158,13 @@ Used for indicating Num Lock, Caps Lock, and Scroll Lock. May be soldered in-swi * The pin that controls the `Caps Lock` LED * `scroll_lock` * The pin that controls the `Scroll Lock` LED +* `compose` + * The pin that controls the `Compose` LED +* `kana` + * The pin that controls the `Kana` LED +* `on_state` + * The state of the indicator pins when the LED is "on" - `1` for high, `0` for low + * Default: `1` Example: @@ -208,7 +218,8 @@ Example: "saturation_steps": 17, "brightness_steps": 17, "animations": { - "all": true + "knight": true, + "rainbow_swirl": true } } } @@ -254,7 +265,7 @@ The device version is a BCD (binary coded decimal) value, in the format `MMmr`, This section controls the basic [rotary encoder](feature_encoders.md) support. -Enable by setting +Enable by setting ```json "features": { -- cgit v1.2.3 From af6aa225ebfc64caf571601b3e3390614daad54f Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 23 Nov 2022 18:48:22 +0000 Subject: Additional DD backlight config (#19124) * Additional dd backlight config * Update docs --- docs/reference_info_json.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/reference_info_json.md') diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 05d4ef1113..c872bcb696 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -132,8 +132,15 @@ Enable by setting * The length of one backlight “breath” in seconds * `levels` * The number of brightness levels (maximum 31, excluding off) +* `max_brightness` + * The maximum duty cycle of the backlight LED(s) (0-255) * `pin` * The pin that controls the backlight LED(s) +* `pins` + * Array of pins that controls the backlight LED(s) (See [Multiple Backlight Pins](feature_backlight.md#multiple-backlight-pins)) +* `on_state` + * The state of the indicator pins when the LED is "on" - `1` for high, `0` for low + * Default: `1` Example: -- cgit v1.2.3 From 5a3770d363a657b73c644bc70d4586c0d142f372 Mon Sep 17 00:00:00 2001 From: Ndot Date: Mon, 28 Nov 2022 02:08:27 +0000 Subject: [Docs] Update reference_info_json.md (#18817) * [Docs] Update reference_info_json.md - Makes it easier to find keyboard.jsonschema. - Adds a reference to the Data Driven page. * Update docs/reference_info_json.md Co-authored-by: Ryan Co-authored-by: Joel Challis Co-authored-by: Ryan --- docs/reference_info_json.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/reference_info_json.md') diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index c872bcb696..a96d9d4b6f 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -1,6 +1,6 @@ # `info.json` -The 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. +The 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. Its key/value pairs are ruled by the [`data/schemas/keyboard.jsonschema`](https://github.com/qmk/qmk_firmware/blob/master/data/schemas/keyboard.jsonschema) file. To learn more about the why and how of the schema file see the [Data Driven Configuration](https://docs.qmk.fm/#/data_driven_config) page. You can create `info.json` files at every level under `qmk_firmware/keyboards/`. 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%. @@ -22,9 +22,6 @@ The `info.json` file is a JSON formatted dictionary. The first six keys noted he * Example: `skullydazed` * `usb` * Configure USB VID, PID, and device version. See the [USB](#USB) section for more detail. - -There are many more optional keys, some of which are described below. Others may be found by examining `data/schemas`. - * `debounce` * The amount of time in milliseconds to wait for debounce to happen. * Default: `5` @@ -39,6 +36,9 @@ There are many more optional keys, some of which are described below. Others may * `rgblight` * Configure the [RGB Lighting feature](feature_rgblight.md). See the [RGB Lighting](#rgb-lighting) section for more detail. + +?> For all the available keys and their allowed values refer back to the [`data/schemas/keyboard.jsonschema`](https://github.com/qmk/qmk_firmware/blob/master/data/schemas/keyboard.jsonschema) file. + ### Layout Format 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`. -- cgit v1.2.3 From 4a0aa9ada2837762e3b4eab73950962365341cce Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 30 Nov 2022 02:45:51 +0000 Subject: Fix headers in info.json reference (#19202) --- docs/reference_info_json.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/reference_info_json.md') diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index a96d9d4b6f..d5469c835a 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -39,7 +39,7 @@ The `info.json` file is a JSON formatted dictionary. The first six keys noted he ?> For all the available keys and their allowed values refer back to the [`data/schemas/keyboard.jsonschema`](https://github.com/qmk/qmk_firmware/blob/master/data/schemas/keyboard.jsonschema) file. -### Layout Format +## Layout Format 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`. @@ -68,11 +68,11 @@ All key positions and rotations are specified in relation to the top-left corner * A two item list describing the row and column location for this key. * Example: `[0, 4]` -### Matrix Pins +## Matrix Pins 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. -#### Switch Matrix +### Switch Matrix 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`. @@ -88,7 +88,7 @@ Example: } ``` -#### Direct Pins +### Direct Pins 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. @@ -250,7 +250,7 @@ The following animations can be enabled: |`static_gradient`|Enable static gradient mode. | |`twinkle` |Enable twinkle animation mode. | -### USB +## USB 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. @@ -268,7 +268,7 @@ Example: 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. -### Encoders +## Encoders This section controls the basic [rotary encoder](feature_encoders.md) support. @@ -312,7 +312,7 @@ Examples: } ``` -### Secure +## Secure The following options can be configured: -- cgit v1.2.3