utility.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  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. /********************************************************************************/
  15. /* MEDIA - Mute, Vol, play, pause, stop, next, prev, etc. */
  16. /********************************************************************************/
  17. #define ___PRV_PLAY_NXT_STOP___ KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP
  18. #define ___VDN_MUTE_VUP___ KC_VOLD, KC_MUTE, KC_VOLU
  19. #define ___PRV_VDN_VUP_NXT___ KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT
  20. #define ___STOP_PLAY_MUTE___ KC_MSTP, KC_MPLY, KC_MUTE
  21. #define ___MUTE_PRV_PLAY_NXT_STOP___ KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP
  22. #define ___MUTE_PLAY_STOP___ KC_MUTE, KC_MPLY, KC_MSTP
  23. #define CARTE_MEDIA \
  24. carte_de_map(" ", \
  25. " < vdn vup >", \
  26. " stp play mute")
  27. // miryoku, to be used with stop play mute on thumbs. - MEDIA thumbs.
  28. #define ___MEDIA_3x10___ \
  29. ___5___, ___5___, \
  30. ___5___, ___, ___PRV_VDN_VUP_NXT___, \
  31. ___5___, ___5___
  32. /********************************************************************************/
  33. /* RGB - Control those lights. */
  34. /* ___, HUE SAT_INT MOD (UP), | */
  35. /* ___, HUE SAT INT MOD (DOWN), RGB_TOG | P_B_R_SW_SN___, ___ */
  36. /* ___6___, | ___, ___RGB_KXGT___, ___ */
  37. /********************************************************************************/
  38. // RGB FUNCTION Keysets
  39. // RGB row for the _FN layer from the redo of the default keymap.c
  40. #define ___RGB_HUE_SAT_INT_UP___ RGB_HUI, RGB_SAI, RGB_VAI, RGB_RMOD
  41. #define ___RGB_HUE_SAT_INT_DN___ RGB_HUD, RGB_SAD, RGB_VAD, RGB_MOD
  42. #define ___RGB_MODE_PRV_NXT___ RGB_RMOD, RGB_MOD
  43. #define ___RGB_TOGGLE___ RGB_TOG
  44. #define ___RGB_P_B_R_SW_SN___ RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN
  45. #define ___RGB_KXGT___ RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T
  46. /// An RGB Layer
  47. #define ___10_RGB_1___ ___RGB_HUE_SAT_INT_UP___, ___, ___5___
  48. #define ___10_RGB_2___ ___RGB_HUE_SAT_INT_DN___, RGB_TOG, ___RGB_P_B_R_SW_SN___
  49. #define ___10_RGB_3___ ___5___, ___, ___RGB_KXGT___
  50. /********************************************************************************/
  51. /* The RGB LAYER Chunk */
  52. /********************************************************************************/
  53. #define ___RGB_3x10___ ___10_RGB_1___, ___10_RGB_2___, ___10_RGB_3___
  54. /********************************************************************************/
  55. /* ADJUST - Miscellaneous Melange. */
  56. /********************************************************************************/
  57. // For an Adjust layer. Like RBB with audio, flash, etc.
  58. #define ___ADJUST_L1___ ___RGB_HUE_SAT_INT_UP___, RGB_TOG
  59. #define ___ADJUST_L2___ MU_TOG, CK_TOGG, AU_ON, AU_OFF, CG_NORM
  60. #define ___ADJUST_L3___ ___RGB_HUE_SAT_INT_DN___, KC_RGB_T
  61. #define ___ADJUST_R1___ ___, KC_MAKE, VRSN, MG_NKRO, KC_RESET
  62. #define ___ADJUST_R2___ EE_CLR, ___PRV_PLAY_NXT_STOP___,
  63. #define ___ADJUST_R3___ MG_NKRO, ___VDN_MUTE_VUP___, RGB_IDL
  64. /********************************************************************************/
  65. /* The Adjust LAYER Chunks */
  66. /********************************************************************************/
  67. #define ___ADJUST_3x10___ ___ADJUST_L1___, ___ADJUST_R1___, \
  68. ___ADJUST_L2___, ___ADJUST_R2___, \
  69. ___ADJUST_L3___, ___ADJUST_R3___
  70. /********************************************************************************/
  71. /* LAYERS - Define a base layer, switch to any layer. Get around. Experiment. */
  72. /* */
  73. /* Base Layers on the left hand, */
  74. /* transient layers on the right. Centered on the home region. */
  75. /* A good place to attach an experimental layer. */
  76. /* */
  77. /********************************************************************************/
  78. // Base Layers
  79. // this was kc_dvorak et al. But since its configurable as to who would be here
  80. // that no longer makes sense. So next keys for locale and base layer. and a set to
  81. // make it permanent. Cycling of layers is based on current locale.
  82. #define ___BASE_LAYERS___ ___, KC_SET_BASE, KC_NEXT_BASE_LAYER, KC_NEXT_LOCALE, ___
  83. // transient layers.
  84. #define ___5_LAYERS_T___ ___, MO(_NAV), MO_SYMB, MO_KEYPAD, MO_TOPROWS
  85. #ifdef SECOND_LOCALE
  86. #undef LANG_IS
  87. #define LANG_IS SECOND_LOCALE
  88. #define ___5_LAYERS_T_BP___ ___, MO(_NAV), MO_SYMB, MO_KEYPAD, MO_TOPROWS
  89. #undef LANG_IS
  90. #define LANG_IS DEFAULT_LANG
  91. #else
  92. #define ___5_LAYERS_T_BP___ ___, MO(_NAV), ___3___
  93. #endif
  94. #define ___5_LAYERS_T_CTL___ ___, MO_RGB, ___, ___, MO_ADJUST
  95. #define CARTE_LAYERS \
  96. carte_de_map(" |Nv S K TR", \
  97. " EE Bs Ln|Nv S K TR", \
  98. " ")
  99. /// A Layers Layer
  100. #define ___LAYERS_3x10___ \
  101. ___5___, ___5_LAYERS_T_BP___, \
  102. ___BASE_LAYERS___, ___5_LAYERS_T___, \
  103. ___5___, ___5_LAYERS_T_CTL___