bcat.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* Copyright 2021 Jonathan Rascher
  2. *
  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. *
  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. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. #include <stdbool.h>
  18. #include "keymap.h"
  19. /* Layer numbers shared across keymaps. */
  20. enum user_layer {
  21. /* Base layers: */
  22. LAYER_DEFAULT,
  23. #if defined(BCAT_ORTHO_LAYERS)
  24. /* Function layers for ortho (and ergo) boards: */
  25. LAYER_LOWER,
  26. LAYER_RAISE,
  27. LAYER_ADJUST,
  28. #else
  29. /* Function layers for traditional boards: */
  30. LAYER_FUNCTION_1,
  31. LAYER_FUNCTION_2,
  32. #endif
  33. };
  34. /* Custom keycodes shared across keymaps. */
  35. enum user_keycode {
  36. MC_ALTT = SAFE_RANGE,
  37. KEYMAP_SAFE_RANGE,
  38. };
  39. /* Keycode aliases shared across keymaps. */
  40. #define KY_CSPC LCTL(KC_SPC)
  41. #define KY_ZMIN LCTL(KC_EQL)
  42. #define KY_ZMOUT LCTL(KC_MINS)
  43. #define KY_ZMRST LCTL(KC_0)
  44. #if defined(BCAT_ORTHO_LAYERS)
  45. # define LY_LWR MO(LAYER_LOWER)
  46. # define LY_RSE MO(LAYER_RAISE)
  47. #else
  48. # define LY_FN1 MO(LAYER_FUNCTION_1)
  49. # define LY_FN2 MO(LAYER_FUNCTION_2)
  50. #endif