From 4d684a5571e531311294271bf20212256ae6a347 Mon Sep 17 00:00:00 2001 From: "regicidal.plutophage" <36969337+regicidalplutophage@users.noreply.github.com> Date: Thu, 7 Nov 2024 21:11:33 +0300 Subject: [PATCH] Expose debounce_threshold in keypad.py This is needed for proper debouncing --- kmk/scanners/keypad.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kmk/scanners/keypad.py b/kmk/scanners/keypad.py index c6b007aea..e3611d5ff 100644 --- a/kmk/scanners/keypad.py +++ b/kmk/scanners/keypad.py @@ -44,6 +44,7 @@ def __init__( columns_to_anodes=DiodeOrientation.COL2ROW, interval=0.02, max_events=64, + debounce_threshold=1, ): self.keypad = keypad.KeyMatrix( row_pins, @@ -51,6 +52,7 @@ def __init__( columns_to_anodes=(columns_to_anodes == DiodeOrientation.COL2ROW), interval=interval, max_events=max_events, + debounce_threshold=debounce_threshold, ) super().__init__()