Maintain the states of previous key states.
This commit is contained in:
@@ -139,11 +139,8 @@ void UpdateActiveUsbReports(void)
|
|||||||
|
|
||||||
for (uint8_t slotId=0; slotId<SLOT_COUNT; slotId++) {
|
for (uint8_t slotId=0; slotId<SLOT_COUNT; slotId++) {
|
||||||
for (uint8_t keyId=0; keyId<MAX_KEY_COUNT_PER_MODULE; keyId++) {
|
for (uint8_t keyId=0; keyId<MAX_KEY_COUNT_PER_MODULE; keyId++) {
|
||||||
|
key_state_t keyState = KeyStates[slotId][keyId];
|
||||||
if (!KeyStates[slotId][keyId].current) {
|
if (keyState.current) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
key_action_t action = CurrentKeymap[activeLayer][slotId][keyId];
|
key_action_t action = CurrentKeymap[activeLayer][slotId][keyId];
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case KeyActionType_Keystroke:
|
case KeyActionType_Keystroke:
|
||||||
@@ -178,6 +175,8 @@ void UpdateActiveUsbReports(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
keyState.previous = keyState.current;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When a layer switcher key gets pressed along with another key that produces some modifiers
|
// When a layer switcher key gets pressed along with another key that produces some modifiers
|
||||||
|
|||||||
Reference in New Issue
Block a user