|
|
|
@ -21,35 +21,35 @@
|
|
|
|
|
using namespace KaleidoscopePlugins::Ranges;
|
|
|
|
|
|
|
|
|
|
namespace KaleidoscopePlugins {
|
|
|
|
|
// --- state ---
|
|
|
|
|
char Syster::symbol[SYSTER_MAX_SYMBOL_LENGTH + 1];
|
|
|
|
|
uint8_t Syster::symbolPos;
|
|
|
|
|
bool Syster::isActive;
|
|
|
|
|
// --- state ---
|
|
|
|
|
char Syster::symbol[SYSTER_MAX_SYMBOL_LENGTH + 1];
|
|
|
|
|
uint8_t Syster::symbolPos;
|
|
|
|
|
bool Syster::isActive;
|
|
|
|
|
|
|
|
|
|
// --- helpers ---
|
|
|
|
|
// --- helpers ---
|
|
|
|
|
|
|
|
|
|
#define isSyster(k) (k == SYSTER)
|
|
|
|
|
|
|
|
|
|
// --- api ---
|
|
|
|
|
// --- api ---
|
|
|
|
|
|
|
|
|
|
Syster::Syster (void) {
|
|
|
|
|
}
|
|
|
|
|
Syster::Syster (void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
Syster::begin (void) {
|
|
|
|
|
void
|
|
|
|
|
Syster::begin (void) {
|
|
|
|
|
event_handler_hook_use (this->eventHandlerHook);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
Syster::reset (void) {
|
|
|
|
|
void
|
|
|
|
|
Syster::reset (void) {
|
|
|
|
|
symbolPos = 0;
|
|
|
|
|
symbol[0] = 0;
|
|
|
|
|
isActive = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --- hooks ---
|
|
|
|
|
Key
|
|
|
|
|
Syster::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) {
|
|
|
|
|
// --- hooks ---
|
|
|
|
|
Key
|
|
|
|
|
Syster::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) {
|
|
|
|
|
if (!isActive) {
|
|
|
|
|
if (!isSyster (mappedKey))
|
|
|
|
|
return mappedKey;
|
|
|
|
@ -101,7 +101,7 @@ namespace KaleidoscopePlugins {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return mappedKey;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
__attribute__((weak))
|
|
|
|
|