KMKfw / kmk_firmware

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

[BUG] 'release w/o press' on chaining LT and HT #929

Closed b2ox closed 4 weeks ago

b2ox commented 5 months ago

Example keymap: [ [ KC.LT(1, KC.A), KC.B, ], [ KC.N1, KC.HT(KC.N2, KC.LCTL, prefer_hold = False), # no probrem if it set True ], ]

Key sequences: [(0, True), t_after, # change layer 1 (1, True), (0, False), # occur 'release w/o press' and not return to layer 0. t_within, (1, False), t_within, (0, True), t_within, (0, False) ]

Noki0100 commented 3 months ago

This seems to be true for sequences too, this exmaple from the readme works:

NEXT = simple_key_sequence( ( KC.LALT(no_release=True), KC.MACRO_SLEEP_MS(30), KC.TAB, KC.MACRO_SLEEP_MS(30), KC.LALT(no_press=True), ) )

But only because the ALT key is released when the sequence ends, but this custom example comes out as 'CAT' instead of 'Cat':

CAT = simple_key_sequence( ( KC.LSFT(no_release=True), KC.MACRO_SLEEP_MS(30), KC.C, KC.MACRO_SLEEP_MS(30), KC.LSFT(no_press=True), KC.MACRO_SLEEP_MS(30), KC.A, KC.MACRO_SLEEP_MS(30), KC.T, ) )