You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

325 lines
6.0 KiB

  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. #ifdef OLED_CUSTOM_ENABLE
  15. #include "ericgebhart.h"
  16. void oled_render_layer_map(void) {
  17. uint8_t lyr = get_highest_layer(layer_state);
  18. if (lyr < _LAYERS) {
  19. switch (get_highest_layer(default_layer_state)) {
  20. #ifdef QWERTY_LAYER_ENABLE
  21. SHOW_MAP(_QWERTY)
  22. #endif
  23. #ifdef COLEMAK_DH_LAYER_ENABLE
  24. SHOW_MAP(_COLEMAK_DH)
  25. #endif
  26. #ifdef COLEMAK_LAYER_ENABLE
  27. SHOW_MAP(_COLEMAK)
  28. #endif
  29. #ifdef HALMAK_LAYER_ENABLE
  30. SHOW_MAP(_HALMAK)
  31. #endif
  32. #ifdef MINIMAK_LAYER_ENABLE
  33. SHOW_MAP(_MINIMAK)
  34. #endif
  35. #ifdef MINIMAK_8_LAYER_ENABLE
  36. SHOW_MAP(_MINIMAK_8)
  37. #endif
  38. #ifdef MINIMAK_12_LAYER_ENABLE
  39. SHOW_MAP(_MINIMAK_12)
  40. #endif
  41. #ifdef DVORAK_LAYER_ENABLE
  42. SHOW_MAP(_DVORAK)
  43. #endif
  44. #ifdef DVORAK_RLC_IU_LAYER_ENABLE
  45. SHOW_MAP(_DVORAK_RLC_IU)
  46. #endif
  47. #ifdef BOO_LAYER_ENABLE
  48. SHOW_MAP(_BOO)
  49. #endif
  50. #ifdef CAPEWELL_DVORAK_LAYER_ENABLE
  51. SHOW_MAP(_CAPEWELL_DVORAK)
  52. #endif
  53. #ifdef AHEI_LAYER_ENABLE
  54. SHOW_MAP(_AHEI)
  55. #endif
  56. #ifdef BEAKL27_LAYER_ENABLE
  57. SHOW_MAP(_BEAKL27)
  58. #endif
  59. #ifdef BEAKL15_LAYER_ENABLE
  60. SHOW_MAP(_BEAKL15)
  61. #endif
  62. #ifdef BEAKL19_LAYER_ENABLE
  63. SHOW_MAP(_BEAKL19)
  64. #endif
  65. #ifdef BEAKLWI_LAYER_ENABLE
  66. SHOW_MAP(_BEAKLWI)
  67. #endif
  68. #ifdef CARPALX_QFMLWY_LAYER_ENABLE
  69. SHOW_MAP(_CARPALX_QFMLWY)
  70. #endif
  71. #ifdef CARPALX_QGMLWB_LAYER_ENABLE
  72. SHOW_MAP(_CARPALX_QGMLWB)
  73. #endif
  74. #ifdef CARPALX_QGMLWY_LAYER_ENABLE
  75. SHOW_MAP(_CARPALX_QGMLWY)
  76. #endif
  77. #ifdef MTGAP_LAYER_ENABLE
  78. SHOW_MAP(_MTGAP)
  79. #endif
  80. #ifdef CTGAP_LAYER_ENABLE
  81. SHOW_MAP(_CTGAP)
  82. #endif
  83. #ifdef APT_LAYER_ENABLE
  84. SHOW_MAP(_APT)
  85. #endif
  86. #ifdef CANARY_LAYER_ENABLE
  87. SHOW_MAP(_CANARY)
  88. #endif
  89. #ifdef HD_NEU_LAYER_ENABLE
  90. SHOW_MAP(_HD_NEU)
  91. #endif
  92. #ifdef HD_NEU_NARROW_LAYER_ENABLE
  93. SHOW_MAP(_HD_NEU_NARROW)
  94. #endif
  95. #ifdef HD_TITANIUM_LAYER_ENABLE
  96. SHOW_MAP(_HD_TITANIUM)
  97. #endif
  98. #ifdef HD_GOLD_LAYER_ENABLE
  99. SHOW_MAP(_HD_GOLD)
  100. #endif
  101. #ifdef HD_PLATINUM_LAYER_ENABLE
  102. SHOW_MAP(_HD_PLATINUM)
  103. #endif
  104. #ifdef HD_SILVER_LAYER_ENABLE
  105. SHOW_MAP(_HD_SILVER)
  106. #endif
  107. #ifdef HD_BRONZE_LAYER_ENABLE
  108. SHOW_MAP(_HD_BRONZE)
  109. #endif
  110. #ifdef HD_ELAN_LAYER_ENABLE
  111. SHOW_MAP(_HD_ELAN)
  112. #endif
  113. #ifdef HD_DASH_LAYER_ENABLE
  114. SHOW_MAP(_HD_DASH)
  115. #endif
  116. #ifdef HD_REF_LAYER_ENABLE
  117. SHOW_MAP(_HD_REF)
  118. #endif
  119. #ifdef RSTHD_LAYER_ENABLE
  120. SHOW_MAP(_RSTHD)
  121. #endif
  122. #ifdef HANDS_UP_LAYER_ENABLE
  123. SHOW_MAP(_HANDS_UP)
  124. #endif
  125. #ifdef WHITE_LAYER_ENABLE
  126. SHOW_MAP(_WHITE)
  127. #endif
  128. #ifdef ISRT_LAYER_ENABLE
  129. SHOW_MAP(_ISRT)
  130. #endif
  131. #ifdef SOUL_LAYER_ENABLE
  132. SHOW_MAP(_SOUL)
  133. #endif
  134. #ifdef NIRO_LAYER_ENABLE
  135. SHOW_MAP(_NIRO)
  136. #endif
  137. #ifdef ASSET_LAYER_ENABLE
  138. SHOW_MAP(_ASSET)
  139. #endif
  140. #ifdef WHORF_LAYER_ENABLE
  141. SHOW_MAP(_WHORF)
  142. #endif
  143. #ifdef WHORF6_LAYER_ENABLE
  144. SHOW_MAP(_WHORF6)
  145. #endif
  146. #ifdef BEPO_LAYER_ENABLE
  147. SHOW_MAP(_BEPO)
  148. #endif
  149. #ifdef OPTIMOT_LAYER_ENABLE
  150. SHOW_MAP(_OPTIMOT)
  151. #endif
  152. #ifdef OPTIMOT_COMPACT_LAYER_ENABLE
  153. SHOW_MAP(_OPTIMOT_COMPACT)
  154. #endif
  155. #ifdef BEAKL19bis_LAYER_ENABLE
  156. SHOW_MAP(_BEAKL19bis)
  157. #endif
  158. }
  159. } else {
  160. switch (lyr) {
  161. #ifdef TOPROWS_LAYER_ENABLE
  162. LCASE(_TOPROWS)
  163. # ifdef TOPROWS_BKL_NUMS
  164. # ifdef TOPROWS_MOD
  165. CARTE_TOPROWS_MOD
  166. # else
  167. # ifdef TOPROWS_BKL_19_NUMS
  168. CARTE_TOPROWS_BKL19
  169. # else
  170. CARTE_TOPROWS
  171. # endif
  172. # endif
  173. # else // not beakl nums.
  174. CARTE_RAISE
  175. # endif
  176. break;
  177. #endif
  178. case _NAV:
  179. #ifdef NAV_FULL_LOCK_MODS
  180. CARTE_NAVA
  181. #endif
  182. #ifdef NAV_FULL
  183. CARTE_NAV
  184. #endif
  185. #ifdef NAV_NO_MOUSE
  186. CARTE_NAVnm
  187. #endif
  188. #ifdef NAV_MIRYOKU
  189. CARTE_NAV_miryoku
  190. #endif
  191. break;
  192. #ifdef MOUSE_LAYER_ENABLE
  193. case _NAVm:
  194. # ifdef NAV_MOUSE_MIRYOKU
  195. CARTE_NAVm_miryoku
  196. # else
  197. CARTE_NAVm
  198. # endif
  199. break;
  200. #endif
  201. #ifdef MEDIA_LAYER_ENABLE
  202. SHOW_MAP_S(_MEDIA)
  203. #endif
  204. SHOW_MAP_S(_LAYERS)
  205. #ifdef SYMBOL_LAYER_ENABLE
  206. LCASE(_SYMB)
  207. # ifdef SYMBOL_BEAKL
  208. CARTE_SYMB_BEAKL
  209. # endif
  210. # ifdef SYMBOL_BEAKL_EXT
  211. CARTE_SYMB_BEAKLA
  212. # endif
  213. # ifdef SYMBOL_BEAKL_EXT_VI
  214. CARTE_SYMB_BEAKLB
  215. # endif
  216. # ifdef SYMBOL_BEAKL_C
  217. CARTE_SYMB_BEAKLC
  218. # endif
  219. # ifdef SYMBOL_MIRYOKU
  220. CARTE_SYMB_MIRYOKU
  221. # endif
  222. # ifdef SYMBOL_BEAKL_WI
  223. CARTE_SYMB_BEAKL_WI
  224. # endif
  225. # ifdef SYMBOL_BEAKL_WI
  226. CARTE_SYMB_NEO
  227. # endif
  228. break;
  229. #endif
  230. #ifdef KEYAD_LAYER_ENABLE
  231. LCASE(_KEYPAD)
  232. #ifdef KEYPAD_BEAKL
  233. #ifdef KEYPAD_BEAKL_WI
  234. CARTE_KP_BKL_WI
  235. #endif
  236. #ifdef KEYPAD_MODS
  237. CARTE_KP_BKL_MODS
  238. #endif
  239. #if !defined(KEYPAD_MODS) && !defined(KEYPAD_BEAKL_WI)
  240. CARTE_KP_BKL_FUNC
  241. #endif
  242. #ifdef KEYPAD_MIRYOKU
  243. CARTE_KP_MIRYOKU
  244. #endif
  245. #else // not beakl.
  246. #ifdef KEYPAD_RIGHT
  247. #ifdef KEYPAD_MODS
  248. CARTE_MODS_KP
  249. #else
  250. CARTE_FP_KP
  251. #endif
  252. #else // not keypad right.
  253. #ifdef KEYPAD_MODS
  254. CARTE_KP_MODS
  255. #else
  256. CARTE_KP_FP // the final default.
  257. #endif
  258. #endif // end not keypad right.
  259. #endif // end not beakl
  260. break;
  261. #endif // end keypad.
  262. #ifdef MORTE_LAYER_ENABLE
  263. SHOW_MAP(_MORTE)
  264. #endif
  265. #ifdef ACCENTS_MORTE_LAYER_ENABLE
  266. SHOW_MAP(_ACCENTS_MORTE)
  267. #endif
  268. #ifdef ACCENTS_LAYER_ENABLE
  269. SHOW_MAP(_CARTE_ACCENTS)
  270. #endif
  271. }
  272. }
  273. }
  274. #endif