Browse Source

Add a layer diagram.

* Original diagram from Thomas Baart, used
  with permission.
xmkb
Pete Johanson 4 years ago
parent
commit
b25133cbef
  1. BIN
      docs/docs/assets/features/keymaps/layer-diagram.png
  2. 6
      docs/docs/feature/keymaps.md

BIN
docs/docs/assets/features/keymaps/layer-diagram.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

6
docs/docs/feature/keymaps.md

@ -39,11 +39,13 @@ Like many mechanical keyboard firmwares, ZMK keymaps are composed of a collectio
minimum of at least one layer that is the default, usually near the bottom of the "stack". Each layer minimum of at least one layer that is the default, usually near the bottom of the "stack". Each layer
in ZMK contains a set of bindings that bind a certain behavior to a certain key position in that layer. in ZMK contains a set of bindings that bind a certain behavior to a certain key position in that layer.
| ![Diagram of three layers](../assets/features/keymaps/layer-diagram.png) |
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| _A simplified diagram showing three layers. The layout of each layer is the same (they all contain four keys), but the behavior bindings within each layer can be different._ |
In addition to the base default layer (which can be changed), certain bound behaviors may also In addition to the base default layer (which can be changed), certain bound behaviors may also
enable/disable additional layers "on top" of the default layer. enable/disable additional layers "on top" of the default layer.
**TODO**: A diagram to help visualize layers
When a key location is pressed/released, the stack of all active layers from "top to bottom" is used, When a key location is pressed/released, the stack of all active layers from "top to bottom" is used,
and the event is sent to the behavior bound at that position in each layer, for it to perform whatever and the event is sent to the behavior bound at that position in each layer, for it to perform whatever
actions it wants to in reaction to the event. Those behaviors can choose to "handle" the event, and stop actions it wants to in reaction to the event. Those behaviors can choose to "handle" the event, and stop

Loading…
Cancel
Save