numpad and fn2 layers

pull/18/head
Jesse Vincent 11 years ago
parent 988f7fb99e
commit 4da1f22be5

@ -25,7 +25,7 @@
#include <EEPROM.h> // Don't need this for CLI compilation, but do need it in the IDE #include <EEPROM.h> // Don't need this for CLI compilation, but do need it in the IDE
//extern int usbMaxPower; //extern int usbMaxPower;
#define DEBUG_SERIAL 1
byte matrixState[ROWS][COLS]; byte matrixState[ROWS][COLS];
@ -101,6 +101,10 @@ void scan_matrix()
matrixState[row][col] |= 0; // noop. just here for clarity matrixState[row][col] |= 0; // noop. just here for clarity
} else { } else {
matrixState[row][col] |= 1; // noop. just here for clarity matrixState[row][col] |= 1; // noop. just here for clarity
Serial.write("Got one! - ");
Serial.write(row);
Serial.write(" -- ");
Serial.println(col);
} }
// while we're inspecting the electrical matrix, we look // while we're inspecting the electrical matrix, we look
// to see if the Key being held is a firmware level // to see if the Key being held is a firmware level
@ -120,12 +124,14 @@ void scan_matrix()
void setup() void setup()
{ {
//usbMaxPower = 100; //usbMaxPower = 100;
delay(2500);
Serial.begin(115200); Serial.begin(115200);
Keyboard.begin(); Keyboard.begin();
Mouse.begin(); Mouse.begin();
setup_matrix(); setup_matrix();
setup_pins(); setup_pins();
primary_keymap = load_primary_keymap(); primary_keymap = load_primary_keymap();
Serial.println("HELLO");
} }
void loop() void loop()

@ -4,10 +4,21 @@
#define ROWS 5 #define ROWS 5
#define EEPROM_KEYMAP_LOCATION 0 #define EEPROM_KEYMAP_LOCATION 0
#define MODEL00 true
#ifdef MODEL00
static const byte colPins[COLS] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, A0 }; 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 }; static const byte rowPins[ROWS] = { A5, A4, A3, A2, A1 };
#endif
#ifdef MODEL00bis
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
//#static const byte colPins[COLS] = { 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; //#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 }; //#static const byte rowPins[ROWS] = { A2, A3, A4, A5, 15 };

@ -11,10 +11,10 @@
{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},\ {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},\ #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_LCurlyBracket, Key_RCurlyBracket, Key_LSquareBracket, Key_RSquareBracket, Key_BacklightUp, Key_sleep},\ {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_playPause, Key_LArrow, Key_DnArrow, Key_UpArrow, Key_RArrow, Key_BacklightDn, Key_F11},\ {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_Enter, Key_volumeMute, Key_volumeDown, Key_volumeUp, Key_skip, Key_Backslash, Key_Pipe},\ {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_Delete, Key_mouseBtnL, Key_LGUI, Key_NoKey, Key_skip, Key_skip, Key_skip, Key_skip, Key_NoKey, Key_RAlt, Key_mouseBtnR, Key_Return, Key_RCtrl},\ {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},\ #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_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},\
@ -22,10 +22,10 @@
{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_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},\ {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_7, Key_8, Key_9, Key_skip, Key_skip},\ #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_mouseWarpNW, Key_mouseWarpNE, Key_skip, Key_skip, Key_skip, Key_skip, Key_4, Key_5, Key_6, Key_Minus, 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_mouseWarpSW, Key_mouseWarpSE, Key_skip, Key_Tab, Key_Return, Key_skip, Key_1, Key_2, Key_3, Key_Keymap0, Key_Equals},\ {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_mouseWarpEnd, Key_Keymap0, Key_skip, Key_0, Key_Comma, Key_Period, Key_Enter, Key_skip},\ {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},\ {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},\ #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},\

@ -1,6 +1,6 @@
#NAME: GENERIC_FN2 #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 F10 skip
Tab mouseBtnM mouseUp skip mouseWarpNW mouseWarpNE NoKey NoKey { } [ ] BacklightUp sleep Tab mouseBtnM mouseUp skip mouseWarpNW mouseWarpNE NoKey NoKey playPause { } [ ] sleep
Home mouseL mouseDn mouseR mouseWarpSW mouseWarpSE nextTrack playPause LArrow DnArrow UpArrow RArrow BacklightDn F11 Home mouseL mouseDn mouseR mouseWarpSW mouseWarpSE nextTrack Delete LArrow DnArrow UpArrow RArrow F11 F12
End Z X C V mouseWarpEnd prevTrack Enter volumeMute volumeDown volumeUp skip \ | End Z X C V mouseWarpEnd prevTrack volumeMute volumeDown volumeUp BacklightDn BacklightUp \ |
LCtrl Delete mouseBtnL LGUI NoKey skip skip skip skip NoKey RAlt mouseBtnR Return RCtrl LCtrl mouseBtnL LShift LGUI NoKey skip skip skip skip NoKey RAlt RShift mouseBtnR RCtrl

@ -1,6 +1,6 @@
#NAME: NUMPAD #NAME: NUMPAD
skip skip skip skip skip skip skip skip skip 7 8 9 skip skip skip skip skip skip skip skip skip skip skip Keypad7 Keypad8 Keypad9 KeypadMinus skip
skip skip skip mouseWarpNW mouseWarpNE skip skip skip skip 4 5 6 - skip skip skip skip skip skip skip skip skip skip Keypad4 Keypad5 Keypad6 KeypadPlus skip
PageUp skip skip mouseWarpSW mouseWarpSE skip Tab Return skip 1 2 3 Keymap0 = PageUp skip skip skip skip skip Tab Return skip Keypad1 Keypad2 Keypad3 Equals
PageDn skip skip skip skip skip mouseWarpEnd Keymap0 skip 0 , . Enter skip PageDn skip skip skip skip skip Esc Keymap0 skip Keypad0 KeypadDot KeypadMultiply KeypadSlash Enter
LGUI Backspace LShift LCtrl skip skip skip skip skip skip RCtrl RShift Space RAlt LGUI Backspace LShift LCtrl skip skip skip skip skip skip RCtrl RShift Space RAlt

Loading…
Cancel
Save