diff --git a/tests/issues/970/test.ktest b/tests/issues/970/test.ktest index 977c5b36..ad8b728d 100644 --- a/tests/issues/970/test.ktest +++ b/tests/issues/970/test.ktest @@ -1,25 +1,27 @@ -NAME Issue 970 Qukeys min prior interval overflow +VERSION 1 KEYSWITCH A 2 1 +# ============================================================================== +NAME Issue 970 Qukeys min prior interval overflow + PRESS A RUN 10 ms RELEASE A RUN 1 cycle EXPECT keyboard-report Key_A # Report should contain only `A` -RUN 2 cycles EXPECT keyboard-report empty # Report should be empty RUN 65536 ms PRESS A -RUN 202 ms +RUN 1 cycle +RUN 200 ms # hold timeout is 200 ms +RUN 1 ms EXPECT keyboard-report Key_LeftGui # Report should contain only `LeftGui` RUN 10 ms - RELEASE A -# I'm not sure why it takes 2 cycles before the report is sent -RUN 2 cycles +RUN 1 cycle EXPECT keyboard-report empty # Report should be empty diff --git a/tests/plugins/Qukeys/TapRepeat/test.ktest b/tests/plugins/Qukeys/TapRepeat/test.ktest index 0cb8af66..97a793c5 100644 --- a/tests/plugins/Qukeys/TapRepeat/test.ktest +++ b/tests/plugins/Qukeys/TapRepeat/test.ktest @@ -22,7 +22,7 @@ PRESS A RUN 5 ms RELEASE A -RUN 2 cycles +RUN 1 cycle EXPECT keyboard-report empty # Report should be empty EXPECT keyboard-report Key_A # Report should contain only A @@ -43,8 +43,7 @@ PRESS A RUN 50 ms RELEASE A -# I'm not sure why this takes 2 cycles instead of just one -RUN 2 cycles +RUN 1 cycle EXPECT keyboard-report empty # Report should be empty # ============================================================================== @@ -65,7 +64,7 @@ PRESS J RUN 5 ms RELEASE J -RUN 2 cycles +RUN 1 cycle EXPECT keyboard-report empty # Report should be empty EXPECT keyboard-report Key_J # Report should contain only J @@ -86,8 +85,7 @@ PRESS J RUN 50 ms RELEASE J -# I'm not sure why this takes 2 cycles instead of just one -RUN 2 cycles +RUN 1 cycle EXPECT keyboard-report empty # Report should be empty # ============================================================================== @@ -108,7 +106,7 @@ PRESS B RUN 5 ms RELEASE B -RUN 2 cycles +RUN 1 cycle EXPECT keyboard-report empty # Report should be empty EXPECT keyboard-report Key_B # Report should contain only B @@ -129,6 +127,5 @@ PRESS B RUN 50 ms RELEASE B -# I'm not sure why this takes 2 cycles instead of just one -RUN 2 cycles +RUN 1 cycle EXPECT keyboard-report empty # Report should be empty diff --git a/tests/plugins/Qukeys/basic/basic.ino b/tests/plugins/Qukeys/basic/basic.ino index 74d062d5..769fed17 100644 --- a/tests/plugins/Qukeys/basic/basic.ino +++ b/tests/plugins/Qukeys/basic/basic.ino @@ -65,10 +65,10 @@ KEYMAPS( // *INDENT-ON* // Defining a macro (on the "any" key: see above) to toggle Qukeys on and off -const macro_t *macroAction(uint8_t macro_index, uint8_t key_state) { - switch (macro_index) { +const macro_t *macroAction(uint8_t macro_id, KeyEvent &event) { + switch (macro_id) { case MACRO_TOGGLE_QUKEYS: - if (keyToggledOn(key_state)) + if (keyToggledOn(event.state)) Qukeys.toggle(); break; }