make astyle

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

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

@ -21,7 +21,7 @@
#include <Kaleidoscope.h> #include <Kaleidoscope.h>
namespace KaleidoscopePlugins { namespace KaleidoscopePlugins {
class SpaceCadetShift : public KaleidoscopePlugin { class SpaceCadetShift : public KaleidoscopePlugin {
public: public:
SpaceCadetShift (void); SpaceCadetShift (void);
@ -36,7 +36,7 @@ namespace KaleidoscopePlugins {
static Key leftParen, rightParen; static Key leftParen, rightParen;
static Key eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState); static Key eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState);
}; };
}; };
extern KaleidoscopePlugins::SpaceCadetShift SpaceCadetShift; extern KaleidoscopePlugins::SpaceCadetShift SpaceCadetShift;

Loading…
Cancel
Save