From 0164d7e09233d2aa5a908b57076c4bb0da122d57 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sat, 26 Jul 2014 16:34:40 -0700 Subject: [PATCH] for piers --- KeyboardConfig.h | 36 +++++++++++++++++++++++++--- keymaps_generated.h | 57 ++++++--------------------------------------- keymaps_h-template | 12 +++------- layouts/generic_fn2 | 2 +- 4 files changed, 44 insertions(+), 63 deletions(-) diff --git a/KeyboardConfig.h b/KeyboardConfig.h index 41056d6c..6f7b8ee3 100644 --- a/KeyboardConfig.h +++ b/KeyboardConfig.h @@ -1,24 +1,54 @@ //#define DEBUG_SERIAL false -#define COLS 14 -#define ROWS 5 #define EEPROM_KEYMAP_LOCATION 0 -#define MODEL00 true +#define MODEL00piers true #ifdef MODEL00 +#define COLS 14 +#define ROWS 5 static const byte colPins[COLS] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, A0 }; static const byte rowPins[ROWS] = { A5, A4, A3, A2, A1 }; #endif #ifdef MODEL00bis +#define COLS 14 +#define ROWS 5 static const byte colPins[COLS] = { 0,1, 2, 3, 4, 5,6,7, 8, 9, 10,11,12, A0}; static const byte rowPins[ROWS] = { A1,A2,A3,A4,A5}; #endif +#ifdef MODEL00piers +#define COLS 16 +#define ROWS 5 + +static const byte colPins[COLS] = { + + 3, + A4, + A5, + MISO, + SCK, + + MOSI, + 1, + 2, + 4, + 5, + 7, + 8, + 9, + 10, + 0, + 12, +}; +static const byte rowPins[ROWS] = { A0, A1,A2,A3 }; + + +#endif //#static const byte colPins[COLS] = { 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; //#static const byte rowPins[ROWS] = { A2, A3, A4, A5, 15 }; diff --git a/keymaps_generated.h b/keymaps_generated.h index 5b26af67..3c12e203 100644 --- a/keymaps_generated.h +++ b/keymaps_generated.h @@ -1,56 +1,13 @@ -#define KEYMAP_COLEMAK { /* Generated keymap for COLEMAK */ {Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip},\ - {Key_Backtick, Key_Q, Key_W, Key_F, Key_P, Key_G, Key_skip, Key_skip, Key_J, Key_L, Key_U, Key_Y, Key_Semicolon, Key_Equals},\ - {Key_PageUp, Key_A, Key_R, Key_S, Key_T, Key_D, Key_Tab, Key_Return, Key_H, Key_N, Key_E, Key_I, Key_O, Key_Quote},\ - {Key_PageDn, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Esc, Key_Keymap2, Key_K, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus},\ - {Key_LCtrl, Key_Backspace, Key_LShift, Key_LGUI, Key_KeymapNext_Momentary, Key_skip, Key_skip, Key_skip, Key_skip, Key_KeymapNext_Momentary, Key_RAlt, Key_RShift, Key_Space, Key_RCtrl},\ +#define KEYMAP_QWERTY_PIERS { /* Generated keymap for QWERTY_PIERS */ {Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_LCtrl, Key_RCtrl, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip},\ + {Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab, Key_Return, Key_Backspace, Key_Space, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals},\ + {Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G, Key_Esc, Key_LShift, Key_RShift, Key_Keymap2_Momentary, Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote},\ + {Key_PageDn, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_KeymapNext_Momentary, Key_LGUI, Key_RAlt, Key_KeymapNext_Momentary, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus},\ }, -#define KEYMAP_DVORAK { /* Generated keymap for DVORAK */ {Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip},\ - {Key_Backtick, Key_Quote, Key_Comma, Key_Period, Key_P, Key_Y, Key_skip, Key_skip, Key_F, Key_G, Key_C, Key_R, Key_L, Key_Slash},\ - {Key_PageUp, Key_A, Key_O, Key_E, Key_U, Key_I, Key_Tab, Key_Return, Key_D, Key_H, Key_T, Key_N, Key_S, Key_Minus},\ - {Key_PageDn, Key_Semicolon, Key_Q, Key_J, Key_K, Key_X, Key_Esc, Key_Keymap2, Key_B, Key_M, Key_W, Key_V, Key_Z, Key_Equals},\ - {Key_LCtrl, Key_Backspace, Key_LShift, Key_LGUI, Key_KeymapNext_Momentary, Key_skip, Key_skip, Key_skip, Key_skip, Key_KeymapNext_Momentary, Key_RAlt, Key_RShift, Key_Space, Key_RCtrl},\ -}, -#define KEYMAP_GENERIC_FN2 { /* Generated keymap for GENERIC_FN2 */ {Key_skip, Key_F1, Key_F2, Key_F3, Key_F4, Key_F5, Key_NoKey, Key_NoKey, Key_F6, Key_F7, Key_F8, Key_F9, Key_F10, Key_skip},\ - {Key_Tab, Key_mouseBtnM, Key_mouseUp, Key_skip, Key_mouseWarpNW, Key_mouseWarpNE, Key_NoKey, Key_NoKey, Key_playPause, Key_LCurlyBracket, Key_RCurlyBracket, Key_LSquareBracket, Key_RSquareBracket, Key_sleep},\ - {Key_Home, Key_mouseL, Key_mouseDn, Key_mouseR, Key_mouseWarpSW, Key_mouseWarpSE, Key_nextTrack, Key_Delete, Key_LArrow, Key_DnArrow, Key_UpArrow, Key_RArrow, Key_F11, Key_F12},\ - {Key_End, Key_Z, Key_X, Key_C, Key_V, Key_mouseWarpEnd, Key_prevTrack, Key_volumeMute, Key_volumeDown, Key_volumeUp, Key_BacklightDn, Key_BacklightUp, Key_Backslash, Key_Pipe},\ - {Key_LCtrl, Key_mouseBtnL, Key_LShift, Key_LGUI, Key_NoKey, Key_skip, Key_skip, Key_skip, Key_skip, Key_NoKey, Key_RAlt, Key_RShift, Key_mouseBtnR, Key_RCtrl},\ -}, -#define KEYMAP_MALTRON { /* Generated keymap for MALTRON */ {Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip},\ - {Key_Backtick, Key_Q, Key_P, Key_Y, Key_C, Key_B, Key_skip, Key_skip, Key_V, Key_M, Key_U, Key_Z, Key_L, Key_Equals},\ - {Key_PageUp, Key_A, Key_N, Key_I, Key_S, Key_F, Key_Tab, Key_Return, Key_D, Key_T, Key_H, Key_O, Key_R, Key_Quote},\ - {Key_PageDn, Key_Comma, Key_Period, Key_J, Key_G, Key_Slash, Key_Esc, Key_Keymap2, Key_Semicolon, Key_W, Key_K, Key_Minus, Key_X, Key_LSquareBracket},\ - {Key_LGUI, Key_E, Key_LShift, Key_Backspace, Key_KeymapNext_Momentary, Key_skip, Key_skip, Key_skip, Key_skip, Key_KeymapNext_Momentary, Key_RCtrl, Key_RShift, Key_Space, Key_RAlt},\ -}, -#define KEYMAP_NUMPAD { /* Generated keymap for NUMPAD */ {Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_Keypad7, Key_Keypad8, Key_Keypad9, Key_KeypadMinus, Key_skip},\ - {Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_Keypad4, Key_Keypad5, Key_Keypad6, Key_KeypadPlus, Key_skip},\ - {Key_PageUp, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_Tab, Key_Return, Key_skip, Key_Keypad1, Key_Keypad2, Key_Keypad3, Key_Equals},\ - {Key_PageDn, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_Esc, Key_Keymap0, Key_skip, Key_Keypad0, Key_KeypadDot, Key_KeypadMultiply, Key_KeypadSlash, Key_Enter},\ - {Key_LGUI, Key_Backspace, Key_LShift, Key_LCtrl, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_RCtrl, Key_RShift, Key_Space, Key_RAlt},\ -}, -#define KEYMAP_QWERTY { /* Generated keymap for QWERTY */ {Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip},\ - {Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_skip, Key_skip, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals},\ - {Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G, Key_Tab, Key_Return, Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote},\ - {Key_PageDn, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Esc, Key_Keymap2, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus},\ - {Key_LCtrl, Key_Backspace, Key_LShift, Key_LGUI, Key_KeymapNext_Momentary, Key_skip, Key_skip, Key_skip, Key_skip, Key_KeymapNext_Momentary, Key_RAlt, Key_RShift, Key_Space, Key_RCtrl},\ -}, -#define KEYMAP_WORKMAN { /* Generated keymap for WORKMAN */ {Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip},\ - {Key_Backtick, Key_Q, Key_D, Key_R, Key_W, Key_B, Key_skip, Key_skip, Key_J, Key_F, Key_U, Key_P, Key_Semicolon, Key_Equals},\ - {Key_PageUp, Key_A, Key_S, Key_H, Key_T, Key_G, Key_Tab, Key_Return, Key_Y, Key_N, Key_E, Key_O, Key_I, Key_Quote},\ - {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},\ -}, -#define KEYMAPS 8 +#define KEYMAPS 2 // This is a total waste. we should only ever include any given keymap once static const Key keymaps[KEYMAPS][ROWS][COLS] = { - KEYMAP_QWERTY - KEYMAP_GENERIC_FN2 - KEYMAP_NUMPAD - KEYMAP_COLEMAK - KEYMAP_GENERIC_FN2 - KEYMAP_DVORAK - KEYMAP_WORKMAN - KEYMAP_GENERIC_FN2 + KEYMAP_QWERTY_PIERS + KEYMAP_QWERTY_PIERS diff --git a/keymaps_h-template b/keymaps_h-template index 755504cf..d5f9b670 100644 --- a/keymaps_h-template +++ b/keymaps_h-template @@ -1,14 +1,8 @@ -#define KEYMAPS 8 +#define KEYMAPS 2 // This is a total waste. we should only ever include any given keymap once static const Key keymaps[KEYMAPS][ROWS][COLS] = { - KEYMAP_QWERTY - KEYMAP_GENERIC_FN2 - KEYMAP_NUMPAD - KEYMAP_COLEMAK - KEYMAP_GENERIC_FN2 - KEYMAP_DVORAK - KEYMAP_WORKMAN - KEYMAP_GENERIC_FN2 + KEYMAP_QWERTY_PIERS + KEYMAP_QWERTY_PIERS diff --git a/layouts/generic_fn2 b/layouts/generic_fn2 index 6aebf1eb..a7658359 100644 --- a/layouts/generic_fn2 +++ b/layouts/generic_fn2 @@ -1,5 +1,5 @@ #NAME: GENERIC_FN2 -skip F1 F2 F3 F4 F5 NoKey NoKey F6 F7 F8 F9 F10 skip +skip F1 F2 F3 F4 F5 NoKey NoKey F6 F7 F8 F9 Keymap0 skip Tab mouseBtnM mouseUp skip mouseWarpNW mouseWarpNE NoKey NoKey playPause { } [ ] sleep Home mouseL mouseDn mouseR mouseWarpSW mouseWarpSE nextTrack Delete LArrow DnArrow UpArrow RArrow F11 F12 End Z X C V mouseWarpEnd prevTrack volumeMute volumeDown volumeUp BacklightDn BacklightUp \ |