Advertisement
Gugli_

My Layout

Sep 28th, 2022
990
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 5.48 KB | Source Code | 0 0
  1. From 41462bec031abb56a030e7c921d7453e3d3b300e Mon Sep 17 00:00:00 2001
  2. From: Sylvain Guglielmi <code-github@gugli.me>
  3. Date: Wed, 28 Sep 2022 22:49:24 +0200
  4. Subject: My layout
  5.  
  6.  
  7. diff --git a/Model100-Firmware.ino b/Model100-Firmware.ino
  8. index 38a21f2..30ff86a 100644
  9. --- a/Model100-Firmware.ino
  10. +++ b/Model100-Firmware.ino
  11. @@ -7,6 +7,8 @@
  12.   * as well as the Kaleidoscope plugins we use in the Model 100's firmware
  13.   */
  14.  
  15. +#define KEYMAP_GUGLI
  16. +
  17.  // The Kaleidoscope core
  18.  #include "Kaleidoscope.h"
  19.  
  20. @@ -30,7 +32,9 @@
  21.  #include "Kaleidoscope-LEDControl.h"
  22.  
  23.  // Support for "Numpad" mode, which is mostly just the Numpad specific LED mode
  24. +#if ! defined (KEYMAP_GUGLI)
  25.  #include "Kaleidoscope-NumPad.h"
  26. +#endif
  27.  
  28.  // Support for the "Boot greeting" effect, which pulses the 'LED' button for 10s
  29.  // when the keyboard is connected to a computer (or that computer is powered on)
  30. @@ -164,11 +168,20 @@ enum {
  31.    *
  32.    */
  33.  
  34. -enum {
  35. -  PRIMARY,
  36. -  NUMPAD,
  37. -  FUNCTION,
  38. -};  // layers
  39. +#if defined (KEYMAP_GUGLI)  
  40. +  enum {
  41. +    PRIMARY,
  42. +    FUNCTION_LEFT,
  43. +    FUNCTION_RIGHT,
  44. +  };  // layers
  45. +#else
  46. +  enum {
  47. +    PRIMARY,
  48. +    NUMPAD,
  49. +    FUNCTION,
  50. +  };  // layers
  51. +#endif
  52. +
  53.  
  54.  
  55.  /**
  56. @@ -196,7 +209,54 @@ enum {
  57.  // clang-format off
  58.  
  59.  KEYMAPS(
  60. +  
  61. +#if defined (KEYMAP_GUGLI)
  62. +
  63. +  [PRIMARY] = KEYMAP_STACKED
  64. +  (___,          Key_1, Key_2, Key_3, Key_4, Key_5, Key_Backspace,
  65. +   Key_Escape,   Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Enter,
  66. +   Key_Tab,      Key_A, Key_S, Key_D, Key_F, Key_G,
  67. +   Key_Backtick, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_LeftGui,
  68. +   Key_Spacebar, Key_LeftControl, Key_LeftShift, Key_LeftAlt,  
  69. +   ShiftToLayer(FUNCTION_LEFT),
  70. +
  71. +   Key_Delete,           Key_6, Key_7, Key_8,     Key_9,         Key_0,         Key_Minus,
  72. +   Key_Enter,            Key_Y, Key_U, Key_I,     Key_O,         Key_P,         Key_Equals,
  73. +                         Key_H, Key_J, Key_K,     Key_L,         Key_Semicolon, Key_Quote,
  74. +   Key_PcApplication,          Key_N, Key_M, Key_Comma, Key_Period,    Key_Slash,     Key_Backslash,
  75. +   Key_LeftAlt, Key_LeftShift, Key_LeftControl, Key_Spacebar,
  76. +   ShiftToLayer(FUNCTION_RIGHT)),
  77. +  
  78. +  [FUNCTION_LEFT] =  KEYMAP_STACKED
  79. +  (___,       Key_F1,          Key_F2,               Key_F3,        Key_F4,                   Key_F5,             Key_F6,
  80. +   XXX,       Key_PageUp,      Key_Home,             Key_UpArrow,   Key_End,                  Key_F10,            Key_Enter,
  81. +   XXX,       Key_PageDown,    Key_LeftArrow,        Key_DownArrow, Key_RightArrow,           Key_F11,            
  82. +   XXX,       XXX,             LCTRL(Key_LeftArrow), XXX,           LCTRL(Key_RightArrow),    Key_F9,             Key_Menu,
  83. +   LCTRL(Key_Spacebar),       Key_LeftControl, Key_LeftShift, Key_LeftAlt,
  84. +   ___,
  85.  
  86. +   Key_F7,                 Key_F8,    Key_F9,                   Key_F10,                   Key_F11,           Key_F12,            Key_PrintScreen,
  87. +   Key_Enter,              XXX,       LSHIFT(Key_LeftBracket),  LSHIFT(Key_RightBracket),  XXX,               XXX,                Key_ScrollLock,
  88. +                           XXX,       Key_LeftBracket,          Key_RightBracket,          LSHIFT(Key_Comma), LSHIFT(Key_Period), Key_Pause,
  89. +   Key_PcApplication,      XXX,       LSHIFT(Key_9),            LSHIFT(Key_0),             XXX,               XXX,                Key_Pipe,
  90. +   Key_LeftAlt, Key_LeftShift, Key_LeftControl, LCTRL(Key_Spacebar),
  91. +   ___),
  92. +  
  93. +  [FUNCTION_RIGHT] =  KEYMAP_STACKED
  94. +  (___,             XXX,    XXX,      XXX,   XXX,                       XXX,                            XXX,
  95. +   XXX,             XXX,    XXX,      XXX,   Consumer_VolumeIncrement,  Consumer_ScanPreviousTrack,     XXX,
  96. +   XXX,             XXX,    XXX,      XXX,   Consumer_VolumeDecrement,  Consumer_ScanNextTrack,            
  97. +   XXX,             XXX,    XXX,      XXX,   Consumer_Mute,             Consumer_PlaySlashPause,        XXX,
  98. +   LCTRL(Key_Spacebar),       Key_LeftControl, Key_LeftShift, Key_LeftAlt,
  99. +   ___,
  100. +
  101. +   XXX,      XXX,  XXX,  XXX,  XXX, XXX, XXX,
  102. +   XXX,      XXX,  XXX,  XXX,  XXX, XXX, XXX,
  103. +             XXX,  XXX,  XXX,  XXX, XXX, XXX,
  104. +   XXX,      XXX,  XXX,  XXX,  XXX, XXX, XXX,
  105. +   Key_LeftAlt, Key_LeftShift, Key_LeftControl, LCTRL(Key_Spacebar),
  106. +   ___)
  107. +#else
  108.  #if defined (PRIMARY_KEYMAP_QWERTY)
  109.    [PRIMARY] = KEYMAP_STACKED
  110.    (___,          Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
  111. @@ -301,6 +361,9 @@ KEYMAPS(
  112.     Key_PcApplication,          Consumer_Mute,          Consumer_VolumeDecrement, Consumer_VolumeIncrement, ___,             Key_Backslash,    Key_Pipe,
  113.     ___, ___, Key_Enter, ___,
  114.     ___)
  115. +
  116. +#endif
  117. +  
  118.  ) // KEYMAPS(
  119.  
  120.  /* Re-enable astyle's indent enforcement */
  121. @@ -535,9 +598,11 @@ KALEIDOSCOPE_INIT_PLUGINS(
  122.    // The Colormap effect makes it possible to set up per-layer colormaps
  123.    ColormapEffect,
  124.  
  125. +#if ! defined (KEYMAP_GUGLI)
  126.    // The numpad plugin is responsible for lighting up the 'numpad' mode
  127.    // with a custom LED effect
  128.    NumPad,
  129. +#endif
  130.  
  131.    // The macros plugin adds support for macros
  132.    Macros,
  133. @@ -606,9 +671,11 @@ void setup() {
  134.    // nice green color.
  135.    BootGreetingEffect.hue = 85;
  136.  
  137. +#if ! defined (KEYMAP_GUGLI)
  138.    // While we hope to improve this in the future, the NumPad plugin
  139.    // needs to be explicitly told which keymap layer is your numpad layer
  140.    NumPad.numPadLayer = NUMPAD;
  141. +#endif
  142.  
  143.    // We configure the AlphaSquare effect to use RED letters
  144.    AlphaSquare.color = CRGB(255, 0, 0);
  145.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement