hrs_nav.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. #pragma once
  2. /*
  3. Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
  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. 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. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. //
  16. // shift on home row pinkies, nav on home row middle finger.
  17. // no edge keys.
  18. // input 5 get 5 with mods applied.
  19. // input 6 get 6 with mods applied.
  20. // base cols in out. 5, 5_6, 6.
  21. // input column count, output column count, if different.
  22. // L_5 Left R_5 Right.
  23. // K01, K02, K03, K04, K05 - K01, K02, K03, K04, K05
  24. // pky, rng, mdl, idx, idx - idx, idx, mdl, rng, pnky
  25. // ROW0 - Number row.
  26. // LEFT.
  27. #define ROW0L_5_hrs_nav(K01, K02, K03, K04, K05) \
  28. K01, K02, K03, K04, K05
  29. // take and put an extra column in front. Mod K01 how you want it.
  30. #define ROW0L_6_hrs_nav(K01, K02, K03, K04, K05, K06) K01, \
  31. ROW0L_5_hrs_nav(K02, K03, K04, K05, K06)
  32. // 5 into 6, derivitive of the first two.
  33. #define ROW0L_5_6_hrs_nav(K01, K02, K03, K04, K05) \
  34. ROW0L_6_hrs_nav(LEFT_0, K01, K02, K03, K04, K05)
  35. // RIGHT.
  36. #define ROW0R_5_hrs_nav(K01, K02, K03, K04, K05) \
  37. K01, K02, K03, K04, K05
  38. // take and put an extra column in front. Mod K01 how you want it.
  39. #define ROW0R_6_hrs_nav(K01, K02, K03, K04, K05, K06) \
  40. ROW0R_5_hrs_nav(K01, K02, K03, K04, K05), K06
  41. // 5 into 6, derivitive of the first two.
  42. #define ROW0R_5_6_hrs_nav(K01, K02, K03, K04, K05) \
  43. ROW0R_6_hrs_nav(K01, K02, K03, K04, K05, RIGHT_0)
  44. // ROW1
  45. // LEFT.
  46. #define ROW1L_5_hrs_nav(K01, K02, K03, K04, K05) \
  47. K01, K02, K03, K04, K05
  48. // take and put an extra column in front. Mod K01 how you want it.
  49. #define ROW1L_6_hrs_nav(K01, K02, K03, K04, K05, K06) K01, \
  50. ROW1L_5_hrs_nav(K02, K03, K04, K05, K06)
  51. // 5 into 6, derivitive of the first two.
  52. #define ROW1L_5_6_hrs_nav(K01, K02, K03, K04, K05) \
  53. ROW1L_6_hrs_nav(LEFT_1, K01, K02, K03, K04, K05)
  54. // RIGHT.
  55. #define ROW1R_5_hrs_nav(K01, K02, K03, K04, K05) \
  56. K01, K02, K03, K04, K05 \
  57. // take and put an extra column in front. Mod K01 how you want it.
  58. #define ROW1R_6_hrs_nav(K01, K02, K03, K04, K05, K06) \
  59. ROW1R_5_hrs_nav(K01, K02, K03, K04, K05), K06
  60. // 5 into 6, derivitive of the first two.
  61. #define ROW1R_5_6_hrs_nav(K01, K02, K03, K04, K05) \
  62. ROW1R_6_hrs_nav(K01, K02, K03, K04, K05, RIGHT_1)
  63. // HOME ROW - ROW2
  64. // LEFT.
  65. #define ROW2L_5_hrs_nav(K01, K02, K03, K04, K05) \
  66. MT(MOD_LSFT, K01), K02, LT(_NAV, K03), K04, K05
  67. // take and put an extra column in front. Mod K01 how you want it.
  68. #define ROW2L_6_hrs_nav(K01, K02, K03, K04, K05, K06) K01, \
  69. ROW2L_5_hrs_nav(K02, K03, K04, K05, K06)
  70. // 5 into 6, derivitive of the first two.
  71. #define ROW2L_5_6_hrs_nav(K01, K02, K03, K04, K05) \
  72. ROW2L_6_hrs_nav(LEFT_2, K01, K02, K03, K04, K05)
  73. // RIGHT.
  74. #define ROW2R_5_hrs_nav(K01, K02, K03, K04, K05) \
  75. K01, K02, LT(_NAV, K03), K04, MT(MOD_LSFT, K05) \
  76. // take and put an extra column in front. Mod K01 how you want it.
  77. #define ROW2R_6_hrs_nav(K01, K02, K03, K04, K05, K06) \
  78. ROW2R_5_hrs_nav(K01, K02, K03, K04, K05), K06
  79. // 5 into 6, derivitive of the first two.
  80. #define ROW2R_5_6_hrs_nav(K01, K02, K03, K04, K05) \
  81. ROW2R_6_hrs_nav(K01, K02, K03, K04, K05, RIGHT_2)
  82. // ROW 3
  83. // LEFT.
  84. #define ROW3L_5_hrs_nav(K01, K02, K03, K04, K05) \
  85. K01, K02, LT(_NAV, K03), K04, MT(MOD_LSFT, K05)
  86. // take and put an extra column in front. Mod K01 how you want it.
  87. #define ROW3L_6_hrs_nav(K01, K02, K03, K04, K05, K06) K01, \
  88. ROW3L_5_hrs_nav(K02, K03, K04, K05, K06)
  89. // 5 into 6, derivitive of the first two.
  90. #define ROW3L_5_6_hrs_nav(K01, K02, K03, K04, K05) \
  91. ROW3L_6_hrs_nav(LEFT_3, K01, K02, K03, K04, K05)
  92. // RIGHT.
  93. #define ROW3R_5_hrs_nav(K01, K02, K03, K04, K05) \
  94. K01, K02, K03, K04, K05
  95. // take and put an extra column in front. Mod K01 how you want it.
  96. #define ROW3R_6_hrs_nav(K01, K02, K03, K04, K05, K06) K01, \
  97. ROW3R_5_hrs_nav(K02, K03, K04, K05, K06)
  98. // 5 into 6, derivitive of the first two.
  99. #define ROW3R_5_6_hrs_nav(K01, K02, K03, K04, K05) \
  100. ROW3R_6_hrs_nav(K01, K02, K03, K04, K05, RIGHT_3)