From 80b44b5c1ba373931833b9f8a590ce42c232e465 Mon Sep 17 00:00:00 2001 From: xs5871 Date: Sun, 5 Jun 2022 21:01:12 +0000 Subject: [PATCH] update combo docs --- docs/combos.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/combos.md b/docs/combos.md index b04af14..d02456f 100644 --- a/docs/combos.md +++ b/docs/combos.md @@ -14,16 +14,20 @@ corresponding handlers. Combos may overlap, i.e. share match keys amongst each other. -The optional arguments `timeout` and `per_key_timeout` define the time window -within which the match has to happen and whether the timeout is renewed after -each key press, respectively. These can be customized for every combo -individually. - ## Keycodes |New Keycode |Description | |------------|----------------------------------------------------| |`KC.LEADER` | a dummy / convenience key for leader key sequences | +## Custom Combo Behavior +Optional arguments that customize individual combos: +* `fast_reset`: If True, allows tapping every key (default for sequences); + if False, allows holding at least one key and tapping the rest to repeatedly + activate the combo (default for chords). +* `per_key_timeout`: If True, reset timeout on every key press (default for + sequences). +* `timeout`: Set the time window within which the match has to happen in ms. + ## Example Code ```python from kmk.keys import KC, make_key @@ -40,6 +44,6 @@ combos.combos = [ Chord((KC.A, KC.B), KC.LSFT) Chord((KC.A, KC.B, KC.C), KC.LALT) Sequence((KC.LEADER, KC.A, KC.B), KC.C) - Sequence((KC.E, KC.F) KC.MYKEY, timeout=500, per_key_timeout=False) + Sequence((KC.E, KC.F) KC.MYKEY, timeout=500, per_key_timeout=False, fast_reset=False) ] ```