docs: Better document the layer `display-name` prop.

This commit is contained in:
Peter Johanson 2024-10-16 10:26:15 -06:00 committed by Pete Johanson
parent 0adb80c02b
commit 993a64d5b3
3 changed files with 6 additions and 2 deletions

View File

@ -19,7 +19,7 @@ Each child node can have the following properties:
| Property | Type | Description |
| ----------------- | ------------- | -------------------------------------------------------------------- |
| `display-name` | string | Name for the layer on displays |
| `display-name` | string | Name for the layer in ZMK Studio and on displays |
| `bindings` | phandle-array | List of [key behaviors](../keymaps/index.mdx#behaviors), one per key |
| `sensor-bindings` | phandle-array | List of sensor behaviors, one per sensor |

View File

@ -3,6 +3,7 @@
compatible = "zmk,keymap";
default_layer { // Layer 0
display-name = "Base";
// ----------------------------------------------
// | Z | M | K |
// | &mo 1 | LEFT SHIFT | &mo 2 |
@ -12,6 +13,7 @@
>;
};
abc { // Layer 1
display-name = "ABC";
// ----------------------------------------------
// | A | B | C |
// | &trans | &trans | &trans |
@ -21,6 +23,7 @@
>;
};
xyz { // Layer 2
display-name = "XYZ";
// ----------------------------------------------
// | X | Y | Z |
// | LEFT CTRL | LEFT ALT | &trans |

View File

@ -130,6 +130,7 @@ Each layer of your keymap will be nested under the keymap node. Here is an examp
compatible = "zmk,keymap";
default_layer { // Layer 0
display-name = "Base";
// ----------------------------------------------
// | Z | M | K |
// | A | B | C |
@ -145,7 +146,7 @@ Each layer should have:
1. A `bindings` property that will be a list of [behavior bindings](behaviors/index.mdx), one for each key position for the keyboard.
1. (Optional) A `sensor-bindings` property that will be a list of behavior bindings for each sensor on the keyboard. (Currently, only encoders are supported as sensor hardware, but in the future devices like trackpoints would be supported the same way)
1. (Optional) A `display-name` property that is a string used by certain features, such as the layer status display widget.
1. (Optional) A `display-name` property that is a string used by certain features, such as ZMK Studio and the layer status display widget.
### Multiple Layers