Merge test code
This commit is contained in:
@@ -285,6 +285,8 @@ 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)
|
||||
{
|
||||
@@ -319,6 +321,16 @@ static void updateActiveUsbReports(void)
|
||||
return;
|
||||
}
|
||||
|
||||
key_state_t *testKeyState = &KeyStates[SlotId_LeftKeyboardHalf][0];
|
||||
if (!testKeyState->previous && testKeyState->current && activeLayer == LayerId_Fn) {
|
||||
simulateKeypresses = !simulateKeypresses;
|
||||
}
|
||||
|
||||
if (simulateKeypresses) {
|
||||
sendChar = !sendChar;
|
||||
ActiveUsbBasicKeyboardReport->scancodes[basicScancodeIndex++] = sendChar ? HID_KEYBOARD_SC_A : HID_KEYBOARD_SC_B;
|
||||
}
|
||||
|
||||
for (uint8_t slotId=0; slotId<SLOT_COUNT; slotId++) {
|
||||
for (uint8_t keyId=0; keyId<MAX_KEY_COUNT_PER_MODULE; keyId++) {
|
||||
key_state_t *keyState = &KeyStates[slotId][keyId];
|
||||
|
||||
Reference in New Issue
Block a user