KMKfw / kmk_firmware

Clackety Keyboards Powered by Python
https://kmkfw.zulipchat.com
Other
1.45k stars 486 forks source link

tap_interrupted=True parameter does not work in context of LayerTap[BUG] #739

Closed regicidalplutophage closed 1 year ago

regicidalplutophage commented 1 year ago

Describe the bug

The combination of prefer_hold=True and tap_interrupted=True is an extremely useful setting that allows to both minimize typos and doesn't feel as sluggish to use as prefer_hold=False. This behavior is default in ZMK which is en exemplary firmware in terms of "ergonomic" features. Unfortunately, when applied in context of LayerTap, whether through KC.MT or KC.HT, pressing and releasing a key within tap_time produces weird results.

Sidenote: Since KC.MT is now just an alias for KC.HT, I think it should be deprecated completely.

To Reproduce Steps to reproduce the behavior:

TEST1 = KC.MT(KC.F, KC.MO(3), prefer_hold=True, tap_interrupted=True, tap_time=1000)
TEST2 = KC.HT(KC.F, KC.MO(3), prefer_hold=True, tap_interrupted=True, tap_time=1000)
TEST3 = KC.HT(KC.F, KC.LSFT, prefer_hold=True, tap_interrupted=True, tap_time=1000)

1.

2.

TEST2, TEST3 and KC.F are all located on the same layer. TEST1 is omitted for brevity as it produces the same result as TEST2

Expected behavior Expected results are:

  1. enter located on layer 3
  2. backslash located on layer 3

Debug output If applicable, add debug output from the serial console to help explain your problem.

Additional context Add any other context about the problem here.

regicidalplutophage commented 1 year ago

This is #737 but more condensed and in current version of KMK.