From 76689e70f7079c64a08446c7fbbfbcc1a3ce5f9e Mon Sep 17 00:00:00 2001 From: Marco Sterbik Date: Thu, 26 May 2022 22:12:38 +0200 Subject: [PATCH] behaviour-keytap: add documentation --- docs/docs/behaviors/key-tap.md | 27 +++++++++++++++++++++++++++ docs/sidebars.js | 1 + 2 files changed, 28 insertions(+) create mode 100644 docs/docs/behaviors/key-tap.md diff --git a/docs/docs/behaviors/key-tap.md b/docs/docs/behaviors/key-tap.md new file mode 100644 index 00000000..5b8ecef0 --- /dev/null +++ b/docs/docs/behaviors/key-tap.md @@ -0,0 +1,27 @@ +--- +title: Key Tap Behavior +sidebar_label: Key Tap +--- + +## Summary + +The key tap behavior is a combination of key press and release on just pressing the key. + +All keycodes including modifiers can be used the same way as with the key press behavior (so standard keycodes are sent for press/release). + +It is usefull if you want to make a layout that has the same keycode with and without a modifier close together, e.g. `[` and `{`. + +Since `LBRC` is basically just `LSHIFT(LBKT)` it can happen, that you still hold `{` while using `[` which leads to a missed keycode since the base-key is still pressed. + +By immediately releasing the key with key tap this is circumvented. + +### Behavior Binding + +- Reference: `&kt` +- Parameter: The keycode usage ID from the usage page, e.g. `LBTK` or `A` + +Example: + +``` +&kt LBKT +``` diff --git a/docs/sidebars.js b/docs/sidebars.js index e7d05850..643a5420 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -34,6 +34,7 @@ module.exports = { "behaviors/tap-dance", "behaviors/caps-word", "behaviors/key-repeat", + "behaviors/key-tap", "behaviors/reset", "behaviors/bluetooth", "behaviors/outputs",