From 5cae17c9f396de5513f49bcff779bc19078e5eff Mon Sep 17 00:00:00 2001 From: xs5871 Date: Wed, 26 Jan 2022 20:34:50 +0000 Subject: [PATCH] fix permanent hid_send --- kmk/modules/modtap.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/kmk/modules/modtap.py b/kmk/modules/modtap.py index cbbbf32..15b02a1 100644 --- a/kmk/modules/modtap.py +++ b/kmk/modules/modtap.py @@ -1,3 +1,4 @@ +import kmk.handlers.stock as handlers from kmk.key_validators import mod_tap_validator from kmk.keys import make_argumented_key from kmk.modules.holdtap import HoldTap @@ -13,17 +14,14 @@ class ModTap(HoldTap): on_release=self.ht_released, ) - def before_hid_send(self, keyboard): - keyboard.hid_pending = True - def ht_activate_hold(self, key, keyboard, *args, **kwargs): - keyboard.keys_pressed.add(key.meta.mods) + handlers.default_pressed(key.meta.mods, keyboard, None) def ht_deactivate_hold(self, key, keyboard, *args, **kwargs): - keyboard.keys_pressed.discard(key.meta.mods) + handlers.default_released(key.meta.mods, keyboard, None) def ht_activate_tap(self, key, keyboard, *args, **kwargs): - keyboard.keys_pressed.add(key.meta.kc) + handlers.default_pressed(key.meta.kc, keyboard, None) def ht_deactivate_tap(self, key, keyboard, *args, **kwargs): - keyboard.keys_pressed.discard(key.meta.kc) + handlers.default_released(key.meta.kc, keyboard, None)