Add back simulateKeypresses.
This commit is contained in:
Submodule lib/agent updated: 32d9635b34...15df8d7129
@@ -323,17 +323,17 @@ static void updateActiveUsbReports(void)
|
|||||||
bool layerGotReleased = previousLayer != LayerId_Base && activeLayer == LayerId_Base;
|
bool layerGotReleased = previousLayer != LayerId_Base && activeLayer == LayerId_Base;
|
||||||
LedDisplay_SetLayer(activeLayer);
|
LedDisplay_SetLayer(activeLayer);
|
||||||
|
|
||||||
|
static bool simulateKeypresses = false;
|
||||||
static bool isEven = false;
|
static bool isEven = false;
|
||||||
static bool isEvenMedia = false;
|
static bool isEvenMedia = false;
|
||||||
static uint32_t mediaCounter = 0;
|
static uint32_t mediaCounter = 0;
|
||||||
|
|
||||||
key_state_t *testKeyState = &KeyStates[SlotId_LeftKeyboardHalf][0];
|
key_state_t *testKeyState = &KeyStates[SlotId_LeftKeyboardHalf][0];
|
||||||
if (!testKeyState->previous && testKeyState->current && activeLayer == LayerId_Fn) {
|
if (TestUsbStack && !testKeyState->previous && testKeyState->current && activeLayer == LayerId_Fn) {
|
||||||
TestUsbStack = !TestUsbStack;
|
simulateKeypresses = !simulateKeypresses;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TestUsbStack) {
|
if (simulateKeypresses) {
|
||||||
isEven = !isEven;
|
isEven = !isEven;
|
||||||
ActiveUsbBasicKeyboardReport->scancodes[basicScancodeIndex++] = isEven ? HID_KEYBOARD_SC_A : HID_KEYBOARD_SC_BACKSPACE;
|
ActiveUsbBasicKeyboardReport->scancodes[basicScancodeIndex++] = isEven ? HID_KEYBOARD_SC_A : HID_KEYBOARD_SC_BACKSPACE;
|
||||||
if (++mediaCounter % 200 == 0) {
|
if (++mediaCounter % 200 == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user