fix permanent hid_send
This commit is contained in:
parent
7573556f33
commit
5cae17c9f3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user