Skip to content

Commit

Permalink
docs: Better document the layer display-name prop.
Browse files Browse the repository at this point in the history
  • Loading branch information
petejohanson committed Oct 16, 2024
1 parent 0adb80c commit d7d5d51
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/docs/config/keymap.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

Expand Down
3 changes: 3 additions & 0 deletions docs/docs/keymap-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
compatible = "zmk,keymap";
default_layer { // Layer 0
display-name = "Base";
// ----------------------------------------------
// | Z | M | K |
// | &mo 1 | LEFT SHIFT | &mo 2 |
Expand All @@ -12,6 +13,7 @@
>;
};
abc { // Layer 1
display-name = "ABC";
// ----------------------------------------------
// | A | B | C |
// | &trans | &trans | &trans |
Expand All @@ -21,6 +23,7 @@
>;
};
xyz { // Layer 2
display-name = "XYZ";
// ----------------------------------------------
// | X | Y | Z |
// | LEFT CTRL | LEFT ALT | &trans |
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/keymaps/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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

Expand Down

0 comments on commit d7d5d51

Please sign in to comment.