Skip to content

Commit

Permalink
Ignore all HoldTap related keys as Oneshot interrupts
Browse files Browse the repository at this point in the history
  • Loading branch information
xs5871 committed Jun 9, 2023
1 parent 9fad711 commit 54e6dc2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kmk/modules/oneshot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from kmk.keys import make_argumented_key
from kmk.modules.holdtap import ActivationType, HoldTap, HoldTapKeyMeta
from kmk.modules.layers import LayerKeyMeta
from kmk.modules.tapdance import TapDanceKeyMeta
from kmk.utils import Debug

debug = Debug(__name__)
Expand Down Expand Up @@ -32,8 +33,11 @@ def process_key(self, keyboard, current_key, is_pressed, int_coord):
if key == current_key:
continue

if (isinstance(current_key.meta, OneShotKeyMeta)) or (
isinstance(current_key.meta, LayerKeyMeta)
if (
isinstance(current_key.meta, OneShotKeyMeta)
or isinstance(current_key.meta, LayerKeyMeta)
or isinstance(current_key.meta, HoldTapKeyMeta)
or isinstance(current_key.meta, TapDanceKeyMeta)
):
keyboard.cancel_timeout(state.timeout_key)
if key.meta.tap_time is None:
Expand Down

0 comments on commit 54e6dc2

Please sign in to comment.