keymap_helpers.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /* Copyright 2021 Matt Gauf
  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. // clang-format off
  17. #include <inttypes.h>
  18. #include "rgb_matrix_types.h"
  19. /* Color Codes */
  20. #define LEDWHIT 0xff, 0xff, 0xff
  21. #define LED_RED 0xff, 0x00, 0x00
  22. #define LEDORAN 0xff, 0x29, 0x00
  23. #define LEDGOLD 0xff, 0x80, 0x00
  24. #define LEDYELL 0xff, 0xff, 0x00
  25. #define LEDCHAR 0x80, 0xff, 0x00
  26. #define LEDGREE 0x00, 0xff, 0x00
  27. #define LEDFOAM 0x00, 0xff, 0x40
  28. #define LEDTEAL 0x00, 0x80, 0xff
  29. #define LEDBLUE 0x00, 0x00, 0xff
  30. #define LEDPURP 0x80, 0x00, 0xff
  31. #define LEDMAGE 0xff, 0x00, 0xff
  32. #define LEDPINK 0xff, 0x00, 0x80
  33. #define LEDBLAC 0x00, 0x00, 0x00
  34. #define LED_OFF 0x00, 0x00, 0x00
  35. /* Color Functions */
  36. void rgb_matrix_set_color_flags(uint8_t red, uint8_t green, uint8_t blue, uint8_t flags);
  37. /* Function Row */
  38. #define PIN_ESC 0
  39. #define PIN_F1 6
  40. #define PIN_F2 12
  41. #define PIN_F3 18
  42. #define PIN_F4 23
  43. #define PIN_F5 28
  44. #define PIN_F6 34
  45. #define PIN_F7 39
  46. #define PIN_F8 44
  47. #define PIN_F9 50
  48. #define PIN_F10 56
  49. #define PIN_F11 61
  50. #define PIN_F12 66
  51. #define PIN_PRINT 69
  52. /* Number Row */
  53. #define PIN_0 57
  54. #define PIN_1 7
  55. #define PIN_2 13
  56. #define PIN_3 19
  57. #define PIN_4 24
  58. #define PIN_5 29
  59. #define PIN_6 35
  60. #define PIN_7 40
  61. #define PIN_8 45
  62. #define PIN_9 51
  63. /* QWERTY */
  64. #define PIN_A 9
  65. #define PIN_B 32
  66. #define PIN_C 22
  67. #define PIN_D 21
  68. #define PIN_E 20
  69. #define PIN_F 26
  70. #define PIN_G 31
  71. #define PIN_H 37
  72. #define PIN_I 46
  73. #define PIN_J 42
  74. #define PIN_K 47
  75. #define PIN_L 53
  76. #define PIN_M 43
  77. #define PIN_N 38
  78. #define PIN_O 52
  79. #define PIN_P 58
  80. #define PIN_Q 8
  81. #define PIN_R 25
  82. #define PIN_S 15
  83. #define PIN_T 30
  84. #define PIN_U 41
  85. #define PIN_V 27
  86. #define PIN_W 14
  87. #define PIN_X 16
  88. #define PIN_Y 36
  89. #define PIN_Z 10
  90. /* Symbols */
  91. #define PIN_MINUS 62
  92. #define PIN_EQUAL 78
  93. #define PIN_RBRACKET 89
  94. #define PIN_LBRACKET 63
  95. #define PIN_BSLASH 93
  96. #define PIN_SLASH 60
  97. #define PIN_SCOLON 59
  98. #define PIN_QUOTE 64
  99. #define PIN_COMMA 48
  100. #define PIN_DOT 54
  101. #define PIN_GRAVE 1
  102. /* Indentation */
  103. #define PIN_TAB 2
  104. #define PIN_SPACE 33
  105. /* Line Control */
  106. #define PIN_BSPACE 85
  107. #define PIN_ENTER 96
  108. /* Indicator */
  109. #define PIN_CAPS 3
  110. /* Left Modifiers */
  111. #define PIN_LSHIFT 4
  112. #define PIN_LCTRL 5
  113. #define PIN_LALT 17
  114. #define PIN_LGUI 11
  115. /* Right Modifiers */
  116. #define PIN_RSHIFT 90
  117. #define PIN_RCTRL 65
  118. #define PIN_RALT 49
  119. #define PIN_FN 55
  120. /* Arrow Keys */
  121. #define PIN_UP 94
  122. #define PIN_DOWN 97
  123. #define PIN_LEFT 95
  124. #define PIN_RIGHT 79
  125. /* Fn Column */
  126. #define PIN_DEL 72 // ┳ TOP
  127. #define PIN_PGUP 75 // ┃
  128. #define PIN_PGDN 86 // ┃
  129. #define PIN_END 82 // ┻ BOTTOM
  130. /* Left Side Underglow */
  131. #define PIN_LED_L01 67 // ┳ TOP
  132. #define PIN_LED_L02 70 // ┃
  133. #define PIN_LED_L03 73 // ┃
  134. #define PIN_LED_L04 76 // ┃
  135. #define PIN_LED_L05 80 // ┃
  136. #define PIN_LED_L06 83 // ┃
  137. #define PIN_LED_L07 87 // ┃
  138. #define PIN_LED_L08 91 // ┻ BOTTOM
  139. /* Right Side Underglow */
  140. #define PIN_LED_L11 68 // ┳ TOP
  141. #define PIN_LED_L12 71 // ┃
  142. #define PIN_LED_L13 74 // ┃
  143. #define PIN_LED_L14 77 // ┃
  144. #define PIN_LED_L15 81 // ┃
  145. #define PIN_LED_L16 84 // ┃
  146. #define PIN_LED_L17 88 // ┃
  147. #define PIN_LED_L18 92 // ┻ BOTTOM
  148. // clang-format on