Needed: TapDance Example

Can anyone post an example of Tapdance with not only tap, but one or more of hold, doubletap, and tap & hold?

I am aware of the kaleidescope documentation and example, but I would appreciate a concrete example, even a simple one. I have managed to write tapdance in QMK for another keyboard, but Kaleidescope is just different enough that I’m struggling.

1 Like

This TapDance action does single/double/triple tap to insert paren→bracket→brace.

enum {
    TDLBR,                      // left paren → bracket → brace
    TDRBR                       // right paren → bracket → brace
};

void tapDanceAction(uint8_t tap_dance_index, KeyAddr key_addr, uint8_t tap_count,
                    kaleidoscope::plugin::TapDance::ActionType tap_dance_action)
{
    switch (tap_dance_index)
    {
        case TDLBR:
            return tapDanceActionKeys(tap_count, tap_dance_action,
                                      TOPSY(9), Key_LeftBracket, Key_LeftCurlyBracket);
            break;
        case TDRBR:
            return tapDanceActionKeys(tap_count, tap_dance_action,
                                      TOPSY(0), Key_RightBracket, Key_RightCurlyBracket);
            break;
    }
}
1 Like

Thanks! I think I can take it from here.

1 Like