From 7573556f33812ebbbc9fc15f8ca27b888e915257 Mon Sep 17 00:00:00 2001 From: xs5871 Date: Wed, 26 Jan 2022 19:49:31 +0000 Subject: [PATCH] fix hold-tap key interrupted by other hold-tap key --- kmk/modules/holdtap.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kmk/modules/holdtap.py b/kmk/modules/holdtap.py index a756fcd..a1aa152 100644 --- a/kmk/modules/holdtap.py +++ b/kmk/modules/holdtap.py @@ -1,7 +1,6 @@ from micropython import const from kmk.modules import Module -from kmk.types import ModTapKeyMeta class ActivationType: @@ -36,8 +35,10 @@ class HoldTap(Module): def process_key(self, keyboard, key, is_pressed): '''Before other key down decide to send tap kc down.''' current_key = key - if is_pressed and not isinstance(key.meta, ModTapKeyMeta): - for key, state in self.key_states.items(): + for key, state in self.key_states.items(): + if key == current_key: + continue + if is_pressed: if state.activated == ActivationType.NOT_ACTIVATED: # press tap because interrupted by other key self.key_states[key].activated = ActivationType.INTERRUPTED