From a5b86bea5a597d6f6ddd1efe62a493727131529b Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 19 Jul 2018 21:19:47 -0700 Subject: Add a Caps lock key on Fn-Let by default. Enough customers want a caps lock that we ought to give them -something- in the default firmware --- Model01-Firmware.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Model01-Firmware.ino') diff --git a/Model01-Firmware.ino b/Model01-Firmware.ino index e58df7f..87cfc09 100644 --- a/Model01-Firmware.ino +++ b/Model01-Firmware.ino @@ -167,7 +167,7 @@ KEYMAPS( ___), [FUNCTION] = KEYMAP_STACKED - (___, Key_F1, Key_F2, Key_F3, Key_F4, Key_F5, XXX, + (___, Key_F1, Key_F2, Key_F3, Key_F4, Key_F5, Key_CapsLock, Key_Tab, ___, Key_mouseUp, ___, Key_mouseBtnR, Key_mouseWarpEnd, Key_mouseWarpNE, Key_Home, Key_mouseL, Key_mouseDn, Key_mouseR, Key_mouseBtnL, Key_mouseWarpNW, Key_End, Key_PrintScreen, Key_Insert, ___, Key_mouseBtnM, Key_mouseWarpSW, Key_mouseWarpSE, -- cgit v1.2.3 From 8526858c38da0105258c6543bad94d38a5c804e3 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 19 Jul 2018 22:12:36 -0700 Subject: Make it easier to switch to COLEMAK/DVORAK/CUSTOM layouts --- Model01-Firmware.ino | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 3 deletions(-) (limited to 'Model01-Firmware.ino') diff --git a/Model01-Firmware.ino b/Model01-Firmware.ino index 87cfc09..1d16fdb 100644 --- a/Model01-Firmware.ino +++ b/Model01-Firmware.ino @@ -126,7 +126,28 @@ enum { MACRO_VERSION_INFO, * */ -enum { QWERTY, NUMPAD, FUNCTION }; // layers +enum { PRIMARY, NUMPAD, FUNCTION }; // layers + + +/** + * To change your keyboard's layout from QWERTY to DVORAK or COLEMAK, comment out the line + * + * #define PRIMARY_KEYMAP_QWERTY + * + * by changing it to + * + * // #define PRIMARY_KEYMAP_QWERTY + * + * Then uncomment the line corresponding to the layout you want to use. + * + */ + +#define PRIMARY_KEYMAP_QWERTY +// #define PRIMARY_KEYMAP_COLEMAK +// #define PRIMARY_KEYMAP_DVORAK +// #define PRIMARY_KEYMAP_CUSTOM + + /* This comment temporarily turns off astyle's indent enforcement * so we can make the keymaps actually resemble the physical key layout better @@ -135,7 +156,59 @@ enum { QWERTY, NUMPAD, FUNCTION }; // layers KEYMAPS( - [QWERTY] = KEYMAP_STACKED +#if defined (PRIMARY_KEYMAP_QWERTY) + [PRIMARY] = KEYMAP_STACKED + (___, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext, + Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab, + Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G, + Key_PageDown, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Escape, + Key_LeftControl, Key_Backspace, Key_LeftGui, Key_LeftShift, + ShiftToLayer(FUNCTION), + + M(MACRO_ANY), Key_6, Key_7, Key_8, Key_9, Key_0, LockLayer(NUMPAD), + Key_Enter, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals, + Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote, + Key_RightAlt, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus, + Key_RightShift, Key_LeftAlt, Key_Spacebar, Key_RightControl, + ShiftToLayer(FUNCTION)), + +#elif defined (PRIMARY_KEYMAP_DVORAK) + + [PRIMARY] = KEYMAP_STACKED + (___, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext, + Key_Backtick, Key_Quote, Key_Comma, Key_Period, Key_P, Key_Y, Key_Tab, + Key_PageUp, Key_A, Key_O, Key_E, Key_U, Key_I, + Key_PageDown, Key_Semicolon, Key_Q, Key_J, Key_K, Key_X, Key_Escape, + Key_LeftControl, Key_Backspace, Key_LeftGui, Key_LeftShift, + ShiftToLayer(FUNCTION), + + M(MACRO_ANY), Key_6, Key_7, Key_8, Key_9, Key_0, LockLayer(NUMPAD), + Key_Enter, Key_F, Key_G, Key_C, Key_R, Key_L, Key_Slash, + Key_D, Key_H, Key_T, Key_N, Key_S, Key_Minus, + Key_RightAlt, Key_B, Key_M, Key_W, Key_V, Key_Z, Key_Equals, + Key_RightShift, Key_LeftAlt, Key_Spacebar, Key_RightControl, + ShiftToLayer(FUNCTION)), + +#elif defined (PRIMARY_KEYMAP_COLEMAK) + + [PRIMARY] = KEYMAP_STACKED + (___, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext, + Key_Backtick, Key_Q, Key_W, Key_F, Key_P, Key_G, Key_Tab, + Key_PageUp, Key_A, Key_R, Key_S, Key_T, Key_D, + Key_PageDown, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Escape, + Key_LeftControl, Key_Backspace, Key_LeftGui, Key_LeftShift, + ShiftToLayer(FUNCTION), + + M(MACRO_ANY), Key_6, Key_7, Key_8, Key_9, Key_0, LockLayer(NUMPAD), + Key_Enter, Key_J, Key_L, Key_U, Key_Y, Key_Semicolon, Key_Equals, + Key_H, Key_N, Key_E, Key_I, Key_O, Key_Quote, + Key_RightAlt, Key_K, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus, + Key_RightShift, Key_LeftAlt, Key_Spacebar, Key_RightControl, + ShiftToLayer(FUNCTION)), + +#elif defined (PRIMARY_KEYMAP_CUSTOM) + // Edit this keymap to make a custom layout + [PRIMARY] = KEYMAP_STACKED (___, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext, Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab, Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G, @@ -150,6 +223,13 @@ KEYMAPS( Key_RightShift, Key_LeftAlt, Key_Spacebar, Key_RightControl, ShiftToLayer(FUNCTION)), +#else + +#error "No default keymap defined. You should make sure that you have a line like '#define PRIMARY_KEYMAP_QWERTY' in your sketch" + +#endif + + [NUMPAD] = KEYMAP_STACKED (___, ___, ___, ___, ___, ___, ___, @@ -180,7 +260,6 @@ KEYMAPS( Key_PcApplication, Consumer_Mute, Consumer_VolumeDecrement, Consumer_VolumeIncrement, ___, Key_Backslash, Key_Pipe, ___, ___, Key_Enter, ___, ___) - ) // KEYMAPS( /* Re-enable astyle's indent enforcement */ -- cgit v1.2.3 From 87b7497f25beecd5b999baaa3d1df39099a19154 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 19 Jul 2018 22:39:54 -0700 Subject: astyle --- Model01-Firmware.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Model01-Firmware.ino') diff --git a/Model01-Firmware.ino b/Model01-Firmware.ino index 1d16fdb..23ecf4c 100644 --- a/Model01-Firmware.ino +++ b/Model01-Firmware.ino @@ -131,13 +131,13 @@ enum { PRIMARY, NUMPAD, FUNCTION }; // layers /** * To change your keyboard's layout from QWERTY to DVORAK or COLEMAK, comment out the line - * + * * #define PRIMARY_KEYMAP_QWERTY - * + * * by changing it to - * + * * // #define PRIMARY_KEYMAP_QWERTY - * + * * Then uncomment the line corresponding to the layout you want to use. * */ -- cgit v1.2.3