h10.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /* Copyright 2020 hineybush
  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 "quantum.h"
  18. /* This is a shortcut to help you visually see your layout.
  19. *
  20. * The first section contains all of the arguments representing the physical
  21. * layout of the board and position of the keys.
  22. *
  23. * The second converts the arguments into a two-dimensional array which
  24. * represents the switch matrix.
  25. */
  26. #define LAYOUT_ortho_6x4( \
  27. k00, k01, k02, k03, \
  28. k10, k11, k12, k13, \
  29. k20, k21, k22, k23, \
  30. k30, k31, k32, k33, \
  31. k40, k41, k42, k43, \
  32. k50, k51, k52, k53 \
  33. ) \
  34. { \
  35. {k00, k01, k02, k03}, \
  36. {k10, k11, k12, k13}, \
  37. {k20, k21, k22, k23}, \
  38. {k30, k31, k32, k33}, \
  39. {k40, k41, k42, k43}, \
  40. {k50, k51, k52, k53} \
  41. }
  42. #define LAYOUT_numpad_6x4( \
  43. k00, k01, k02, k03, \
  44. k10, k11, k12, k13, \
  45. k20, k21, k22, \
  46. k30, k31, k32, k33, \
  47. k40, k41, k42, \
  48. k51, k52, k53 \
  49. ) \
  50. { \
  51. {k00, k01, k02, k03}, \
  52. {k10, k11, k12, k13}, \
  53. {k20, k21, k22, KC_NO}, \
  54. {k30, k31, k32, k33}, \
  55. {k40, k41, k42, KC_NO}, \
  56. {KC_NO, k51, k52, k53} \
  57. }
  58. #define LAYOUT_split_plus( \
  59. k00, k01, k02, k03, \
  60. k10, k11, k12, k13, \
  61. k20, k21, k22, k23, \
  62. k30, k31, k32, k33, \
  63. k40, k41, k42, \
  64. k51, k52, k53 \
  65. ) \
  66. { \
  67. {k00, k01, k02, k03}, \
  68. {k10, k11, k12, k13}, \
  69. {k20, k21, k22, k23}, \
  70. {k30, k31, k32, k33}, \
  71. {k40, k41, k42, KC_NO}, \
  72. {KC_NO, k51, k52, k53} \
  73. }
  74. #define LAYOUT_split_zero( \
  75. k00, k01, k02, k03, \
  76. k10, k11, k12, k13, \
  77. k20, k21, k22, \
  78. k30, k31, k32, k33, \
  79. k40, k41, k42, \
  80. k50, k51, k52, k53 \
  81. ) \
  82. { \
  83. {k00, k01, k02, k03}, \
  84. {k10, k11, k12, k13}, \
  85. {k20, k21, k22, KC_NO}, \
  86. {k30, k31, k32, k33}, \
  87. {k40, k41, k42, KC_NO}, \
  88. {k50, k51, k52, k53} \
  89. }
  90. #define LAYOUT_split_enter( \
  91. k00, k01, k02, k03, \
  92. k10, k11, k12, k13, \
  93. k20, k21, k22, \
  94. k30, k31, k32, k33, \
  95. k40, k41, k42, k43, \
  96. k51, k52, k53 \
  97. ) \
  98. { \
  99. {k00, k01, k02, k03}, \
  100. {k10, k11, k12, k13}, \
  101. {k20, k21, k22, KC_NO}, \
  102. {k30, k31, k32, k33}, \
  103. {k40, k41, k42, k43}, \
  104. {KC_NO, k51, k52, k53} \
  105. }
  106. #define LAYOUT_split_enter_plus( \
  107. k00, k01, k02, k03, \
  108. k10, k11, k12, k13, \
  109. k20, k21, k22, k23, \
  110. k30, k31, k32, k33, \
  111. k40, k41, k42, k43, \
  112. k51, k52, k53 \
  113. ) \
  114. { \
  115. {k00, k01, k02, k03}, \
  116. {k10, k11, k12, k13}, \
  117. {k20, k21, k22, k23}, \
  118. {k30, k31, k32, k33}, \
  119. {k40, k41, k42, k43}, \
  120. {KC_NO, k51, k52, k53} \
  121. }
  122. #define LAYOUT_split_zero_plus( \
  123. k00, k01, k02, k03, \
  124. k10, k11, k12, k13, \
  125. k20, k21, k22, k23, \
  126. k30, k31, k32, k33, \
  127. k40, k41, k42, \
  128. k50, k51, k52, k53 \
  129. ) \
  130. { \
  131. {k00, k01, k02, k03}, \
  132. {k10, k11, k12, k13}, \
  133. {k20, k21, k22, k23}, \
  134. {k30, k31, k32, k33}, \
  135. {k40, k41, k42, KC_NO}, \
  136. {k50, k51, k52, k53} \
  137. }