astyle with current project style guidelines

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

@ -61,11 +61,11 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
}; };
void setup () { void setup() {
Kaleidoscope.use (&OneShot, &EscapeOneShot, NULL); Kaleidoscope.use(&OneShot, &EscapeOneShot, NULL);
Kaleidoscope.setup (KEYMAP_SIZE); Kaleidoscope.setup(KEYMAP_SIZE);
} }
void loop () { void loop() {
Kaleidoscope.loop (); Kaleidoscope.loop();
} }

@ -22,25 +22,25 @@
namespace KaleidoscopePlugins { namespace KaleidoscopePlugins {
EscapeOneShot::EscapeOneShot (void) { EscapeOneShot::EscapeOneShot(void) {
} }
void void
EscapeOneShot::begin (void) { EscapeOneShot::begin(void) {
event_handler_hook_use (eventHandlerHook); event_handler_hook_use(eventHandlerHook);
} }
Key Key
EscapeOneShot::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) { EscapeOneShot::eventHandlerHook(Key mappedKey, byte row, byte col, uint8_t keyState) {
if (mappedKey.raw != Key_Escape.raw || if (mappedKey.raw != Key_Escape.raw ||
(keyState & INJECTED) || (keyState & INJECTED) ||
!key_toggled_on (keyState)) !key_toggled_on(keyState))
return mappedKey; return mappedKey;
if (!OneShot::isActive ()) if (!OneShot::isActive())
return mappedKey; return mappedKey;
OneShot::cancel (); OneShot::cancel();
return Key_NoKey; return Key_NoKey;
} }

@ -21,12 +21,12 @@
namespace KaleidoscopePlugins { namespace KaleidoscopePlugins {
class EscapeOneShot : public KaleidoscopePlugin { class EscapeOneShot : public KaleidoscopePlugin {
public: public:
EscapeOneShot (void); EscapeOneShot(void);
virtual void begin (void) final; virtual void begin(void) final;
private: private:
static Key eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState); static Key eventHandlerHook(Key mappedKey, byte row, byte col, uint8_t keyState);
}; };
}; };

Loading…
Cancel
Save