Guest User

Untitled

a guest
May 6th, 2016
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.46 KB | None | 0 0
  1. /*
  2. Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
  3.  
  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.  
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13.  
  14. You should have received a copy of the GNU General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef KEYMAP_COMMON_H
  18. #define KEYMAP_COMMON_H
  19.  
  20. #include <stdint.h>
  21. #include <stdbool.h>
  22. #include "keycode.h"
  23. #include "action.h"
  24. #include "action_macro.h"
  25. #include "report.h"
  26. #include "host.h"
  27. #include "print.h"
  28. #include "debug.h"
  29. #include "keymap.h"
  30.  
  31.  
  32. extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
  33. extern const uint16_t fn_actions[];
  34.  
  35.  
  36. /* GH60 keymap definition macro
  37. * K2C, K31 and K3C are extra keys for ISO
  38. */
  39. #define KEYMAP( \
  40. KFA,KFB,KFC,KFD,KFE,KFF, \
  41. KEA,KEB,KEC,KED,KEE,KEF, \
  42. KDA,KDB,KDC,KDD,KDE,KDF, \
  43. KCA,KCB,KCC,KCD,KCE,KCF, \
  44. KBA,KBB,KBC,KBD,KBE,KBF, \
  45. KAA,KAB,KAC,KAD,KAE,KAF, \
  46. K9A, K9B, K9C, K9D, K9E, K9F, \
  47. K8A, K8B, K8C, K8D, K8E, K8F, \
  48. K7A, K7B, K7C, K7D, K7E, K7F, \
  49. K6A, K6B, K6C, K6D, K6E, K6F, \
  50. K5A, K5B, K5C, K5D, K5E, K5F, \
  51. K4A, K4B, K4C, K4D, K4E, K4F, \
  52. K3A, K3B, K3C, K3D, K3E, K3F, \
  53. K2A, K2B, K2C, K2D, K2E, K2F, \
  54. K1A, K1B, K1C, K1D, K1E, K1F, \
  55. K0A, K0B, K0C, K0D, K0E, K0F \
  56. ) { \
  57. { KC_##KFA, KC_##KFB, KC_##KFC, KC_##KFD, KC_##KFE, KC_##KFF}, \
  58. { KC_##KEA, KC_##KEB, KC_##KEC, KC_##KED, KC_##KEE, KC_##KEF}, \
  59. { KC_##KDA, KC_##KDB, KC_##KDC, KC_##KDD, KC_##KDE, KC_##KDF}, \
  60. { KC_##KCA, KC_##KCB, KC_##KCC, KC_##KCD, KC_##KCE, KC_##KCF}, \
  61. { KC_##KBA, KC_##KBB, KC_##KBC, KC_##KBD, KC_##KBE, KC_##KBF}, \
  62. { KC_##KAA, KC_##KAB, KC_##KAC, KC_##KAD, KC_##KAE, KC_##KAF}, \
  63. { KC_##K9A, KC_##K9B, KC_##K9C, KC_##K9D, KC_##K9E, KC_##K9F}, \
  64. { KC_##K8A, KC_##K8B, KC_##K8C, KC_##K8D, KC_##K8E, KC_##K8F}, \
  65. { KC_##K7A, KC_##K7B, KC_##K7C, KC_##K7D, KC_##K7E, KC_##K7F}, \
  66. { KC_##K6A, KC_##K6B, KC_##K6C, KC_##K6D, KC_##K6E, KC_##K6F}, \
  67. { KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F}, \
  68. { KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F}, \
  69. { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F}, \
  70. { KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F}, \
  71. { KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F}, \
  72. { KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F} \
  73. }
  74.  
  75. /* ANSI valiant. No extra keys for ISO */
  76. #define KEYMAP_ANSI( \
  77. K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
  78. K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
  79. K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
  80. K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
  81. K40, K41, K42, K45, K4A, K4B, K4C, K4D \
  82. ) KEYMAP( \
  83. K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
  84. K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
  85. K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \
  86. K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO, K3D, \
  87. K40, K41, K42, K45, NO, K4A, K4B, K4C, K4D \
  88. )
  89.  
  90.  
  91. #define KEYMAP_HHKB( \
  92. K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\
  93. K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
  94. K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
  95. K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \
  96. K40, K41, K42, K45, K4A, K4B, K4C, K4D \
  97. ) KEYMAP( \
  98. K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
  99. K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
  100. K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \
  101. K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
  102. K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \
  103. )
  104.  
  105. #endif
Add Comment
Please, Sign In to add comment