feat(docs): add tap hold documentation

This commit is contained in:
Cody McGinnis 2020-08-21 21:25:12 -04:00
parent 7a0d359ae7
commit dfb013f9c0
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,51 @@
---
title: Tap or Hold
---
This behavior is unlike many other behaviors. It implements tap or hold logic for a single key allowing any
other behaviors as arguments.
Usage:
```
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
/ {
behaviors {
rst: behavior_tap_hold {
compatible = "zmk,behavior-hold-tap";
label = "Reset Tap - Bootloader Hold";
#binding-cells = <0>;
hold_ms = <3000>;
bindings = <&bootloader>, <&reset>;
};
mup: behavior_music_up {
compatible = "zmk,behavior-hold-tap";
label = "Reset Tap - Bootloader Hold";
#binding-cells = <0>;
hold_ms = <3000>;
bindings = <&cp M_NEXT>, <&cp M_VOLU>;
};
mdwn: behavior_music_down {
compatible = "zmk,behavior-hold-tap";
label = "Reset Tap - Bootloader Hold";
#binding-cells = <0>;
hold_ms = <3000>;
bindings = <&cp M_NEXT>, <&cp M_VOLU>;
};
};
keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
&rst &mup &mdwn
>;
};
};
};
```

View file

@ -12,7 +12,11 @@ module.exports = {
"behavior/layers",
"behavior/misc",
"behavior/mod-tap",
<<<<<<< HEAD
"behavior/reset",
=======
"behavior/tap-hold",
>>>>>>> 9a06bdb... feat(docs): add tap hold documentation
"behavior/lighting",
],
Development: [