summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/docs/behavior/key-press.md2
-rw-r--r--docs/docs/behavior/layers.md51
2 files changed, 52 insertions, 1 deletions
diff --git a/docs/docs/behavior/key-press.md b/docs/docs/behavior/key-press.md
index 08296bb..1ae7e31 100644
--- a/docs/docs/behavior/key-press.md
+++ b/docs/docs/behavior/key-press.md
@@ -4,7 +4,7 @@ title: Key Presses
## Summary
-The most basic of behaiors, is the ability to send certain keycode presses and releases in response to activating
+The most basic of behaviors, is the ability to send certain keycode presses and releases in response to activating
a certain key.
For reference on keycode values, see the [USB HID Usage Tables](https://www.usb.org/document-library/hid-usage-tables-12).
diff --git a/docs/docs/behavior/layers.md b/docs/docs/behavior/layers.md
index 2388caf..3e520ca 100644
--- a/docs/docs/behavior/layers.md
+++ b/docs/docs/behavior/layers.md
@@ -39,3 +39,54 @@ Example:
```
&mo LOWER
```
+
+## Toggle Layer
+
+The "toggle layer" behavior allows you to enable a layer until the layer is manually disabled.
+
+### Behavior Binding
+
+- Reference: `&tog`
+- Parameter: The layer number to enable/disable, e.g. `1`
+
+Example:
+
+```
+&tog LOWER
+```
+
+"Toggle layer" for a :
+```
+#define DEFAULT 0
+#define NAVI 1
+
+#define NONE 0
+
+/ {
+ keymap {
+ compatible = "zmk,keymap";
+
+ default_layer {
+ bindings = <
+ &tog NAVI &kp KDIV &kp KMLT &kp KMIN
+ &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp KPLS
+ &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp KPLS
+ &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp RET
+ &kp NUM_0 &kp NUM_0 &kp DOT &kp RET
+ >;
+ };
+
+ nav_layer {
+ bindings = <
+ &tog NAVI &kp KDIV &kp KMLT &kp KMIN
+ &kp HOME &kp UARW &kp PGUP &kp KPLS
+ &kp LARW &none &kp RARW &kp KPLS
+ &kp END &kp DARW &kp PGDN &kp RET
+ &kp INS &kp INS &kp DEL &kp RET
+ >;
+ };
+ };
+};
+```
+
+It is possible to use "toggle layer" to have keys that raise and lower the layers as well. \ No newline at end of file