diff --git a/kmk/keys.py b/kmk/keys.py index a256a8bc0..df29bc89f 100644 --- a/kmk/keys.py +++ b/kmk/keys.py @@ -434,12 +434,9 @@ def __getitem__(self, name: str): if not maybe_key: if debug.enabled: - debug(f'Invalid key: {name}') + debug('Invalid key: ', name) return KC.NO - if debug.enabled: - debug(f'{name}: {maybe_key}') - return maybe_key diff --git a/kmk/modules/holdtap.py b/kmk/modules/holdtap.py index 662cabe70..135537b8f 100644 --- a/kmk/modules/holdtap.py +++ b/kmk/modules/holdtap.py @@ -1,6 +1,6 @@ from micropython import const -from kmk.keys import KC, make_argumented_key +from kmk.keys import make_argumented_key from kmk.modules import Module from kmk.utils import Debug @@ -51,10 +51,11 @@ def __init__( class HoldTap(Module): tap_time = 300 - def __init__(self): + def __init__(self, _make_key=True): self.key_buffer = [] self.key_states = {} - if KC.get('HT') == KC.NO: + + if _make_key: make_argumented_key( validator=HoldTapKeyMeta, names=('HT',), diff --git a/kmk/modules/layers.py b/kmk/modules/layers.py index 63ada03ad..a3c7128ee 100644 --- a/kmk/modules/layers.py +++ b/kmk/modules/layers.py @@ -47,7 +47,7 @@ def __init__( combo_layers=None, ): # Layers - super().__init__() + super().__init__(_make_key=False) self.combo_layers = combo_layers make_argumented_key( validator=layer_key_validator, diff --git a/kmk/modules/tapdance.py b/kmk/modules/tapdance.py index b78d35d69..5b276ab76 100644 --- a/kmk/modules/tapdance.py +++ b/kmk/modules/tapdance.py @@ -29,7 +29,7 @@ def __init__(self, *keys, tap_time=None): class TapDance(HoldTap): def __init__(self): - super().__init__() + super().__init__(_make_key=False) make_argumented_key( validator=TapDanceKeyMeta, names=('TD',),