# Tapdance spamming uncontrollably

**URL:** <https://community.keyboard.io/t/tapdance-spamming-uncontrollably/3521>\
**Category:** Plugins\
**Tags:** question\
**Created:** [January 28, 2020, 10:45am UTC](https://community.keyboard.io/t/tapdance-spamming-uncontrollably/3521 "2020-01-28T10:45:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dk88](https://avatars.discourse-cdn.com/v4/letter/d/f17d59/32.png) [@dk88](https://community.keyboard.io/u/dk88)\
**Post date:** [January 28, 2020, 10:45am UTC](https://community.keyboard.io/t/tapdance-spamming-uncontrollably/3521/1 "2020-01-28T10:45:46Z")

</div>

Plugin name: TapDance  
Documentation: [https://github.com/keyboardio/Kaleidoscope/blob/master/docs/plugins/TapDance.md](https://github.com/keyboardio/Kaleidoscope/blob/master/docs/plugins/TapDance.md)

Description:  
On the left side I am trying to map the LED key to the (, [ and { keys .  
On the right half I am trying to map the any key to ), ], and }.

But I am running into a minor annoyance. At first impression it seems to work but I would like to increase the time-out from the default 5 cycles to 8, but when doing this it started to spam the ( symbol. I changed the time-out back to 5 cycles but the problem is still present it just requires a longer press of the key before it starts spamming. The spamming gets so bad that I even tried unplugging the keyboard and reconnecting but it seems that after a second or 15 it stops by itself.

I have looked at the example included in the documentation and checked @algernon’s [Model01 sketch| [https://github.com/algernon/Model01-sketch](https://github.com/algernon/Model01-sketch)] but I can’t find any major problems with my sketch.

[Model01-Firmware.ino](https://community.keyboard.io/uploads/short-url/tSnJsfr0uQNTthuJtyGz2vHLrYo.ino) (23.4 KB)  
(Sorry if this is not the most convenient way to share my sketch, if there is a better way I’d love to hear it.)

Has anyone experienced similar problems with the TapDance plugin?

---

<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:** [January 28, 2020, 11:59am UTC](https://community.keyboard.io/t/tapdance-spamming-uncontrollably/3521/2 "2020-01-28T11:59:51Z")

</div>

Ouch. I’ve reproduced the problem. Looks like `tapDanceActionKeys()` does not handle the repeat stuff on hold well. I seem to remember seeing this before, but there’s no issue about this on GitHub yet. Can you open one, or should I? (I need a GitHub issue to not forget about it the next time I’m hacking on TapDance.)

---

<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:** [January 28, 2020, 12:05pm UTC](https://community.keyboard.io/t/tapdance-spamming-uncontrollably/3521/3 "2020-01-28T12:05:07Z")

</div>

Oh, also, the documentation is outdated: `TapDance.time_out` is in milliseconds nowadays, not iterations, and is 200ms by default. Not sure how I failed to update the docs when we switched away from iteration counting a long long time ago…

---

<div class="post-metadata">

**Author:** ![dk88](https://avatars.discourse-cdn.com/v4/letter/d/f17d59/32.png) [@dk88](https://community.keyboard.io/u/dk88)\
**Post date:** [January 28, 2020, 12:48pm UTC](https://community.keyboard.io/t/tapdance-spamming-uncontrollably/3521/4 "2020-01-28T12:48:57Z")

</div>

I’ve created a new [issue](https://github.com/keyboardio/Kaleidoscope/issues/806).

If I have time today I will try if a a more sensible time-out of 300ms makes a difference.

---

<div class="post-metadata">

**Author:** ![dk88](https://avatars.discourse-cdn.com/v4/letter/d/f17d59/32.png) [@dk88](https://community.keyboard.io/u/dk88)\
**Post date:** [January 29, 2020, 8:40am UTC](https://community.keyboard.io/t/tapdance-spamming-uncontrollably/3521/5 "2020-01-29T08:40:15Z")

</div>

So I tried 300ms and I prefer this time-out setting but the problem with spamming still persists.
