From 7430281ea13068d8966314b3932143e940556c2a Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sun, 5 Jan 2014 20:27:06 -0500 Subject: [PATCH] reenable build with arduino ui --- ArduinoKeyboard.ino | 2 +- Makefile | 5 +++-- layouts-generated.h => keymaps_generated.h | 16 ++++++++++++++++ keymaps.h => keymaps_h-template | 1 - 4 files changed, 20 insertions(+), 4 deletions(-) rename layouts-generated.h => keymaps_generated.h (97%) rename keymaps.h => keymaps_h-template (88%) diff --git a/ArduinoKeyboard.ino b/ArduinoKeyboard.ino index 49e8dae8..c773d358 100644 --- a/ArduinoKeyboard.ino +++ b/ArduinoKeyboard.ino @@ -57,7 +57,7 @@ float carriedOverX =0; float carriedOverY =0; -#include "keymaps.h" +#include "keymaps_generated.h" #define EEPROM_LAYER_LOCATION 0 diff --git a/Makefile b/Makefile index 7c77934f..813c19fd 100644 --- a/Makefile +++ b/Makefile @@ -12,5 +12,6 @@ astyle: astyle --style=linux ArduinoKeyboard.ino *.h generate-keymaps: - -rm layouts-generated.h - cd layouts && ( find . -type f |xargs -n 1 -I % sh -c 'perl ../tools/generate_keymaps.pl < % >> ../layouts-generated.h' ) + -rm keymaps_generated.h + cd layouts && ( find . -type f |xargs -n 1 -I % sh -c 'perl ../tools/generate_keymaps.pl < % >> ../keymaps_generated.h' ) + cat keymaps_h-template >> keymaps_generated.h diff --git a/layouts-generated.h b/keymaps_generated.h similarity index 97% rename from layouts-generated.h rename to keymaps_generated.h index ac9761a8..afe43e4f 100644 --- a/layouts-generated.h +++ b/keymaps_generated.h @@ -58,3 +58,19 @@ {Key_PageDn, Key_Keymap0, Key_mouseBtnL, Key_mouseBtnM, Key_mouseBtnR, Key_NoKey, Key_Esc, Key_Enter, Key_Pipe, Key_NoKey, Key_Comma, Key_Period, Key_Backslash, Key_Minus},\ {Key_LGUI, Key_Backspace, Key_LShift, Key_LCtrl, Key_NoKey, Key_skip, Key_skip, Key_skip, Key_skip, Key_NoKey, Key_RCtrl, Key_RShift, Key_Space, Key_RAlt},\ }, +#define LAYERS 8 +static const Key keymaps[LAYERS][ROWS][COLS] = { + KEYMAP_QWERTY + KEYMAP_QWERTY_FN2 + KEYMAP_COLEMAK + KEYMAP_COLEMAK_FN2 + KEYMAP_DVORAK + KEYMAP_DVORAK_FN2 + KEYMAP_WORKMAN + KEYMAP_WORKMAN_FN2 + + + + +}; + diff --git a/keymaps.h b/keymaps_h-template similarity index 88% rename from keymaps.h rename to keymaps_h-template index f72c53d4..a4ee1e8a 100644 --- a/keymaps.h +++ b/keymaps_h-template @@ -1,4 +1,3 @@ -#include "layouts-generated.h" #define LAYERS 8 static const Key keymaps[LAYERS][ROWS][COLS] = { KEYMAP_QWERTY