@ -102,14 +102,29 @@ ALl the remaining keymap nodes will be nested inside of the root devicetree node
@@ -102,14 +102,29 @@ ALl the remaining keymap nodes will be nested inside of the root devicetree node
};
```
### Keymap Node
Nested under the devicetree root, is the keymap node. The node _name_ itself is not critical, but the node **MUST** have a property
`compatible = "zmk,keymap"` in order to be used by ZMK.
```
keymap {
compatible = "zmk,keymap";
// Layer nodes go here!
};
```
### Layers
Each layer of your keymap will be nested under the keymap node. Here is a sample
// | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ |
// | TAB | A | S | D | F | G | | H | J | K | L | ; | ' |
@ -117,9 +132,9 @@ ALl the remaining keymap nodes will be nested inside of the root devicetree node
@@ -117,9 +132,9 @@ ALl the remaining keymap nodes will be nested inside of the root devicetree node
// | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT |
bindings = <
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH
&kp TAB &kp A &kp S &mt MOD_LCTL D &mt MOD_LSFT F &kp G &kp H &mt MOD_LSFT J &mt MOD_LCTL K&kp L &kp SCLN &kp QUOT
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT
&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp LSFT &kp LSFT &kp LSFT &kp LSFT &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RCTL
&kp LGUI &kp DEL &kp RET &kp SPC &mo 1 &mo 2&kp SPC &kp RET &kp BKSP &kp RALT
&kp LGUI &kp DEL &kp RET &kp SPC &kp ESC &kp RET&kp SPC &kp TAB&kp BKSP &kp RALT
@ -127,23 +142,12 @@ ALl the remaining keymap nodes will be nested inside of the root devicetree node
@@ -127,23 +142,12 @@ ALl the remaining keymap nodes will be nested inside of the root devicetree node
};
```
### Keymap
Each layer should have:
```
keymap0: keymap {
compatible = "zmk,keymap";
label ="Default Kyria Keymap";
layers = <&default>;
};
```
### Chosen Keymap
1. A `bindings` property this will be a list of behaviour bindings, 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)
```
chosen {
zmk,keymap = &keymap0;
};
```
For the full set of possible behaviors, start at the [Key Press](/docs/behavior/key-press) behavior.