Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change From info.json to keyboard.json #24498

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/_sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
{ "text": "Community Layouts", "link": "/feature_layouts" },
{ "text": "Unit Testing", "link": "/unit_testing" },
{ "text": "Useful Functions", "link": "/ref_functions" },
{ "text": "info.json Format", "link": "/reference_info_json" }
{ "text": "keyboard.json Format", "link": "/reference_info_json" }
]
},

Expand Down
4 changes: 2 additions & 2 deletions docs/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ There are three main types of configuration files in QMK:

* `config.h`, which contains various preprocessor directives (`#define`, `#ifdef`)
* `rules.mk`, which contains additional variables
* `info.json`, which is utilized for [data-driven configuration](data_driven_config)
* `keyboard.json`, which is utilized for [data-driven configuration](data_driven_config)

This page will only discuss the first two types, `config.h` and `rules.mk`.

::: tip
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](reference_info_json) page for more details.
While not all settings have data-driven equivalents yet, keyboard makers are encouraged to utilize the `keyboard.json` file to set the metadata for their boards when possible. See the [`keyboard.json` Format](reference_info_json) page for more details.
:::

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:
Expand Down
8 changes: 4 additions & 4 deletions docs/reference_info_json.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# `info.json` Reference {#info-json-reference}
# `keyboard.json` Reference {#keyboard-json-reference}

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](data_driven_config) page.
The information contained in `keyboard.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](data_driven_config) page.

You can create `info.json` files at every level under `qmk_firmware/keyboards/<keyboard_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 information common to all Clueboard products, such as `manufacturer` and `maintainer`, while `qmk_firmware/keyboards/clueboard/66/info.json` contains more specific information about Clueboard 66%.
You can create `keyboard.json` files at every level under `qmk_firmware/keyboards/<keyboard_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/keyboard.json` specifies information common to all Clueboard products, such as `manufacturer` and `maintainer`, while `qmk_firmware/keyboards/clueboard/66/keyboard.json` contains more specific information about Clueboard 66%.

## General Metadata {#general-metadata}

Expand Down Expand Up @@ -299,7 +299,7 @@ Each key dictionary in a layout describes the physical properties of a key. If y

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.

The ISO enter key is represented by a 1.25u×2uh key. Renderers which utilize info.json layout data (such as `qmk info -l` and the QMK Configurator) should display this key as expected.
The ISO enter key is represented by a 1.25u×2uh key. Renderers which utilize keyboard.json layout data (such as `qmk info -l` and the QMK Configurator) should display this key as expected.

* `community_layouts` <Badge type="info">Array: String</Badge>
* A list of community layouts supported by the keyboard.
Expand Down