info.jsonThe 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, and contains the information QMK Configurator needs to display a representation of your keyboard. Its key/value pairs are ruled by the data/schemas/keyboard.jsonschema file. To learn more about the why and how of the schema file see the Data Driven Configuration page.
You 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%.
info.json FormatThe 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
Clueboard 66%manufacturer
Clueboardurl
https://clueboard.comaintainer
qmk for community maintained boards.skullydazedusb
debounce
5diode_direction
DIRECT_PINS in the hardware configuration for more details.layout_aliases
layouts it maps to.layouts
matrix_pins
rgblight
?> For all the available keys and their allowed values refer back to the data/schemas/keyboard.jsonschema file.
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.
layout
Each 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.
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.
x
y
w
1h
1label
matrix
[0, 4]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.
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.
Example:
{
"diode_direction": "COL2ROW",
"matrix_pins": {
"cols": ["F4", "E6", "B1", "D2"],
"rows": ["B0", "D3", "D5", "D4", "D6"]
}
}
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.
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:
{
"matrix_pins": {
"direct": [
["A10", "A9"],
["A0", "B8"],
[null, "B11"],
["B9", "A8"],
["A7", "B1"],
[null, "B2"]
]
}
}
input_pressed_state
1 for high, 0 for low0Example:
"matrix_pins": {
"input_pressed_state": 1,
},
This section controls basic 2-pin LEDs, which typically pass through keyswitches and are soldered into the PCB, or are placed in PCB sockets.
Enable by setting
"features": {
"backlight": true
}
breathing
breathing_period
levels
max_brightness
pin
pins
on_state
1 for high, 0 for low1Example:
{
"backlight": {
"breathing": true,
"breathing_period": 5,
"levels": 15,
"pin": "B7"
}
}
Used for indicating Num Lock, Caps Lock, and Scroll Lock. May be soldered in-switch or in a dedicated area.
num_lock
Num Lock LEDcaps_lock
Caps Lock LEDscroll_lock
Scroll Lock LEDcompose
Compose LEDkana
Kana LEDon_state
1 for high, 0 for low1Example:
{
"indicators": {
"num_lock": "B6",
"caps_lock": "D2",
"scroll_lock": "A3"
}
}
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.
The following items can be set. Not every value is required.
led_count
pin
animations
sleep
true to enable lighting during host sleepsplit
true to enable synchronization functionality between split halvessplit_count
[ 10 , 10 ]max_brightness
hue_steps
saturation_steps
brightness_steps
Example:
{
"rgblight": {
"led_count": 4,
"pin": "F6",
"hue_steps": 10,
"saturation_steps": 17,
"brightness_steps": 17,
"animations": {
"knight": true,
"rainbow_swirl": true
}
}
}
The following animations can be enabled:
| Key | Description |
|---|---|
alternating |
Enable alternating animation mode. |
breathing |
Enable breathing animation mode. |
christmas |
Enable christmas animation mode. |
knight |
Enable knight animation mode. |
rainbow_mood |
Enable rainbow mood animation mode. |
rainbow_swirl |
Enable rainbow swirl animation mode. |
rgb_test |
Enable RGB test animation mode. |
snake |
Enable snake animation mode. |
static_gradient |
Enable static gradient mode. |
twinkle |
Enable twinkle animation mode. |
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.
Example:
{
"usb": {
"vid": "0xC1ED",
"pid": "0x23B0",
"device_version": "1.0.0"
}
}
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.
This section controls the basic rotary encoder support.
Enable by setting
"features": {
"encoder": true
}
The following items can be set. Not every value is required.
pin_a
pin_b
resolution
Examples:
{
"encoder": {
"rotary": [
{ "pin_a": "B5", "pin_b": "A2" }
]
}
}
{
"encoder": {
"rotary": [
{ "pin_a": "B5", "pin_b": "A2", "resolution": 4 }
{ "pin_a": "B6", "pin_b": "A3", "resolution": 2 }
]
}
}
The following options can be configured:
| Key | Description |
|---|---|
unlock_sequence |
Timeout for the user to perform the configured unlock sequence - 0 to disable |
unlock_timeout |
Timeout while unlocked before returning to locked - 0 to disable |
idle_timeout |
Array of matrix locations describing a sequential sequence of keypresses |
Example:
{
"secure": {
"unlock_sequence": [ [0,0], [0,1] ],
"unlock_timeout": 5000,
"idle_timeout": 60000
}
}
This section configures Bootmagic Lite support.
The following options can be configured:
| Key | Description |
|---|---|
matrix |
A two item list describing the row and column location for the trigger key. |
Example:
{
"bootmagic": {
"enabled": true,
"matrix": [0, 0]
},
}