]> git.donarmstrong.com Git - qmk_firmware.git/commit
tap-dance: Do not start a sequence on keyup
authorGergely Nagy <algernon@madhouse-project.org>
Thu, 1 Sep 2016 06:32:47 +0000 (08:32 +0200)
committerGergely Nagy <algernon@madhouse-project.org>
Thu, 1 Sep 2016 06:32:47 +0000 (08:32 +0200)
commitacda2b793f69c6e0e9b9667e9ebe8a0325eb5ecd
tree54c6b8cbee5ab1020bd57f64acccb4fed7f69907
parente28d151a8a1d458f3c18897c6095decc17b0c3a1
tap-dance: Do not start a sequence on keyup

There was an odd case, which confused the hell out of tap-dance: suppose
you had a number of tap-dance keys, on a layer, and as part of the
tap-dance, you turned that layer off - or had it on one-shot to begin
with. In this case, the keydown event would trigger the tap-dance key,
but the keyup would not. This had two funky consequences:

- tap-dance did not correctly register that the dance has ended.
- pressing any other tap-dance key would interrupt the previous
  tap-dance, and potentially input unwanted characters.

To fix this, we simply do not start a tap-dance sequence on keyup, only
when it is pressed. This way the previous sequence has enough time to
time-out and finish properly, and we don't get confused.

This fixes algernon/ergodox-layout#107.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
quantum/process_keycode/process_tap_dance.c