make astyle

pull/389/head
Jesse Vincent 8 years ago
parent df8f89924c
commit 80e27ef57a
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -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))

@ -26,7 +26,7 @@
#define SYSTER (Key){ .raw = KaleidoscopePlugins::Ranges::SYSTER }
namespace KaleidoscopePlugins {
class Syster : public KaleidoscopePlugin {
class Syster : public KaleidoscopePlugin {
public:
typedef enum {
StartAction,
@ -45,7 +45,7 @@ namespace KaleidoscopePlugins {
static bool isActive;
static Key eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState);
};
};
};
const char keyToChar (Key key);

Loading…
Cancel
Save