fix(docs): Fix toggle layer docs
This commit is contained in:
parent
f92dce43e9
commit
b417118672
1 changed files with 3 additions and 40 deletions
|
@ -33,7 +33,7 @@ again.
|
||||||
### Behavior Binding
|
### Behavior Binding
|
||||||
|
|
||||||
- Reference: `&mo`
|
- Reference: `&mo`
|
||||||
- Parameter: The layer number to enable/disable, e.g. `1`
|
- Parameter: The layer number to enable while held, e.g. `1`
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ The "layer-tap" behavior enables a layer when a key is held, and outputs a [keyp
|
||||||
### Behavior Binding
|
### Behavior Binding
|
||||||
|
|
||||||
- Reference: `<`
|
- Reference: `<`
|
||||||
- Parameter: The layer number to enable when held, e.g. `1`
|
- Parameter: The layer number to enable while held, e.g. `1`
|
||||||
- Parameter: The keycode to send when tapped, e.g. `A`
|
- Parameter: The keycode to send when tapped, e.g. `A`
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
@ -99,7 +99,7 @@ Example:
|
||||||
|
|
||||||
## Toggle Layer
|
## Toggle Layer
|
||||||
|
|
||||||
The "toggle layer" behavior enables a layer until the layer is manually disabled.
|
The "toggle layer" behavior enables a layer if it is currently disabled, or disables it if enabled.
|
||||||
|
|
||||||
### Behavior Binding
|
### Behavior Binding
|
||||||
|
|
||||||
|
@ -112,43 +112,6 @@ Example:
|
||||||
&tog LOWER
|
&tog LOWER
|
||||||
```
|
```
|
||||||
|
|
||||||
"Toggle layer" for a :
|
|
||||||
|
|
||||||
```dts
|
|
||||||
#define DEFAULT 0
|
|
||||||
#define NAVI 1
|
|
||||||
|
|
||||||
#define NONE 0
|
|
||||||
|
|
||||||
/ {
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
|
|
||||||
default_layer {
|
|
||||||
bindings = <
|
|
||||||
&tog NAVI &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS
|
|
||||||
&kp NUMBER_7 &kp NUMBER_8 &kp NUMBER_9 &kp KP_PLUS
|
|
||||||
&kp NUMBER_4 &kp NUMBER_5 &kp NUMBER_6 &kp KP_PLUS
|
|
||||||
&kp NUMBER_1 &kp NUMBER_2 &kp NUMBER_3 &kp RETURN
|
|
||||||
&kp NUMBER_0 &kp NUMBER_0 &kp DOT &kp RETURN
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
nav_layer {
|
|
||||||
bindings = <
|
|
||||||
&tog NAVI &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS
|
|
||||||
&kp HOME &kp UP &kp PAGE_UP &kp KP_PLUS
|
|
||||||
&kp LEFT &none &kp RIGHT &kp KP_PLUS
|
|
||||||
&kp END &kp DOWN &kp PAGE_DOWN &kp RETURN
|
|
||||||
&kp INSERT &kp INSERT &kp DEL &kp RETURN
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
It is possible to use "toggle layer" to have keys that raise and lower the layers as well.
|
|
||||||
|
|
||||||
## Conditional Layers
|
## Conditional Layers
|
||||||
|
|
||||||
The "conditional layers" feature enables a particular layer when all layers in a specified set are active.
|
The "conditional layers" feature enables a particular layer when all layers in a specified set are active.
|
||||||
|
|
Loading…
Add table
Reference in a new issue