Fix layer tap interrupted
This commit is contained in:
@@ -197,7 +197,7 @@ class KMKKeyboard:
|
||||
key = ksf.key
|
||||
|
||||
# Handle any unaccounted-for layer shifts by looking up the key resolution again.
|
||||
if ksf.int_coord in self._coordkeys_pressed.keys():
|
||||
if ksf.int_coord is not None:
|
||||
key = self._find_key_in_map(ksf.int_coord)
|
||||
|
||||
# Resume the processing of the key event and update the HID report
|
||||
|
@@ -83,6 +83,11 @@ class HoldTap(Module):
|
||||
if state.activated != ActivationType.PRESSED:
|
||||
continue
|
||||
|
||||
# holdtap isn't interruptable, resolves on ht_release or timeout.
|
||||
if not key.meta.tap_interrupted and not key.meta.prefer_hold:
|
||||
append_buffer = True
|
||||
continue
|
||||
|
||||
# holdtap is interrupted by another key event.
|
||||
if (is_pressed and not key.meta.tap_interrupted) or (
|
||||
not is_pressed and key.meta.tap_interrupted and self.key_buffer
|
||||
|
@@ -53,7 +53,7 @@ class OneShot(HoldTap):
|
||||
elif state.activated == ActivationType.INTERRUPTED:
|
||||
if is_pressed:
|
||||
send_buffer = True
|
||||
self.key_buffer.insert(0, (0, key, False))
|
||||
self.key_buffer.insert(0, (None, key, False))
|
||||
|
||||
if send_buffer:
|
||||
self.key_buffer.append((int_coord, current_key, is_pressed))
|
||||
|
@@ -17,7 +17,7 @@ class TapDanceKeyMeta:
|
||||
ht_key = KC.HT(
|
||||
tap=key,
|
||||
hold=key,
|
||||
prefer_hold=False,
|
||||
prefer_hold=True,
|
||||
tap_interrupted=False,
|
||||
tap_time=self.tap_time,
|
||||
)
|
||||
|
Reference in New Issue
Block a user