keymap.c 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /*
  2. Copyright 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. /* This is my keymap. Enable the layers you want in config.h. */
  15. #include QMK_KEYBOARD_H
  16. #include "ericgebhart.h"
  17. #include "layouts.h"
  18. #include "keyboards.h"
  19. // set up the wrapper macros.
  20. #define BASE_LAYER(NAME, ...) [NAME] = BASE(__VA_ARGS__)
  21. #define BASE_LAYERt6(NAME, ...) [NAME] = BASEt6(__VA_ARGS__)
  22. #define T_LAYER(LNAME, ...) [LNAME] = TRANS(__VA_ARGS__)
  23. // One that takes 5 and one that takes 6 for bepo and other big maps
  24. // that need 3x12 instead of 3x10.
  25. #ifdef BASE_NUMBER_ROW
  26. #define B_LAYER(LNAME, NUMS, LAYOUT) BASE_LAYER(LNAME, NUMS, LAYOUT)
  27. #define B_LAYERt6(LNAME, NUMS, LAYOUT) BASE_LAYERt6(LNAME, NUMS, LAYOUT)
  28. #else
  29. // if there is no number row, don't give it one.
  30. #define B_LAYER(LNAME, NUMS, LAYOUT) BASE_LAYER(LNAME, LAYOUT)
  31. #define B_LAYERt6(LNAME, NUMS, LAYOUT) BASE_LAYERt6(LNAME, LAYOUT)
  32. #endif
  33. // Find alt local key definitions.
  34. // DV for dvorak/qwerty maps on bepo.
  35. // BK, BKW for beakl maps on en-qwerty and bepo.
  36. // BKW is automatic in map_beakl.h
  37. #define ALT_TARGET_IS NONE // NONE, DV=dvorak, BK=Beakl, BK2, BKW=Beaklwi.
  38. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  39. // Default lang, Base layers
  40. #include "map_dvorak.h"
  41. #include "map_maks.h"
  42. #include "map_qwerty.h"
  43. #include "map_beakl.h"
  44. #include "map_alt.h"
  45. #include "map_gap.h"
  46. #include "map_carpalx.h"
  47. #include "map_hd.h"
  48. #include "map_bepo.h"
  49. // create a set of layers for a second locale.
  50. #ifdef SECOND_LOCALE
  51. #undef LANG_IS
  52. #define LANG_IS SECOND_LOCALE
  53. // changes alt target for us, because both en-qwerty and fr-bepo
  54. // need a beakl alt target.
  55. #include "map_beakl.h"
  56. // Qwerty based layers. Need a DV alt target to get the right shifted keys.
  57. #undef ALT_TARGET_IS
  58. #define ALT_TARGET_IS DV // NONE, DV = dvorak, BK=Beakl, BKW=Beaklwi.
  59. #include "map_dvorak.h"
  60. #include "map_maks.h"
  61. #include "map_qwerty.h"
  62. #include "map_alt.h"
  63. #include "map_gap.h"
  64. #include "map_carpalx.h"
  65. #include "map_hd.h"
  66. #undef ALT_TARGET_IS
  67. #define ALT_TARGET_IS NONE // NONE, DV = dvorak, BK=Beakl, BKW=Beaklwi.
  68. #include "map_bepo.h"
  69. #undef LANG_IS
  70. #define LANG_IS DEFAULT_LANG
  71. #endif // bepo
  72. // SYMBOL LAYER
  73. #include "map_symbols.h"
  74. #ifdef SECOND_LOCALE
  75. #undef LANG_IS
  76. #define LANG_IS SECOND_LOCALE
  77. #include "map_symbols.h"
  78. #undef LANG_IS
  79. #define LANG_IS DEFAULT_LANG
  80. #endif
  81. // KEYPAD LAYER
  82. #include "map_keypads.h"
  83. #ifdef SECOND_LOCALE
  84. #undef LANG_IS
  85. #define LANG_IS SECOND_LOCALE
  86. #include "map_keypads.h"
  87. #undef LANG_IS
  88. #define LANG_IS DEFAULT_LANG
  89. #endif
  90. // TOPROWS LAYER
  91. #include "map_toprows.h"
  92. #include "map_accented.h"
  93. #ifdef SECOND_LOCALE
  94. #undef LANG_IS
  95. #define LANG_IS SECOND_LOCALE
  96. #include "map_toprows.h"
  97. #include "map_accented.h"
  98. #undef LANG_IS
  99. #define LANG_IS EN
  100. #endif
  101. // functional non language based layers.
  102. #include "map_funcs.h"
  103. };