hub20.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /* Copyright 2020 joshajohnson
  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. #define ___ KC_NO
  19. /* This is a shortcut to help you visually see your layout.
  20. *
  21. * The first section contains all of the arguments representing the physical
  22. * layout of the board and position of the keys.
  23. *
  24. * The second converts the arguments into a two-dimensional array which
  25. * represents the switch matrix.
  26. */
  27. /* LAYOUT_all
  28. * ┌───┬───┐
  29. * │01 │02 │
  30. * ┌───┼───┼───┼───┐
  31. * │10 │11 │12 │13 │
  32. * ├───┼───┼───┼───┤
  33. * │20 │21 │22 │23 │
  34. * ├───┼───┼───┼───┤
  35. * │30 │31 │32 │33 │
  36. * ├───┼───┼───┼───┤
  37. * │40 │41 │42 │43 │
  38. * ├───┼───┼───┼───┤
  39. * │50 │51 │52 │53 │
  40. * └───┴───┴───┴───┘
  41. */
  42. #define LAYOUT_all( \
  43. K01, K02, \
  44. K10, K11, K12, K13, \
  45. K20, K21, K22, K23, \
  46. K30, K31, K32, K33, \
  47. K40, K41, K42, K43, \
  48. K50, K51, K52, K53 \
  49. ) \
  50. { \
  51. { ___, K01, K02, ___, }, \
  52. { K10, K11, K12, K13, }, \
  53. { K20, K21, K22, K23, }, \
  54. { K30, K31, K32, K33, }, \
  55. { K40, K41, K42, K43, }, \
  56. { K50, K51, K52, K53, }, \
  57. }
  58. /* LAYOUT_left_handed
  59. * ┌───┬───┐
  60. * │01 │02 │
  61. * ┌───┼───┼───┼───┐
  62. * │10 │11 │12 │13 │
  63. * ├───┼───┼───┼───┤
  64. * │ │21 │22 │23 │
  65. * │20 ├───┼───┼───┤
  66. * │ │31 │32 │33 │
  67. * ├───┼───┼───┼───┤
  68. * │ │41 │42 │43 │
  69. * │40 ├───┼───┴───┤
  70. * │ │51 │ 52 │
  71. * └───┴───┴───────┘
  72. */
  73. #define LAYOUT_left_handed( \
  74. K01, K02, \
  75. K10, K11, K12, K13, \
  76. K21, K22, K23, \
  77. K20, K31, K32, K33, \
  78. K41, K42, K43, \
  79. K40, K51, K52 \
  80. ) \
  81. { \
  82. { ___, K01, K02, ___, }, \
  83. { K10, K11, K12, K13, }, \
  84. { K20, K21, K22, K23, }, \
  85. { ___, K31, K32, K33, }, \
  86. { K40, K41, K42, K43, }, \
  87. { ___, K51, K52, ___, }, \
  88. }
  89. /* LAYOUT_right_handed
  90. * ┌───┬───┐
  91. * │01 │02 │
  92. * ┌───┼───┼───┼───┐
  93. * │10 │11 │12 │13 │
  94. * ├───┼───┼───┼───┤
  95. * │20 │21 │22 │ │
  96. * ├───┼───┼───┤23 │
  97. * │30 │31 │32 │ │
  98. * ├───┼───┼───┼───┤
  99. * │40 │41 │42 │ │
  100. * ├───┴───┼───┤43 │
  101. * │ 50(not sure, confirm) │52 │ │
  102. * └───────┴───┴───┘
  103. */
  104. //NOT TESTED, WAITING ENDORSEMENT FROM MANUFACTURER
  105. #define LAYOUT_right_handed( \
  106. K01, K02, \
  107. K10, K11, K12, K13, \
  108. K20, K21, K22, \
  109. K30, K31, K32, K23, \
  110. K40, K41, K42, \
  111. K50, K52, K43 \
  112. ) \
  113. { \
  114. { ___, K01, K02, ___, }, \
  115. { K10, K11, K12, K13, }, \
  116. { K20, K21, K22, K23, }, \
  117. { K30, K31, K32, ___, }, \
  118. { K40, K41, K42, K43, }, \
  119. { K50, ___, K52, ___, }, \
  120. }