Gugli_ icon

My Layout

Gugli_ | PRO | 09/28/22 08:53:28 PM UTC | 0 ⭐ | 13837 👁️ | Never ⏰ | []
Diff |

5.48 KB

|

Source Code

|

0 👍

/

0 👎

From 41462bec031abb56a030e7c921d7453e3d3b300e Mon Sep 17 00:00:00 2001
From: Sylvain Guglielmi <[email protected]>
Date: Wed, 28 Sep 2022 22:49:24 +0200
Subject: My layout
 
 
diff --git a/Model100-Firmware.ino b/Model100-Firmware.ino
index 38a21f2..30ff86a 100644
--- a/Model100-Firmware.ino
+++ b/Model100-Firmware.ino
@@ -7,6 +7,8 @@
  * as well as the Kaleidoscope plugins we use in the Model 100's firmware
  */
 
+#define KEYMAP_GUGLI
+
 // The Kaleidoscope core
 #include "Kaleidoscope.h"
 
@@ -30,7 +32,9 @@
 #include "Kaleidoscope-LEDControl.h"
 
 // Support for "Numpad" mode, which is mostly just the Numpad specific LED mode
+#if ! defined (KEYMAP_GUGLI)
 #include "Kaleidoscope-NumPad.h"
+#endif
 
 // 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)
@@ -164,11 +168,20 @@ enum {
   *
   */
 
-enum {
-  PRIMARY,
-  NUMPAD,
-  FUNCTION,
-};  // layers
+#if defined (KEYMAP_GUGLI)  
+  enum {
+    PRIMARY,
+    FUNCTION_LEFT,
+    FUNCTION_RIGHT,
+  };  // layers
+#else
+  enum {
+    PRIMARY,
+    NUMPAD,
+    FUNCTION,
+  };  // layers
+#endif
+
 
 
 /**
@@ -196,7 +209,54 @@ enum {
 // clang-format off
 
 KEYMAPS(
+  
+#if defined (KEYMAP_GUGLI)
+
+  [PRIMARY] = KEYMAP_STACKED
+  (___,          Key_1, Key_2, Key_3, Key_4, Key_5, Key_Backspace,
+   Key_Escape,   Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Enter,
+   Key_Tab,      Key_A, Key_S, Key_D, Key_F, Key_G,
+   Key_Backtick, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_LeftGui,
+   Key_Spacebar, Key_LeftControl, Key_LeftShift, Key_LeftAlt,  
+   ShiftToLayer(FUNCTION_LEFT),
+
+   Key_Delete,           Key_6, Key_7, Key_8,     Key_9,         Key_0,         Key_Minus,
+   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_PcApplication,          Key_N, Key_M, Key_Comma, Key_Period,    Key_Slash,     Key_Backslash,
+   Key_LeftAlt, Key_LeftShift, Key_LeftControl, Key_Spacebar, 
+   ShiftToLayer(FUNCTION_RIGHT)),
+   
+  [FUNCTION_LEFT] =  KEYMAP_STACKED
+  (___,       Key_F1,          Key_F2,               Key_F3,        Key_F4,                   Key_F5,             Key_F6,
+   XXX,       Key_PageUp,      Key_Home,             Key_UpArrow,   Key_End,                  Key_F10,            Key_Enter,
+   XXX,       Key_PageDown,    Key_LeftArrow,        Key_DownArrow, Key_RightArrow,           Key_F11,             
+   XXX,       XXX,             LCTRL(Key_LeftArrow), XXX,           LCTRL(Key_RightArrow),    Key_F9,             Key_Menu,
+   LCTRL(Key_Spacebar),       Key_LeftControl, Key_LeftShift, Key_LeftAlt, 
+   ___,
 
+   Key_F7,                 Key_F8,    Key_F9,                   Key_F10,                   Key_F11,           Key_F12,            Key_PrintScreen,
+   Key_Enter,              XXX,       LSHIFT(Key_LeftBracket),  LSHIFT(Key_RightBracket),  XXX,               XXX,                Key_ScrollLock,
+                           XXX,       Key_LeftBracket,          Key_RightBracket,          LSHIFT(Key_Comma), LSHIFT(Key_Period), Key_Pause,
+   Key_PcApplication,      XXX,       LSHIFT(Key_9),            LSHIFT(Key_0),             XXX,               XXX,                Key_Pipe,
+   Key_LeftAlt, Key_LeftShift, Key_LeftControl, LCTRL(Key_Spacebar),
+   ___),
+   
+  [FUNCTION_RIGHT] =  KEYMAP_STACKED
+  (___,             XXX,    XXX,      XXX,   XXX,                       XXX,                            XXX,
+   XXX,             XXX,    XXX,      XXX,   Consumer_VolumeIncrement,  Consumer_ScanPreviousTrack,     XXX,
+   XXX,             XXX,    XXX,      XXX,   Consumer_VolumeDecrement,  Consumer_ScanNextTrack,             
+   XXX,             XXX,    XXX,      XXX,   Consumer_Mute,             Consumer_PlaySlashPause,        XXX,
+   LCTRL(Key_Spacebar),       Key_LeftControl, Key_LeftShift, Key_LeftAlt, 
+   ___,
+
+   XXX,      XXX,  XXX,  XXX,  XXX, XXX, XXX,
+   XXX,      XXX,  XXX,  XXX,  XXX, XXX, XXX,
+             XXX,  XXX,  XXX,  XXX, XXX, XXX,
+   XXX,      XXX,  XXX,  XXX,  XXX, XXX, XXX,
+   Key_LeftAlt, Key_LeftShift, Key_LeftControl, LCTRL(Key_Spacebar),
+   ___)
+#else
 #if defined (PRIMARY_KEYMAP_QWERTY)
   [PRIMARY] = KEYMAP_STACKED
   (___,          Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
@@ -301,6 +361,9 @@ KEYMAPS(
    Key_PcApplication,          Consumer_Mute,          Consumer_VolumeDecrement, Consumer_VolumeIncrement, ___,             Key_Backslash,    Key_Pipe,
    ___, ___, Key_Enter, ___,
    ___)
+
+#endif
+   
 ) // KEYMAPS(
 
 /* Re-enable astyle's indent enforcement */
@@ -535,9 +598,11 @@ KALEIDOSCOPE_INIT_PLUGINS(
   // The Colormap effect makes it possible to set up per-layer colormaps
   ColormapEffect,
 
+#if ! defined (KEYMAP_GUGLI)
   // The numpad plugin is responsible for lighting up the 'numpad' mode
   // with a custom LED effect
   NumPad,
+#endif
 
   // The macros plugin adds support for macros
   Macros,
@@ -606,9 +671,11 @@ void setup() {
   // nice green color.
   BootGreetingEffect.hue = 85;
 
+#if ! defined (KEYMAP_GUGLI)
   // While we hope to improve this in the future, the NumPad plugin
   // needs to be explicitly told which keymap layer is your numpad layer
   NumPad.numPadLayer = NUMPAD;
+#endif
 
   // We configure the AlphaSquare effect to use RED letters
   AlphaSquare.color = CRGB(255, 0, 0);
 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎