urob / zmk-helpers

Convenience macros simplifying ZMK's keymap configuration
MIT License
235 stars 79 forks source link

Add Mod-Tap behavior #57

Closed DuBento closed 2 weeks ago

DuBento commented 2 weeks ago

The mod tap is hold tap under the hood, but for consistency with the documentation it probably makes sense to add.

urob commented 2 weeks ago

I see you already closed this. But yea, mod-tap isn't a valid behavior class, so this doesn't work. (It's a behavior instance of the hold-tap class).

DuBento commented 2 weeks ago

Yup, I realized that right after opening the PR, sorry. Btw thank you so much for you work!

If someone finds this PR, what I ended up using was:

#define MAKE_MOD_TAP(NAME, BINDING1, BINDING2) \
    ZMK_HOLD_TAP(NAME, \
        flavor = "hold-preferred"; \
        tapping-term-ms = <200>; \
        bindings = <BINDING1>, <BINDING2>; \
    )

Since I needed to combine Mod-Tap with other previously defined behaviors, for example: MAKE_MOD_TAP(mod_delcaps, &kp, &del_caps) ... &mod_delcaps RALT 0 ...