Status of Using TapDance with Chrysalis

I notice that Chrysalis currently allows the assignment of 15 TapDance keys to my keyboard layout. Is it yet possible to define these cases? I experimented by defining a TapDance case 0 in my customized firmware, but that still doesn’t help with the layout stored in EEPROM, correct?

Is there any way to use TapDance while still using Chrysalis to tweak my layout?

It is not currently possible to set up TapDance from within Chrysalis alone. You can assign TapDance keycodes to key, but their behaviour will still need to be implemented in the firmware.

If you set up TapDance in your custom firmware, the layout can still be tweaked by Chrysalis (sans the TapDance key behaviour - you can move the keys in Chrysalis, but can’t change what they do).

2 Likes

Got it. That’s what I was hoping. Do the TapDance key numbers in Chrysalis refer to case numbers I could implement in the firmware? Ie, if I put this example in my sketch, will TapDance #0 control this behavior?:

void tapDanceAction(uint8_t tap_dance_index, byte row, byte col, uint8_t tap_count,
kaleidoscope::plugin::TapDance::ActionType tap_dance_action) {
switch (tap_dance_index) {
case 0:
return tapDanceActionKeys(tap_count, tap_dance_action,
Consumer_ScanNextTrack, Consumer_ScanPreviousTrack);
}
}

Yep, the TapDance indexes in Chrysalis are the same as the case numbers in your switch statement on the firmware side.

Hmm, not sure what I am missing, but I haven’t been able to get this to work. I am able to flash a firmware with definitions of the case numbers, but when I put those cases in my Chrysalis layout, I’m not getting anything. I included TapDance in the header, initiated the plugin, and placed the following switch statement in the sketch, but still TD#1 does nothing:

void tapDanceAction(uint8_t tap_dance_index, byte row, byte col, uint8_t tap_count,
                    kaleidoscope::plugin::TapDance::ActionType tap_dance_action) {
  switch (tap_dance_index) {
  case 1:
    return tapDanceActionKeys(tap_count, tap_dance_action,
                              Key_Pipe, Key_Backtick);
  }
}

Oh, right. We switched away from row, col params, to KeyAddr, so… try this:

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 1:
    return tapDanceActionKeys(tap_count, tap_dance_action, Key_Pipe, Key_Backtick);
  }
}
2 Likes

Amazing! Thank you! With so few keys, I love having more tricks in the arsenal.