From 38988df2737b125b89e90c8dc98c2b05657986b2 Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Fri, 18 Feb 2022 20:31:49 -0600 Subject: [PATCH] Update TapDance hold timeout testcase This testcase is for a version of TapDance that distinguishes between a "tap" timeout and a "hold" timeout, allowing for two different `Key` values for the same tap count. Signed-off-by: Michael Richters --- tests/plugins/TapDance/basic/basic.ino | 9 +++++++-- tests/plugins/TapDance/basic/test.ktest | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/plugins/TapDance/basic/basic.ino b/tests/plugins/TapDance/basic/basic.ino index 2e7f342f..9e0af88d 100644 --- a/tests/plugins/TapDance/basic/basic.ino +++ b/tests/plugins/TapDance/basic/basic.ino @@ -46,8 +46,13 @@ void tapDanceAction(uint8_t tap_dance_index, kaleidoscope::plugin::TapDance::ActionType tap_dance_action) { switch (tap_dance_index) { case 0: - return tapDanceActionKeys(tap_count, tap_dance_action, - Key_A, Key_B, Key_C); + if (tap_dance_action == TapDance.Hold) { + return tapDanceActionKeys(tap_count, tap_dance_action, + Key_A, Key_H, Key_C); + } else { + return tapDanceActionKeys(tap_count, tap_dance_action, + Key_A, Key_B, Key_C); + } default: break; } diff --git a/tests/plugins/TapDance/basic/test.ktest b/tests/plugins/TapDance/basic/test.ktest index 3c7c208e..f7495c6b 100644 --- a/tests/plugins/TapDance/basic/test.ktest +++ b/tests/plugins/TapDance/basic/test.ktest @@ -89,7 +89,7 @@ RUN 10 ms PRESS TD_0 RUN 1 cycle RUN 25 ms -EXPECT keyboard-report Key_B # The report should contain `B` +EXPECT keyboard-report Key_H # The report should contain `H` RUN 10 ms RELEASE TD_0