bbaserdem.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. /* Copyright 2021 Batuhan Başerdem
  2. * <baserdem.batuhan@gmail.com> @bbaserdem
  3. *
  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. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #pragma once
  18. #include QMK_KEYBOARD_H
  19. #include "quantum.h"
  20. #include "keymap_dvorak.h"
  21. /* Besides loading libraries and definitions, this file has my layout defs
  22. * LAYOUTS:
  23. * This file has a couple layouts I use; so that the general changes can be
  24. * propagated by only editing this file.
  25. */
  26. // Macros to use, this has base level code so not affected by enabled features
  27. #include "bb-macro.h"
  28. // Audio from onboard speakers
  29. #ifdef AUDIO_ENABLE
  30. #include "bb-audio.h"
  31. #endif // AUDIO_ENABLE
  32. // Keycap backlight using non-rgb LEDs
  33. #ifdef BACKLIGHT_ENABLE
  34. #include "bb-backlight.h"
  35. #endif // BACKLIGHT_ENABLE
  36. // Underglow light using rgb LEDs
  37. #ifdef RGBLIGHT_ENABLE
  38. #include "bb-underglow.h"
  39. #endif // RGBLIGHT_ENABLE
  40. // Keycap backlight using rgb LEDs
  41. #ifdef RGB_MATRIX_ENABLE
  42. #include "bb-rgb.h"
  43. #endif // RGB_MATRIX_ENABLE
  44. // Rotary encoder
  45. #ifdef ENCODER_ENABLE
  46. #include "bb-encoder.h"
  47. #endif // ENCODER_ENABLE
  48. // Oled screen
  49. #ifdef OLED_ENABLE
  50. #include "bb-oled.h"
  51. #endif // OLED_ENABLE
  52. // Structure to keep runtime info on encoder state
  53. typedef union {
  54. uint32_t raw;
  55. struct {
  56. bool rgb_sleep;
  57. };
  58. } userspace_runtime_t;
  59. typedef union {
  60. uint32_t raw;
  61. struct {
  62. uint8_t e0base :4; // ( 4:0) The encoder state on most layers; regular function
  63. uint8_t e1base :4; // ( 8:1) 9 states for this; 4 bits
  64. uint8_t e0point :2; // (10:1) The encoder state on mouse layer; moves pointer
  65. uint8_t e1point :2; // (12:1) 4 states for this; 2 bits
  66. uint8_t e0rgb :4; // (16:2) The encoder state on media layer; controls light
  67. uint8_t e1rgb :4; // (20:2) 5 states for this; 3 bits but 4 is better
  68. uint8_t layout :2; // (22:2) Stores keymap layout; 3 states is good on 2 bits
  69. uint16_t :10; // (32:3) Padding here, free space for 10 more bits
  70. };
  71. } userspace_config_t;
  72. // Broadcast us to everyone else
  73. extern userspace_runtime_t userspace_runtime;
  74. extern userspace_config_t userspace_config;
  75. // Function definitions that can be accessed through specific keymaps
  76. // Runs before all initialization
  77. void keyboard_pre_init_keymap(void);
  78. // For code that launches once midway through initialization
  79. void matrix_init_keymap(void);
  80. // For code that launches after initialization is finished.
  81. void keyboard_post_init_keymap(void);
  82. // These will be delegated to keymap specific stuff (weak definition)
  83. bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
  84. // This code runs on every tick
  85. void matrix_scan_keymap(void);
  86. // This code runs after every layer change
  87. layer_state_t layer_state_set_keymap(layer_state_t state);
  88. // This code runs when the default layer changes
  89. layer_state_t default_layer_state_set_keymap (layer_state_t state);
  90. // Some code
  91. void housekeeping_task_user(void);
  92. // This code runs to set LED states
  93. void led_set_keymap(uint8_t usb_led);
  94. // For code that runs on suspend
  95. void suspend_power_down_keymap(void);
  96. void suspend_wakeup_init_keymap(void);
  97. // For code that runs on powerdown
  98. void shutdown_keymap(void);
  99. // Make it so that keymaps can use KEYMAP_SAFE_RANGE for custom keycodes
  100. #ifdef KEYMAP_SAFE_RANGE
  101. #define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE
  102. #else
  103. #define PLACEHOLDER_SAFE_RANGE SAFE_RANGE
  104. #endif
  105. // Custom macro keycode ranges
  106. enum userspace_custom_keycodes {
  107. // Safe stuff
  108. BB_SAFE = PLACEHOLDER_SAFE_RANGE,
  109. // Double entry macros
  110. DBL_ANG,
  111. DBL_PAR,
  112. DBL_CBR,
  113. DBL_BRC,
  114. // Macro key
  115. BB_PGPK,
  116. // Unicode strings
  117. # ifdef UNICODEMAP_ENABLE
  118. BB_LENY,
  119. BB_TABL,
  120. TR_FLAG,
  121. # endif // UNICODEMAP_ENABLE
  122. // Encoder buttons
  123. # ifdef ENCODER_ENABLE
  124. BB_ENC0,
  125. BB_ENC1,
  126. # endif // ENCODER_ENABLE
  127. // Oled editor
  128. # ifdef OLED_ENABLE
  129. BB_OLED,
  130. # endif // OLED_ENABLE
  131. //use for keymap specific codes
  132. KEYMAP_SAFE_RANGE
  133. };
  134. // Mask these keycodes if required features are not enabled
  135. #ifndef UNICODEMAP_ENABLE
  136. #define BB_LENY KC_NO
  137. #define BB_TABL KC_NO
  138. #define TR_FLAG KC_NO
  139. #endif // UNICODEMAP_ENABLE
  140. #ifndef ENCODER_ENABLE
  141. #define BB_ENC0 KC_NO
  142. #define BB_ENC1 KC_NO
  143. #endif // ENCODER_ENABLE
  144. /// Enumerate of layers
  145. enum userspace_layers {
  146. _BASE = 0, // Base layer
  147. _CHAR, // Characters layer
  148. _GAME, // Game layer
  149. _MEDI, // R3: Media layer
  150. _NAVI, // R3: Navigation layer
  151. _SYMB, // R1: Symbols layer
  152. _NUMB, // L1: Numbers layer
  153. _FUNC, // L2: Function keys layer
  154. _MOUS, // L3: Mouse keys layer
  155. _MUSI // Music overlay
  156. };
  157. // Use 7 wide characters for keymaps, to keep things aligned with 4 tabs
  158. #define _______ KC_TRNS
  159. #define XXXXXXX KC_NO
  160. // These defines allow multiple multi-parameter definitions to expand
  161. // for these boards
  162. #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
  163. #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
  164. #define LAYOUT_ortho_5x15_wrapper(...) LAYOUT_ortho_5x15(__VA_ARGS__)
  165. #define LAYOUT_ortho_3x10_wrapper(...) LAYOUT_ortho_3x10(__VA_ARGS__)
  166. #define LAYOUT_split_3x6_3_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__)
  167. #define LAYOUT_split_3x5_3_wrapper(...) LAYOUT_split_3x5_3(__VA_ARGS__)
  168. // Masks
  169. #define ___1___ _______
  170. #define ___2___ _______,_______
  171. #define ___3___ _______,_______,_______
  172. #define ___4___ _______,_______,_______,_______
  173. #define ___5___ _______,_______,_______,_______,_______
  174. #define ___6___ _______,_______,_______,_______,_______,_______
  175. #define xxx1xxx KC_NO
  176. #define xxx2xxx KC_NO, KC_NO
  177. #define xxx3xxx KC_NO, KC_NO, KC_NO
  178. #define xxx4xxx KC_NO, KC_NO, KC_NO, KC_NO
  179. #define xxx5xxx KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
  180. #define xxx6xxx KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
  181. #define xxx1xxx KC_NO
  182. #define xxx3xxx KC_NO, KC_NO, KC_NO
  183. #define xxx5xxx KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
  184. #define xxx6xxx KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
  185. // Quick macros: in dvorak
  186. #define BB_UNDO LCTL(KC_SLSH) // Ctrl + Z
  187. #define BB_REDO LCTL(KC_T) // Ctrl + Y
  188. #define BB_YANK LCTL(KC_I) // Ctrl + C
  189. #define BB_CUT LCTL(KC_B) // Ctrl + X
  190. #define BB_PSTE LCTL(KC_DOT) // Ctrl + V
  191. // Audio keys
  192. #ifdef AUDIO_ENABLE
  193. #define MU_REC KC_LCTL
  194. #define MU_STOP KC_LALT
  195. #define MU_PLAY KC_LGUI
  196. #define MU_FAST KC_UP
  197. #define MU_SLOW KC_DOWN
  198. #define MU_MASK KC_A
  199. #define BB_SND MU_ON
  200. #ifdef TAP_DANCE_ENABLE
  201. #define MU_TEMP TD(TD_AUDIO_TEMPO)
  202. #else // TAP_DANCE_ENABLE
  203. #define MU_TEMP KC_DOWN
  204. #endif // TAP_DANCE_ENABLE
  205. #else // AUDIO_ENABLE
  206. #define MU_REC KC_NO
  207. #define MU_STOP KC_NO
  208. #define MU_PLAY KC_NO
  209. #define MU_FAST KC_NO
  210. #define MU_TEMP KC_NO
  211. #define MU_SLOW KC_NO
  212. #define MU_MASK KC_NO
  213. #define BB_SND KC_MUTE
  214. #endif // AUDIO_ENABLE
  215. // Unicode keys
  216. #ifdef UNICODEMAP_ENABLE
  217. #define TR_ACIR XP(LOW_A_CIRC, UPC_A_CIRC )
  218. #define TR_CCED XP(LOW_C_CEDI, UPC_C_CEDI )
  219. #define TR_GBRE XP(LOW_G_BREV, LOW_G_BREV )
  220. #define TR_ICIR XP(LOW_I_CIRC, LOW_I_CIRC )
  221. #define TR_I_NO XP(LOW_I_DOTL, LOW_I_DOTL )
  222. #define TR_IDOT XP(LOW_I_DOTT, LOW_I_DOTT )
  223. #define TR_ODIA XP(LOW_O_DIAE, LOW_O_DIAE )
  224. #define TR_SCED XP(LOW_S_CEDI, LOW_S_CEDI )
  225. #define TR_UCIR XP(LOW_U_CIRC, LOW_U_CIRC )
  226. #define TR_UDIA XP(LOW_U_DIAE, LOW_U_DIAE )
  227. #define GR_ALP XP(LOW_ALPHA, UPC_ALPHA )
  228. #define GR_BET XP(LOW_BETA, UPC_BETA )
  229. #define GR_GAM XP(LOW_GAMMA, UPC_GAMMA )
  230. #define GR_DEL XP(LOW_DELTA, UPC_DELTA )
  231. #define GR_EPS XP(LOW_EPSILON,UPC_EPSILON)
  232. #define GR_ZET XP(LOW_ZETA, UPC_ZETA )
  233. #define GR_ETA XP(LOW_ETA, UPC_ETA )
  234. #define GR_THE XP(LOW_THETA, UPC_THETA )
  235. #define GR_IOT XP(LOW_IOTA, UPC_IOTA )
  236. #define GR_KAP XP(LOW_KAPPA, UPC_KAPPA )
  237. #define GR_LAM XP(LOW_LAMBDA, UPC_LAMBDA )
  238. #define GR_MU XP(LOW_MU, UPC_MU )
  239. #define GR_NU XP(LOW_NU, UPC_NU )
  240. #define GR_XI XP(LOW_XI, UPC_XI )
  241. #define GR_OMI XP(LOW_OMICRON,UPC_OMICRON)
  242. #define GR_PI XP(LOW_PI, UPC_PI )
  243. #define GR_RHO XP(LOW_RHO, UPC_RHO )
  244. #define GR_SIG XP(LOW_SIGMA, UPC_SIGMA )
  245. #define GR_TAU XP(LOW_TAU, UPC_TAU )
  246. #define GR_UPS XP(LOW_UPSILON,UPC_UPSILON)
  247. #define GR_PHI XP(LOW_PHI, UPC_PHI )
  248. #define GR_CHI XP(LOW_CHI, UPC_CHI )
  249. #define GR_PSI XP(LOW_PSI, UPC_PSI )
  250. #define GR_OME XP(LOW_OMEGA, UPC_OMEGA )
  251. #define BB_ELLI X(ELLIPSIS)
  252. #define BB_PLNK X(PLANCK_CON)
  253. #define BB_ANGS X(ANGSTROM)
  254. #define BB_BITC X(BITCOIN)
  255. #else // UNICODEMAP_ENABLE
  256. #define TR_ACIR KC_A
  257. #define TR_CCED KC_C
  258. #define TR_GBRE KC_G
  259. #define TR_ICIR KC_I
  260. #define TR_I_NO KC_I
  261. #define TR_IDOT KC_I
  262. #define TR_ODIA KC_O
  263. #define TR_SCED KC_S
  264. #define TR_UCIR KC_U
  265. #define TR_UDIA KC_U
  266. #define GR_ALP KC_NO
  267. #define GR_BET KC_NO
  268. #define GR_GAM KC_NO
  269. #define GR_DEL KC_NO
  270. #define GR_EPS KC_NO
  271. #define GR_ZET KC_NO
  272. #define GR_ETA KC_NO
  273. #define GR_THE KC_NO
  274. #define GR_IOT KC_NO
  275. #define GR_KAP KC_NO
  276. #define GR_LAM KC_NO
  277. #define GR_MU KC_NO
  278. #define GR_NU KC_NO
  279. #define GR_XI KC_NO
  280. #define GR_OMI KC_NO
  281. #define GR_PI KC_NO
  282. #define GR_RHO KC_NO
  283. #define GR_SIG KC_NO
  284. #define GR_TAU KC_NO
  285. #define GR_UPS KC_NO
  286. #define GR_PHI KC_NO
  287. #define GR_CHI KC_NO
  288. #define GR_PSI KC_NO
  289. #define GR_OME KC_NO
  290. #define BB_ELLI KC_NO
  291. #define BB_PLNK KC_NO
  292. #define BB_ANGS KC_NO
  293. #define BB_BITC KC_NO
  294. #endif // UNICODEMAP_ENABLE
  295. // MOD-tap definitions
  296. #define GUI_A MT(MOD_LGUI, DV_A)
  297. #define ALT_O MT(MOD_LALT, DV_O)
  298. #define CTRL_E MT(MOD_LCTL, DV_E)
  299. #define SHIFT_U MT(MOD_LSFT, DV_U)
  300. #define ALTGR_Q MT(MOD_RALT, DV_Q)
  301. #define GUI_S MT(MOD_RGUI, DV_S)
  302. #define ALT_N MT(MOD_LALT, DV_N)
  303. #define CTRL_T MT(MOD_LCTL, DV_T)
  304. #define SHIFT_H MT(MOD_LSFT, DV_H)
  305. #define ALTGR_V MT(MOD_RALT, DV_V)
  306. // Layer switches
  307. #define MED_DEL LT(_MEDI, KC_DEL )
  308. #define NAV_TAB LT(_NAVI, KC_TAB )
  309. #define SYM_SPC LT(_SYMB, KC_SPC )
  310. #define NUM_ENT LT(_NUMB, KC_ENT )
  311. #define FUN_ESC LT(_FUNC, KC_ESC )
  312. #define MOU_BSP LT(_MOUS, KC_BSPC)
  313. // Layer switches
  314. #define BB_CHAR OSL(_CHAR)
  315. #define BB_GAME TG(_GAME)
  316. /* Depending on how the layouts change with language; the keys are shown as;
  317. * ┌────────────────────────────────────────────────┐
  318. * │AltGr -none- Shift Shift+AltGr │
  319. * └────────────────────────────────────────────────┘
  320. * If there is an exclamation mark; it indicates a dead key on this map.
  321. */
  322. /* Base layout
  323. * DVORAK
  324. * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐
  325. * ` ~ │ ' " │ , < │ . > │ p P │ y Y │ │ f F │ g G │ c C │ r R │ l L │ < >
  326. * ├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤
  327. * \ | │ a A │ o O │ e E │ u U │ i I │ │ d D │ h H │ t T │ n N │ s S │ - _
  328. * ├─Gui─┼─Alt─┼─Ctr─┼─Sft─┼─────┤ ├─────┼─Sft─┼─Ctr─┼─Alt─┼─Gui─┤
  329. * / ? │ ; : │ q Q │ j J │ k K │ x X │ │ b B │ m M │ w W │ v V │ z Z │ = +
  330. * └─────┴AltGr┴─────┼─────┼─────┼─────┐ ┌─────┼─────┼─────┼─────┴AltGr┴─────┘
  331. * │ Del │ Tab │Space│ │Enter│ Esc │BkSpc│
  332. * └─Med─┴─Nav─┴─Sym─┘ └─Num─┴─Fun─┴─Mou─┘
  333. * TURKISH F
  334. * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐
  335. * ¬+ *±│@f F │ g G │ ğ Ğ │¶ı I │ôo OÔ│ │¥d D │®r R │ n N │°h H │£p P │|< >¦
  336. * !├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼────!┤ !
  337. * `x Xà│ûu UÛ│îi İÎ│€e E │âa AÂ│ûü ÜÛ│ │₺t T │ k K │µm M │ l L │´y Yá│#ş Şǎ
  338. * ! !├─Gui─┼─Alt─┼─Ctr─┼─Sft─┼─────┤ ├─────┼─Sft─┼─Ctr─┼─Alt!┼─Gui─┤
  339. * äq Qå│«j J<│»ö Ö>│“v V │¢c C©│”ç Ç │ │ z Z │§s S │×b B │÷. :ȧ│·, ; │~w W
  340. * └─────┴AltGr┴─────┼─────┼─────┼─────┐ ┌─────┼─────┼─────┼─────┴AltGr┴─────┘
  341. * │ Del │ Tab │Space│ │Enter│ Esc │BkSpc│
  342. * └─Med─┴─Nav─┴─Sym─┘ └─Num─┴─Fun─┴─Mou─┘
  343. * The thing about this layout is that these will fit most boards I have.
  344. */
  345. #define _BL1_5_ DV_QUOT,DV_COMM,DV_DOT, DV_P, DV_Y
  346. #define _BR1_5_ DV_F, DV_G, DV_C, DV_R, DV_L
  347. #define _BL2_5_ GUI_A, ALT_O, CTRL_E, SHIFT_U,DV_I
  348. #define _BR2_5_ DV_D, SHIFT_H,CTRL_T, ALT_N, GUI_S
  349. #define _BL3_5_ DV_SCLN,ALTGR_Q,DV_J, DV_K, DV_X
  350. #define _BR3_5_ DV_B, DV_M, DV_W, ALTGR_V,DV_Z
  351. #define _BL4_3_ MED_DEL,NAV_TAB,SYM_SPC
  352. #define _BR4_3_ NUM_ENT,FUN_ESC,MOU_BSP
  353. // The extra line for the 6th (or 0th) row
  354. #define _BL1_1_ DV_GRV
  355. #define _BR1_1_ KC_NUBS
  356. #define _BL2_1_ DV_BSLS
  357. #define _BR2_1_ DV_MINS
  358. #define _BL3_1_ DV_SLSH
  359. #define _BR3_1_ DV_EQL
  360. /* Extra characters layer
  361. * This is accessed using unicode; so IBus compatible apps only.
  362. * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐
  363. * │TrFlg│Lenny│Table│ π │ υ │ │ φ │ γ │ χ │ ρ │ λ │
  364. * ├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤
  365. * │ α │ ο │ ε │ ψ │ ι │ │ δ │ η │ τ │ ν │ σ │
  366. * ├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤
  367. * │ ₿ │ θ │ ℏ │ κ │ ξ │ │ β │ μ │ ω │ Å │ ζ │
  368. * └─────┴─────┴─────┼─────┼─────┼─────┐ ┌─────┼─────┼─────┼─────┴─────┴─────┘
  369. * │ Shf │ ... │ GPG │ │ │ │ Shf │
  370. * └─────┴─────┴─────┘ └─────┴─────┴─────┘
  371. *
  372. */
  373. #define _CL1_5_ TR_FLAG,BB_LENY,BB_TABL,GR_PI, GR_UPS
  374. #define _CR1_5_ GR_PHI, GR_GAM, GR_CHI, GR_RHO, GR_LAM
  375. #define _CL2_5_ GR_ALP, GR_OMI, GR_EPS, GR_PSI, GR_IOT
  376. #define _CR2_5_ GR_DEL, GR_ETA, GR_TAU, GR_NU, GR_SIG
  377. #define _CL3_5_ BB_BITC,GR_THE, BB_PLNK,GR_KAP, GR_XI
  378. #define _CR3_5_ GR_BET, GR_MU, GR_OME, BB_ANGS,GR_ZET
  379. #define _CL4_3_ KC_RSFT,BB_ELLI,BB_PGPK
  380. #define _CR4_3_ XXXXXXX,XXXXXXX,KC_LSFT
  381. /* Game layer
  382. * This layer turns off the tap-hold keys for the left half.
  383. * ┌─────┬─────┬─────┬─────┬─────┐
  384. * │ Q │ W │ E │ R │ T │
  385. * ├─────┼─────┼─────┼─────┼─────┤
  386. * Tab │ A │ S │ D │ F │ G │
  387. * ├─────┼─────┼─────┼─────┼─────┤
  388. * Shift│ Z │ X │ C │ V │ B │
  389. * └─────┴─────┴─────┼─────┼─────┼─────┐
  390. * │ Esc │Enter│Space│
  391. * └─────┴─────┴─────┘
  392. */
  393. #define _GA1_5_ KC_Q, KC_W, KC_E, KC_R, KC_T
  394. #define _GA1_1_ _______
  395. #define _GA2_5_ KC_A, KC_S, KC_D, KC_F, KC_G
  396. #define _GA2_1_ KC_TAB
  397. #define _GA3_5_ KC_Z, KC_X, KC_C, KC_V, KC_B
  398. #define _GA3_1_ KC_LSFT
  399. #define _GA4_3_ KC_ESC, KC_ENT, KC_SPC
  400. /* Media layer
  401. * ┌─────┬─────┬─────┬─────┬─────┐
  402. * │Speed│ Mod │ Hue │ Sat │ Bri │ RGB light control
  403. * ├─────┼─────┼─────┼─────┼─────┤
  404. * │Togg.│Prev.│MuTog│MuStp│Next │ Media control
  405. * ├─────┼─────┼─────┼─────┼─────┤
  406. * │Sink │Vol -│ Mut │Eject│Vol +│ Volume control
  407. * ┌─────┼─────┼─────┼─────┴─────┴─────┘
  408. * │OledL│Veloc│Music│ Feature control on keyboard
  409. * └─────┴─────┴─────┘
  410. */
  411. #define _ME1_5_ RGB_SPI,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI
  412. #define _ME2_5_ RGB_TOG,KC_MPRV,KC_MPLY,KC_MSTP,KC_MNXT
  413. #define _ME3_5_ KC_F13, KC_VOLD,KC_MUTE,KC_EJCT,KC_VOLU
  414. #define _ME4_3_ BB_OLED,VLK_TOG,MU_TOG
  415. /* Navigation layer
  416. * ┌─────┬─────┬─────┬─────┬─────┐
  417. * │Redo │Paste│Yank │ Cut │PrScr│
  418. * ├─────┼─────┼─────┼─────┼─────┤
  419. * │Undo │ < │ v │ ^ │ > │
  420. * ├─────┼─────┼─────┼─────┼─────┤
  421. * │ Ins │Home │PgDwn│PgUp │ End │
  422. * ┌─────┼─────┼─────┼─────┴─────┴─────┘
  423. * │Enter│ Esc │BkSpc│
  424. * └─────┴─────┴─────┘
  425. */
  426. #define _NA1_5_ BB_REDO,BB_PSTE,BB_YANK,BB_CUT, KC_PSCR
  427. #define _NA2_5_ BB_UNDO,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT
  428. #define _NA3_5_ KC_INS, KC_HOME,KC_PGDN,KC_PGUP,KC_END
  429. #define _NA4_3_ KC_ENT, KC_ESC, KC_BSPC
  430. /* Symbols layer
  431. * This layer has the central columns shifted for convenience
  432. * DVORAK
  433. * ┌─────┬─────┬─────┬─────┬─────┐
  434. * │ ` │ { │ } │ / │ = │
  435. * ├─────┼─────┼─────┼─────┼─────┤
  436. * │ ~ │ [ │ ] │ ? │ + │
  437. * ├─────┼─────┼─────┼─────┼─────┤
  438. * │CapsL│ ( │ ) │ \ │ | │
  439. * ┌─────┼─────┼─────┼─────┴─────┴─────┘
  440. * │Enter│ Esc │BkSpc│
  441. * └─────┴─────┴─────┘
  442. * Turkish F
  443. * (AltGr is right on the central column, red. keys on main layer are omitted)
  444. * ┌─────┬─────┬─────┬─────┬─────┐
  445. * │ + ¬ │ / \ │ - | │ │ │
  446. * ├─────┼─────┼─────┼─────┼─────┤
  447. * │ * ± │ ? ¿ │ _ │ │ │
  448. * ├─────┼─────┼─────┼─────┼─────┤
  449. * │CapsL│ │ │ │ │
  450. * ┌─────┼─────┼─────┼─────┴─────┴─────┘
  451. * │Enter│ Esc │BkSpc│
  452. * └─────┴─────┴─────┘
  453. * QWERTY
  454. * ┌─────┬─────┬─────┬─────┬─────┐
  455. * │ ` │ - │ = │ { │ } │
  456. * ├─────┼─────┼─────┼─────┼─────┤
  457. * │ ~ │ _ │ + │ [ │ ] │
  458. * ├─────┼─────┼─────┼─────┼─────┤
  459. * │CapsL│ ( │ ) │ \ │ | │
  460. * ┌─────┼─────┼─────┼─────┴─────┴─────┘
  461. * │Enter│ Esc │BkSpc│
  462. * └─────┴─────┴─────┘
  463. */
  464. #define _SY1_5_ DV_GRV, DV_LCBR,DV_RCBR,DV_SLSH,DV_EQL
  465. #define _SY2_5_ DV_TILD,DV_LBRC,DV_RBRC,DV_QUES,DV_PLUS
  466. #define _SY3_5_ KC_CAPS,DV_LPRN,DV_RPRN,DV_BSLS,DV_PIPE
  467. #define _SY4_3_ KC_ENT, KC_ESC, KC_BSPC
  468. /* Numbers layer
  469. * This layer contains numbers and the associated symbols.
  470. * DVORAK
  471. * ┌─────┬─────┬─────┬─────┬─────┐
  472. * │ < │ 7 & │ 8 * │ 9 ( │ 0 ) │
  473. * ├─────┼─────┼─────┼─────┼─────┤
  474. * │ _ │ 4 $ │ 5 % │ 6 ^ │ - │
  475. * ├─────┼─────┼─────┼─────┼─────┤
  476. * │ > │ 1 ! │ 2 @ │ 3 # │Char.│
  477. * └─────┴─────┴─────┼─────┼─────┼─────┐
  478. * │ Del │ Tab │Space│
  479. * └─────┴─────┴─────┘
  480. * Turkish F
  481. * ┌─────┬─────┬─────┬─────┬─────┐
  482. * │ < | │{7 ' │[8 ( │]9 )±│}0 =°│
  483. * ├─────┼─────┼─────┼─────┼─────┤
  484. * │ │¼4 $ │½5 %⅜│¾6 & │ │
  485. * ├─────┼─────┼─────┼─────┼─────┤
  486. * │ > ¦ │¹1 !¡│²2 " │#3 ^³│Char.│
  487. * └─────┴─────┴─────┼─────┼─────┼─────┐
  488. * │ Del │ Tab │Space│
  489. * └─────┴─────┴─────┘
  490. */
  491. #define _NU1_5_ KC_NUBS,KC_7, KC_8, KC_9, KC_0
  492. #define _NU2_5_ DV_UNDS,KC_4, KC_5, KC_6, DV_MINS
  493. #define _NU3_5_ LSFT(KC_NUBS), KC_1, KC_2, KC_3, BB_CHAR
  494. #define _NU4_3_ KC_DEL, KC_TAB, KC_SPC
  495. /* Function layer
  496. * ┌─────┬─────┬─────┬─────┬─────┐
  497. * │ F01 │ F02 │ F03 │ F04 │EEPRM│
  498. * ├─────┼─────┼─────┼─────┼─────┤
  499. * │ F05 │ F06 │ F07 │ F08 │EEPRM│
  500. * ├─────┼─────┼─────┼─────┼─────┤
  501. * │ F09 │ F10 │ F11 │ F12 │GameL│
  502. * └─────┴─────┴─────┼─────┼─────┼─────┐
  503. * │ Del │ Tab │Space│
  504. * └─────┴─────┴─────┘
  505. */
  506. #define _FU1_5_ KC_F1, KC_F2, KC_F3, KC_F4, RESET
  507. #define _FU2_5_ KC_F5, KC_F6, KC_F7, KC_F8, EEP_RST
  508. #define _FU3_5_ KC_F9, KC_F10, KC_F11, KC_F12, BB_GAME
  509. #define _FU4_3_ KC_DEL, KC_TAB, KC_SPC
  510. /* Mouse layer
  511. * ┌─────┬─────┬─────┬─────┬─────┐
  512. * │Slow │Right│ Mid │ Lft │Fast │
  513. * ├─────┼─────┼─────┼─────┼─────┤
  514. * │ |<| │ |v| │ |^| │ |>| │ Bt4 │
  515. * ├─────┼─────┼─────┼─────┼─────┤
  516. * │ <<< │ vvv │ ^^^ │ >>> │ Bt5 │
  517. * └─────┴─────┴─────┼─────┼─────┼─────┐
  518. * │ Del │ Tab │Space│
  519. * └─────┴─────┴─────┘
  520. */
  521. #define _MO1_5_ KC_ACL0,KC_BTN1,KC_BTN2,KC_BTN3,KC_ACL2
  522. #define _MO2_5_ KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,KC_BTN4
  523. #define _MO3_5_ KC_WH_L,KC_WH_D,KC_WH_U,KC_WH_R,KC_BTN5
  524. #define _MO4_3_ KC_DEL, KC_TAB, KC_SPC
  525. /* Music layer
  526. * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
  527. * │ │ │ │ │ │ │ │ │ │ │ │ │
  528. * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
  529. * │ │ │ │ │ │ │ │ │ │ │ │ │
  530. * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
  531. * │ │ │ │ │ │ │ │ │ │ │ │ │
  532. * └───┴───┴───┼───┼───┼───┼───┼───┼───┼───┴───┴───┘
  533. * │Rec│Stp│Ply│Tmp│Mod│Off│
  534. * └───┴───┴───┴───┴───┴───┘
  535. */
  536. #define _MUL_3_ MU_REC, MU_STOP,MU_PLAY
  537. #define _MUR_3_ MU_TEMP,MU_MOD, MU_TOG
  538. #define _MU_01_ MU_MASK
  539. #define _MU_02_ MU_MASK,MU_MASK
  540. #define _MU_03_ MU_MASK,MU_MASK,MU_MASK
  541. #define _MU_06_ MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK
  542. #define _MU_08_ MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK
  543. #define _MU_10_ MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK
  544. #define _MU_12_ MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK