From 5b32c0da43dcae8df6babe3b58d2b3072bd47dec Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Sat, 30 Jun 2018 23:42:39 +0200 Subject: [PATCH] Disable the key press test code --- right/src/usb_report_updater.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/right/src/usb_report_updater.c b/right/src/usb_report_updater.c index d294d89..a9fda2b 100644 --- a/right/src/usb_report_updater.c +++ b/right/src/usb_report_updater.c @@ -292,8 +292,6 @@ static uint8_t secondaryRoleState = SecondaryRoleState_Released; static uint8_t secondaryRoleSlotId; static uint8_t secondaryRoleKeyId; static secondary_role_t secondaryRole; -static bool simulateKeypresses = false; -static bool sendChar = false; static void updateActiveUsbReports(void) { @@ -328,6 +326,10 @@ static void updateActiveUsbReports(void) bool layerGotReleased = previousLayer != LayerId_Base && activeLayer == LayerId_Base; LedDisplay_SetLayer(activeLayer); +#if 0 // Used to toggle key presses at the maximum rate - this was used to reproduce: https://github.com/UltimateHackingKeyboard/firmware/issues/122 + static bool simulateKeypresses = false; + static bool sendChar = false; + key_state_t *testKeyState = &KeyStates[SlotId_LeftKeyboardHalf][0]; if (!testKeyState->previous && testKeyState->current && activeLayer == LayerId_Fn) { simulateKeypresses = !simulateKeypresses; @@ -337,6 +339,7 @@ static void updateActiveUsbReports(void) sendChar = !sendChar; ActiveUsbBasicKeyboardReport->scancodes[basicScancodeIndex++] = sendChar ? HID_KEYBOARD_SC_A : HID_KEYBOARD_SC_BACKSPACE; } +#endif for (uint8_t slotId=0; slotId