# Status of Using TapDance with Chrysalis

**URL:** <https://community.keyboard.io/t/status-of-using-tapdance-with-chrysalis/4143>\
**Category:** Plugins\
**Created:** [October 5, 2020, 1:20am UTC](https://community.keyboard.io/t/status-of-using-tapdance-with-chrysalis/4143 "2020-10-05T01:20:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JDH](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@JDH](https://community.keyboard.io/u/JDH)\
**Post date:** [October 5, 2020, 1:20am UTC](https://community.keyboard.io/t/status-of-using-tapdance-with-chrysalis/4143/1 "2020-10-05T01:20:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [October 10, 2020, 10:00am UTC](https://community.keyboard.io/t/status-of-using-tapdance-with-chrysalis/4143/2 "2020-10-10T10:00:10Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![JDH](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@JDH](https://community.keyboard.io/u/JDH)\
**Post date:** [October 10, 2020, 11:33pm UTC](https://community.keyboard.io/t/status-of-using-tapdance-with-chrysalis/4143/3 "2020-10-10T23:33:43Z")

</div>

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);  
}  
}

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [October 11, 2020, 12:11am UTC](https://community.keyboard.io/t/status-of-using-tapdance-with-chrysalis/4143/4 "2020-10-11T00:11:36Z")

</div>

> [@JDH](#):
>
> Do the TapDance key numbers in Chrysalis refer to case numbers I could implement in the firmware?

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

---

<div class="post-metadata">

**Author:** ![JDH](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@JDH](https://community.keyboard.io/u/JDH)\
**Post date:** [October 11, 2020, 7:19pm UTC](https://community.keyboard.io/t/status-of-using-tapdance-with-chrysalis/4143/5 "2020-10-11T19:19:19Z")

</div>

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);
  }
}
```

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [October 11, 2020, 9:26pm UTC](https://community.keyboard.io/t/status-of-using-tapdance-with-chrysalis/4143/6 "2020-10-11T21:26:45Z")

</div>

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

```auto
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);
  }
}

```

---

<div class="post-metadata">

**Author:** ![JDH](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@JDH](https://community.keyboard.io/u/JDH)\
**Post date:** [October 11, 2020, 9:43pm UTC](https://community.keyboard.io/t/status-of-using-tapdance-with-chrysalis/4143/7 "2020-10-11T21:43:02Z")

</div>

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