mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-22 15:42:04 +00:00
info to keyboard documentation
This commit is contained in:
parent
2ad13037ab
commit
4a6ffd6bb0
@ -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" }
|
||||
]
|
||||
},
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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}
|
||||
|
||||
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user