Simplify our keymap generation

pull/18/head
Jesse Vincent 9 years ago
parent ca29544ff6
commit 3eb491ca69

@ -1,6 +1,8 @@
#pragma once #pragma once
#include "WS2812.h" #include "WS2812.h"
#include "generated/keymaps.h"
#define EEPROM_KEYMAP_LOCATION 0 #define EEPROM_KEYMAP_LOCATION 0
#define MODEL01 true #define MODEL01 true
@ -38,6 +40,9 @@ int right_rowpins[]= {8,9,10,11};
#define COLS 16 #define COLS 16
#define ROWS 4 #define ROWS 4
#define KEYMAPS 3
#define NUMPAD_KEYMAP 2
#define KEYMAP_LIST KEYMAP_QWERTY KEYMAP_GENERIC_FN2 KEYMAP_NUMPAD
#endif #endif

@ -35,6 +35,7 @@ char x;
char y; char y;
byte matrixState[ROWS][COLS]; byte matrixState[ROWS][COLS];
static const Key keymaps[KEYMAPS][ROWS][COLS] = { KEYMAP_LIST };
long reporting_counter = 0; long reporting_counter = 0;
byte primary_keymap = 0; byte primary_keymap = 0;

@ -37,7 +37,6 @@ astyle:
generate-keymaps: generate-keymaps:
-rm generated/keymaps.h -rm generated/keymaps.h
cd layouts && ( find . -type f |xargs -n 1 -I % sh -c 'perl ../tools/generate_keymaps.pl < % >> ../generated/keymaps.h' ) cd layouts && ( find . -type f |xargs -n 1 -I % sh -c 'perl ../tools/generate_keymaps.pl < % >> ../generated/keymaps.h' )
cat keymaps_h-template >> generated/keymaps.h
dirs: dirs:
mkdir -p $(OUTPUT_PATH) mkdir -p $(OUTPUT_PATH)

@ -57,11 +57,3 @@
{Key_PageDn, Key_Z, Key_X, Key_M, Key_C, Key_V, Key_Esc, Key_Keymap0, Key_K, Key_L, Key_Comma, Key_Period, Key_Slash, Key_Minus},\ {Key_PageDn, Key_Z, Key_X, Key_M, Key_C, Key_V, Key_Esc, Key_Keymap0, Key_K, Key_L, Key_Comma, Key_Period, Key_Slash, Key_Minus},\
{Key_LGUI, Key_Backspace, Key_LShift, Key_LCtrl, Key_KeymapNext_Momentary, Key_skip, Key_skip, Key_skip, Key_skip, Key_KeymapNext_Momentary, Key_RCtrl, Key_RShift, Key_Space, Key_RAlt},\ {Key_LGUI, Key_Backspace, Key_LShift, Key_LCtrl, Key_KeymapNext_Momentary, Key_skip, Key_skip, Key_skip, Key_skip, Key_KeymapNext_Momentary, Key_RCtrl, Key_RShift, Key_Space, Key_RAlt},\
}, },
#define KEYMAPS 3
#define NUMPAD_KEYMAP 2
static const Key keymaps[KEYMAPS][ROWS][COLS] = {
KEYMAP_QWERTY
KEYMAP_GENERIC_FN2
KEYMAP_NUMPAD
};

@ -1,8 +0,0 @@
#define KEYMAPS 3
#define NUMPAD_KEYMAP 2
static const Key keymaps[KEYMAPS][ROWS][COLS] = {
KEYMAP_QWERTY
KEYMAP_GENERIC_FN2
KEYMAP_NUMPAD
};
Loading…
Cancel
Save