Alpha Chen 2 years ago
parent 02157d30c7
commit a43b89ce51
No known key found for this signature in database

@ -21,7 +21,7 @@
#include "Kaleidoscope-FirmwareVersion.h" #include "Kaleidoscope-FirmwareVersion.h"
// Support for keys that move the mouse // Support for keys that move the mouse
#include "Kaleidoscope-MouseKeys.h" // #include "Kaleidoscope-MouseKeys.h"
// Support for macros // Support for macros
#include "Kaleidoscope-Macros.h" #include "Kaleidoscope-Macros.h"
@ -30,7 +30,7 @@
#include "Kaleidoscope-LEDControl.h" #include "Kaleidoscope-LEDControl.h"
// Support for "Numpad" mode, which is mostly just the Numpad specific LED mode // Support for "Numpad" mode, which is mostly just the Numpad specific LED mode
#include "Kaleidoscope-NumPad.h" // #include "Kaleidoscope-NumPad.h"
// Support for the "Boot greeting" effect, which pulses the 'LED' button for 10s // Support for the "Boot greeting" effect, which pulses the 'LED' button for 10s
// when the keyboard is connected to a computer (or that computer is powered on) // when the keyboard is connected to a computer (or that computer is powered on)
@ -95,7 +95,7 @@
#include "Kaleidoscope-LayerNames.h" #include "Kaleidoscope-LayerNames.h"
// Support for the GeminiPR Stenography protocol // Support for the GeminiPR Stenography protocol
#include "Kaleidoscope-Steno.h" // #include "Kaleidoscope-Steno.h"
/** This 'enum' is a list of all the macros used by the Model 100's firmware /** This 'enum' is a list of all the macros used by the Model 100's firmware
* The names aren't particularly important. What is important is that each * The names aren't particularly important. What is important is that each
@ -166,8 +166,9 @@ enum {
enum { enum {
PRIMARY, PRIMARY,
NUMPAD, // NUMPAD,
FUNCTION, FUNCTION,
ETC,
}; // layers }; // layers
@ -184,10 +185,10 @@ enum {
* *
*/ */
#define PRIMARY_KEYMAP_QWERTY // #define PRIMARY_KEYMAP_QWERTY
// #define PRIMARY_KEYMAP_DVORAK // #define PRIMARY_KEYMAP_DVORAK
// #define PRIMARY_KEYMAP_COLEMAK // #define PRIMARY_KEYMAP_COLEMAK
// #define PRIMARY_KEYMAP_CUSTOM #define PRIMARY_KEYMAP_CUSTOM
/* This comment temporarily turns off astyle's indent enforcement /* This comment temporarily turns off astyle's indent enforcement
@ -197,82 +198,37 @@ enum {
KEYMAPS( KEYMAPS(
#if defined (PRIMARY_KEYMAP_QWERTY)
[PRIMARY] = KEYMAP_STACKED [PRIMARY] = KEYMAP_STACKED
(___, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext, (___, ___, ___, ___, ___, ___, Key_LEDEffectNext,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab, ___, Key_Q, Key_W, Key_D, Key_F, Key_K, Key_Tab,
Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G, ___, Key_A, Key_S, Key_E, Key_T, Key_G,
Key_PageDown, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Escape, Key_Backtick, Key_Z, Key_X, Key_C, Key_V, Key_B, LCTRL(LALT(Key_LeftGui)),
Key_LeftControl, Key_Backspace, Key_LeftGui, Key_LeftShift, GUI_T(Tab), ALT_T(Backspace), CTL_T(Escape), Key_LeftShift,
ShiftToLayer(FUNCTION), ShiftToLayer(FUNCTION),
M(MACRO_ANY), Key_6, Key_7, Key_8, Key_9, Key_0, LockLayer(NUMPAD), M(MACRO_ANY), ___, Key_LeftArrow, Key_DownArrow, Key_UpArrow, Key_RightArrow, ___,
Key_Enter, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals, Consumer_VolumeIncrement, Key_J, Key_U, Key_R, Key_L, Key_Semicolon, Key_Backslash,
Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote, Key_Y, Key_N, Key_I, Key_O, Key_H, Key_Quote,
Key_RightAlt, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus, Consumer_VolumeDecrement, Key_P, Key_M, Key_Comma, Key_Period, Key_Slash, ___,
Key_RightShift, Key_LeftAlt, Key_Spacebar, Key_RightControl, Key_RightShift, ALT_T(Enter), Key_Spacebar, GUI_T(Tab),
ShiftToLayer(FUNCTION)), ShiftToLayer(FUNCTION)),
#elif defined (PRIMARY_KEYMAP_DVORAK) [FUNCTION] = KEYMAP_STACKED
(___, Key_F1, Key_F2, Key_F3, Key_F4, Key_F5, ___,
[PRIMARY] = KEYMAP_STACKED ___, LSHIFT(Key_1), LSHIFT(Key_2), LSHIFT(Key_LeftBracket), LSHIFT(Key_RightBracket), LSHIFT(Key_Backslash), ___,
(___, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext, LSHIFT(Key_7), LSHIFT(Key_3), LSHIFT(Key_4), LSHIFT(Key_9), LSHIFT(Key_0), Key_Backslash,
Key_Backtick, Key_Quote, Key_Comma, Key_Period, Key_P, Key_Y, Key_Tab, LSHIFT(Key_Backtick), LSHIFT(Key_5), LSHIFT(Key_6), Key_LeftBracket, Key_RightBracket, LSHIFT(Key_8), ___,
Key_PageUp, Key_A, Key_O, Key_E, Key_U, Key_I, ___, Key_Delete, ___, ___,
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_B, Key_Tab,
Key_PageUp, Key_A, Key_R, Key_S, Key_T, Key_G,
Key_PageDown, Key_Z, Key_X, Key_C, Key_D, Key_V, 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_M, Key_N, Key_E, Key_I, Key_O, Key_Quote,
Key_RightAlt, Key_K, Key_H, 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,
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)),
#else
#error "No default keymap defined. You should make sure that you have a line like '#define PRIMARY_KEYMAP_QWERTY' in your sketch"
#endif
Consumer_ScanPreviousTrack, Key_F6, Key_F7, Key_F8, Key_F9, Key_F10, Key_F11,
Consumer_PlaySlashPause, Key_Equals, Key_7, Key_8, Key_9, LSHIFT(Key_Equals), Key_F12,
Key_Minus, Key_4, Key_5, Key_6, Key_Quote, ___,
Key_PcApplication, LSHIFT(Key_Minus), Key_1, Key_2, Key_3, LSHIFT(Key_Quote), ___,
___, ___, Key_Enter, Key_0,
___),
[NUMPAD] = KEYMAP_STACKED [ETC] = KEYMAP_STACKED
(___, ___, ___, ___, ___, ___, ___, (___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___,
@ -280,27 +236,13 @@ KEYMAPS(
___, ___, ___, ___, ___, ___, ___, ___,
___, ___,
M(MACRO_VERSION_INFO), ___, Key_7, Key_8, Key_9, Key_KeypadSubtract, ___, ___, ___, ___, ___, ___, ___, ___,
___, ___, Key_4, Key_5, Key_6, Key_KeypadAdd, ___, ___, Key_VolumeUp, Key_F7, Key_F8, Key_F9, Key_Home, ___,
___, Key_1, Key_2, Key_3, Key_Equals, ___, Key_VolumeDown, Key_F4, Key_F5, Key_F6, Key_End, ___,
___, ___, Key_0, Key_Period, Key_KeypadMultiply, Key_KeypadDivide, Key_Enter, ___, Key_Mute, Key_F1, Key_F2, Key_F3, Key_Insert, ___,
___, ___, ___, ___, ___, ___, ___, ___,
___),
[FUNCTION] = KEYMAP_STACKED
(___, 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,
___, Key_Delete, ___, ___,
___,
Consumer_ScanPreviousTrack, Key_F6, Key_F7, Key_F8, Key_F9, Key_F10, Key_F11,
Consumer_PlaySlashPause, Consumer_ScanNextTrack, Key_LeftCurlyBracket, Key_RightCurlyBracket, Key_LeftBracket, Key_RightBracket, Key_F12,
Key_LeftArrow, Key_DownArrow, Key_UpArrow, Key_RightArrow, ___, ___,
Key_PcApplication, Consumer_Mute, Consumer_VolumeDecrement, Consumer_VolumeIncrement, ___, Key_Backslash, Key_Pipe,
___, ___, Key_Enter, ___,
___) ___)
) // KEYMAPS( ) // KEYMAPS(
/* Re-enable astyle's indent enforcement */ /* Re-enable astyle's indent enforcement */
@ -537,13 +479,13 @@ KALEIDOSCOPE_INIT_PLUGINS(
// The numpad plugin is responsible for lighting up the 'numpad' mode // The numpad plugin is responsible for lighting up the 'numpad' mode
// with a custom LED effect // with a custom LED effect
NumPad, // NumPad,
// The macros plugin adds support for macros // The macros plugin adds support for macros
Macros, Macros,
// The MouseKeys plugin lets you add keys to your keymap which move the mouse. // The MouseKeys plugin lets you add keys to your keymap which move the mouse.
MouseKeys, // MouseKeys,
// The HostPowerManagement plugin allows us to turn LEDs off when then host // The HostPowerManagement plugin allows us to turn LEDs off when then host
// goes to sleep, and resume them when it wakes up. // goes to sleep, and resume them when it wakes up.
@ -588,11 +530,12 @@ KALEIDOSCOPE_INIT_PLUGINS(
// Enables setting, saving (via Chrysalis), and restoring (on boot) the // Enables setting, saving (via Chrysalis), and restoring (on boot) the
// default LED mode. // default LED mode.
DefaultLEDModeConfig, DefaultLEDModeConfig
// Enables the GeminiPR Stenography protocol. Unused by default, but with the // Enables the GeminiPR Stenography protocol. Unused by default, but with the
// plugin enabled, it becomes configurable - and then usable - via Chrysalis. // plugin enabled, it becomes configurable - and then usable - via Chrysalis.
GeminiPR); //GeminiPR
);
/** The 'setup' function is one of the two standard Arduino sketch functions. /** The 'setup' function is one of the two standard Arduino sketch functions.
* It's called when your keyboard first powers up. This is where you set up * It's called when your keyboard first powers up. This is where you set up
@ -608,7 +551,7 @@ void setup() {
// While we hope to improve this in the future, the NumPad plugin // While we hope to improve this in the future, the NumPad plugin
// needs to be explicitly told which keymap layer is your numpad layer // needs to be explicitly told which keymap layer is your numpad layer
NumPad.numPadLayer = NUMPAD; // NumPad.numPadLayer = NUMPAD;
// We configure the AlphaSquare effect to use RED letters // We configure the AlphaSquare effect to use RED letters
AlphaSquare.color = CRGB(255, 0, 0); AlphaSquare.color = CRGB(255, 0, 0);

Loading…
Cancel
Save