From 45391388dbb57ac34503f4372a38e897d9f43613 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 26 Feb 2017 10:25:21 +0100 Subject: [PATCH] Move the Focus hook into a separate file Signed-off-by: Gergely Nagy --- src/Kaleidoscope-EEPROM-Keymap.h | 1 + src/Kaleidoscope/EEPROM-Keymap-Focus.h | 42 ++++++++++++++++++++++++++ src/Kaleidoscope/EEPROM-Keymap.h | 20 ------------ 3 files changed, 43 insertions(+), 20 deletions(-) create mode 100644 src/Kaleidoscope/EEPROM-Keymap-Focus.h diff --git a/src/Kaleidoscope-EEPROM-Keymap.h b/src/Kaleidoscope-EEPROM-Keymap.h index 77d64c5c..fec376e8 100644 --- a/src/Kaleidoscope-EEPROM-Keymap.h +++ b/src/Kaleidoscope-EEPROM-Keymap.h @@ -19,3 +19,4 @@ #pragma once #include +#include diff --git a/src/Kaleidoscope/EEPROM-Keymap-Focus.h b/src/Kaleidoscope/EEPROM-Keymap-Focus.h new file mode 100644 index 00000000..5e72184d --- /dev/null +++ b/src/Kaleidoscope/EEPROM-Keymap-Focus.h @@ -0,0 +1,42 @@ +/* -*- mode: c++ -*- + * Kaleidoscope-EEPROM-Keymap -- EEPROM-based keymap support. + * Copyright (C) 2017 Gergely Nagy + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include +#include + +#define FOCUS_HOOK_KEYMAP FOCUS_HOOK(EEPROMKeymap.focusKeymap, \ + "keymap.dump\n" \ + "-----------\n" \ + "Dumps the keymap from EEPROM.\n\n" \ + "keymap.upload ...\n" \ + "-------------------------------\n" \ + "Uploads a new keymap to EEPROM." \ + "Starts at layer 0, row 0, column 0, " \ + "and continues as long as there is data on the line.\n\n" \ + "keymap.setPos layer row column flag keyCode\n" \ + "-------------------------------------------\n" \ + "Sets the key at the specified `layer`, `row`, and `column` " \ + "to the key with `flag`, and `keyCode` properties.\n\n" \ + "keymap.getPos layer row column\n" \ + "------------------------------\n" \ + "Dump the key at `layer`, `row`, and `column`.\n\n" \ + "keymap.transfer layer\n" \ + "---------------------\n" \ + "Transfers the `layer` from PROGMEM to EEPROM.") diff --git a/src/Kaleidoscope/EEPROM-Keymap.h b/src/Kaleidoscope/EEPROM-Keymap.h index 92fc2e13..5dedee66 100644 --- a/src/Kaleidoscope/EEPROM-Keymap.h +++ b/src/Kaleidoscope/EEPROM-Keymap.h @@ -21,26 +21,6 @@ #include #include -#define FOCUS_HOOK_KEYMAP FOCUS_HOOK(EEPROMKeymap.focusKeymap, \ - "keymap.dump\n" \ - "-----------\n" \ - "Dumps the keymap from EEPROM.\n\n" \ - "keymap.upload ...\n" \ - "-------------------------------\n" \ - "Uploads a new keymap to EEPROM." \ - "Starts at layer 0, row 0, column 0, " \ - "and continues as long as there is data on the line.\n\n" \ - "keymap.setPos layer row column flag keyCode\n" \ - "-------------------------------------------\n" \ - "Sets the key at the specified `layer`, `row`, and `column` " \ - "to the key with `flag`, and `keyCode` properties.\n\n" \ - "keymap.getPos layer row column\n" \ - "------------------------------\n" \ - "Dump the key at `layer`, `row`, and `column`.\n\n" \ - "keymap.transfer layer\n" \ - "---------------------\n" \ - "Transfers the `layer` from PROGMEM to EEPROM.") - namespace KaleidoscopePlugins { class EEPROMKeymap : public KaleidoscopePlugin { public: