|
|
@ -50,13 +50,13 @@ SpaceCadetShift::eventHandlerHook(Key mappedKey, byte row, byte col, uint8_t key
|
|
|
|
|
|
|
|
|
|
|
|
// If a key has been just toggled on...
|
|
|
|
// If a key has been just toggled on...
|
|
|
|
if (key_toggled_on(keyState)) {
|
|
|
|
if (key_toggled_on(keyState)) {
|
|
|
|
if (mappedKey.raw == Key_LeftShift.raw) { // if it is LShift, remember it
|
|
|
|
if (mappedKey.raw == Key_LeftShift.raw) { // if it is LShift, remember it
|
|
|
|
bitWrite(parenNeeded, 0, 1);
|
|
|
|
bitWrite(parenNeeded, 0, 1);
|
|
|
|
startTime = millis();
|
|
|
|
startTime = millis();
|
|
|
|
} else if (mappedKey.raw == Key_RightShift.raw) { // if it is RShift, remember it
|
|
|
|
} else if (mappedKey.raw == Key_RightShift.raw) { // if it is RShift, remember it
|
|
|
|
bitWrite(parenNeeded, 1, 1);
|
|
|
|
bitWrite(parenNeeded, 1, 1);
|
|
|
|
startTime = millis();
|
|
|
|
startTime = millis();
|
|
|
|
} else { // if it is something else, we do not need a paren at the end.
|
|
|
|
} else { // if it is something else, we do not need a paren at the end.
|
|
|
|
parenNeeded = 0;
|
|
|
|
parenNeeded = 0;
|
|
|
|
startTime = 0;
|
|
|
|
startTime = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|