stasmarkin / sm_td

SM Tap Dance user library for QMK
GNU General Public License v3.0
117 stars 4 forks source link

Repetitive keycode sending whilst modifier key is held #9

Open 7kilobytes opened 2 weeks ago

7kilobytes commented 2 weeks ago

First of all I would like to thank you for the fantastic library <3

However, I have faced with the following issue: I am Colemak user and have LCTRL and RCTRL modifiers on the T and N keys (F and J in QWERTY) accordingly on the home row. When I hold the LCTRL key and then hold N key I expect that CTRL + N is send repeatedly but nothing happens. Is it possible to implement described behavior?

Thank you in advance.

stasmarkin commented 2 weeks ago

@7kilobytes

When I hold the LCTRL key and then hold N

When you hold N it is also interpreted as hold action, so you get LCTRL + RCTRL held.

When you hold N, it is also interpreted as a hold action, so you get LCTRL + RCTRL held.

To work around this, I've added threshold' for macros. Have a look at the extended versionSMTD_MT(macro_key, tap_key, modifier, threshold)https://github.com/stasmarkin/sm_td/wiki/2.1:-Customization-guide:-Examples For example, by definingSMTD_LT(CKC_N, KC_N, RCTRL, 1)` there will be such behavior:

So, this threshold param defines how many subsequent taps should appear to interpret that a key is being held instead of a modifier.

7kilobytes commented 2 weeks ago

Awesome! Thank you very much