layers.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #pragma once
  2. /*
  3. Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com>
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #include "keycodes.h"
  15. /*********************************************************************/
  16. /* Non-Base Layer Definitions. */
  17. /* */
  18. /* Keypads, sympads, funcpads, symbols, RGB, Layers, Controls, etc. */
  19. /* Qwerty and Bepo versions exist as needed. */
  20. /* */
  21. /* This file defines every auxillary layer I use on every keyboard */
  22. /* Ergodox, keebio/viterbi, xd75, rebound, crkbd, morpho, dactyl,.. */
  23. /*********************************************************************/
  24. /********************************************************************************/
  25. /* The following Transient/Non-Base Layers are provided within. */
  26. /* Each layer is named with the size of Keymatrix it has entries for. */
  27. /* 3x10 are usual for these. I had 3x12's but I didn't need the edges really. */
  28. /* It was an attempt to accommodate Bepo which is 13 columns wide. */
  29. /* Even in a 3x12 Bepo is wonky. So I gave up on it. I also gave up on 4 row */
  30. /* layers, I really want my keys in that 3x5 space. Everything on the edges can */
  31. /* stay as it is. Splitting is managed in the macros as */
  32. /* needed. BP indicates the Bepo equivalent to the Qwerty layer when needed. */
  33. /********************************************************************************/
  34. /* */
  35. /* Explore below to see what they all are. */
  36. /* Naming gives the sizes of things, a prefix number is the length. */
  37. /* BP is the bepo version of things. */
  38. /* BKL is the beakl 15 version of a layout or chunk. */
  39. /* C on the end of a name means its a compact version of something. */
  40. /* Compact meaning for use on a 3 row layout. */
  41. /* */
  42. /* TOPROWS - numbers, symbols, functions, all on one layer. */
  43. /* ___TOPROWS_3x10___ */
  44. /* ___TOPROWS_BP_3x10___ */
  45. /* */
  46. /* KEYPADS/FUNCPADS. */
  47. /* ___KP_C_3x10___ */
  48. /* ___KP_C_BP_3x10___ */
  49. /* ___KP_C_BKL_FUNC_3x10___ -- BEAKL key/func pads. */
  50. /* ___KP_C_BKL_FUNC_BP_3x10___ */
  51. /* */
  52. /* SYMBOLS -Beakl or Beakl extended */
  53. /* ___SYMB_BEAKL_3x10___ */
  54. /* ___SYMB_BEAKL_BP_3x10___ */
  55. /* */
  56. /* Beakl extended symbol layer with additional corner symbols. */
  57. /* For use with non-beakl base layers. */
  58. /* ___SYMB_BEAKLA_3x10___ */
  59. /* ___SYMB_BEAKLA_BP_3x10___ */
  60. /* For use with vi bindings optimized */
  61. /* ___SYMB_BEAKLB_3x10___ */
  62. /* ___SYMB_BEAKLB_BP_3x10___ */
  63. /* */
  64. /* NAVIGATION */
  65. /* ___NAV_3x10___ */
  66. /* */
  67. /* CONTROLS */
  68. /* ___RGB_3x10___ */
  69. /* ___ADJUST_3x10___ */
  70. /* ___LAYERS_3x10___ */
  71. /********************************************************************************/
  72. /*********************************************************************/
  73. /* XXXXXX Layer chunk -- These are the final layers. */
  74. /* */
  75. /* Each section defines the necessary pieces to create a layer. */
  76. /* It builds them up into consistently shaped lists for the layout */
  77. /* wrapper. */
  78. /* */
  79. /* Each Section ends with a _Layer Chunk_. This is so the */
  80. /* layer can be easily given to the Layout Wrapper macros which */
  81. /* takes a list of keys in lengths of 2x3x5, 2x3x6, 2x4x5, or 2x4x6. */
  82. /* */
  83. /* All of my keyboard definitions use these same chunks with similar */
  84. /* macros. The differences between keyboards are all managed in the */
  85. /* macro. Here we just have nice rectangular sets of keys to */
  86. /* complete a layout. */
  87. /*********************************************************************/
  88. // these are needed so that groups of defined keys will unravel
  89. // into their values. The Base layers don't need them becuse the
  90. // keys are explicit in their passing. Here, chunks are made for
  91. // convenience and reuse. They don't unravel unless we wrap these
  92. // in var args.
  93. #define CHUNK_LANG_MAP(...) LANG_MAP(__VA_ARGS__)
  94. #define CHUNK_LANG_ROW(...) LANG_ROW(__VA_ARGS__)
  95. // 5 wide, with the two shot control.
  96. #define ___OS_MODS_L___ OS_LGUI, OS_LALT, OS_LCTL, OS_LSFT, TS_LCTL
  97. #define ___OS_MODS_R___ TS_RCTL, OS_RSFT, OS_RCTL, OS_RALT, OS_RGUI
  98. // 4 wide.
  99. #define ___SML_MODS_L___ SMLM_LGUI, SMLM_LALT, SMLM_LCTL, SMLM_LSFT
  100. #define ___SML_MODS_R___ SMLM_RSFT, SMLM_RCTL, SMLM_RALT, SMLM_RGUI
  101. #include "keypads.h"
  102. #include "nav.h"
  103. #include "symbols.h"
  104. #include "toprows.h"
  105. #include "utility.h"