|
|
|
@ -20,29 +20,29 @@
|
|
|
|
|
|
|
|
|
|
namespace KaleidoscopePlugins {
|
|
|
|
|
|
|
|
|
|
uint8_t SpaceCadetShift::parenNeeded;
|
|
|
|
|
uint32_t SpaceCadetShift::startTime;
|
|
|
|
|
uint16_t SpaceCadetShift::timeOut = 1000;
|
|
|
|
|
Key SpaceCadetShift::leftParen, SpaceCadetShift::rightParen;
|
|
|
|
|
uint8_t SpaceCadetShift::parenNeeded;
|
|
|
|
|
uint32_t SpaceCadetShift::startTime;
|
|
|
|
|
uint16_t SpaceCadetShift::timeOut = 1000;
|
|
|
|
|
Key SpaceCadetShift::leftParen, SpaceCadetShift::rightParen;
|
|
|
|
|
|
|
|
|
|
SpaceCadetShift::SpaceCadetShift () {
|
|
|
|
|
SpaceCadetShift::SpaceCadetShift () {
|
|
|
|
|
leftParen.raw = Key_9.raw;
|
|
|
|
|
rightParen.raw = Key_0.raw;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
SpaceCadetShift::begin () {
|
|
|
|
|
void
|
|
|
|
|
SpaceCadetShift::begin () {
|
|
|
|
|
event_handler_hook_use (this->eventHandlerHook);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
SpaceCadetShift::configure (Key left, Key right) {
|
|
|
|
|
void
|
|
|
|
|
SpaceCadetShift::configure (Key left, Key right) {
|
|
|
|
|
leftParen = left;
|
|
|
|
|
rightParen = right;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Key
|
|
|
|
|
SpaceCadetShift::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) {
|
|
|
|
|
Key
|
|
|
|
|
SpaceCadetShift::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) {
|
|
|
|
|
// If nothing happened, bail out fast.
|
|
|
|
|
if (!key_is_pressed (keyState) && !key_was_pressed (keyState)) {
|
|
|
|
|
return mappedKey;
|
|
|
|
@ -99,7 +99,7 @@ namespace KaleidoscopePlugins {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return mappedKey;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|