Add an onFocusEvent method, to implement "help"

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/365/head
Gergely Nagy 6 years ago
parent 80566ca5a1
commit 067e6e5a93

@ -68,6 +68,11 @@ bool FocusSerial::handleHelp(const char *command,
return true; return true;
} }
EventHandlerResult FocusSerial::onFocusEvent(const char *command) {
handleHelp(command, PSTR("help"));
return EventHandlerResult::OK;
}
void FocusSerial::printSpace(void) { void FocusSerial::printSpace(void) {
Serial.print(F(" ")); Serial.print(F(" "));
} }

@ -42,6 +42,7 @@ class FocusSerial : public kaleidoscope::Plugin {
return EventHandlerResult::OK; return EventHandlerResult::OK;
} }
EventHandlerResult beforeReportingState(); EventHandlerResult beforeReportingState();
EventHandlerResult onFocusEvent(const char *command);
private: private:
static char command_[32]; static char command_[32];

Loading…
Cancel
Save