Guest User

Untitled

a guest
May 7th, 2016
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.28 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. K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \
  41. K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, \
  42. K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, \
  43. K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, \
  44. K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, \
  45. K0A, K0C, K0D, K0G, K0J, K0K, K0L, K0M, K0N, K0O, K0P \
  46. ) { \
  47. { KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F, KC_##K5G, KC_##K5H, KC_##K5I, KC_##K5J, KC_##K5K, KC_##K5L, KC_##K5M, KC_##K5N, KC_##K5O, KC_##K5P}, \
  48. { KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F, KC_##K4G, KC_##K4H, KC_##K4I, KC_##K4J, KC_##K4K, KC_##K4L, KC_##K4M, KC_##K4N, KC_##K4O, KC_##K4P}, \
  49. { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F, KC_##K3G, KC_##K3H, KC_##K3I, KC_##K3J, KC_##K3K, KC_##K3L, KC_##K3M, KC_##K3N, KC_##K3O, KC_##K3P}, \
  50. { KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F, KC_##K2G, KC_##K2H, KC_##K2I, KC_##K2J, KC_##K2K, KC_##K2L, KC_##K2M, KC_##K2N, KC_NO, KC_NO}, \
  51. { KC_##K1A, KC_NO, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F, KC_##K1G, KC_##K1H, KC_##K1I, KC_##K1J, KC_##K1K, KC_##K1L, KC_##K1M, KC_##K1N, KC_##K1O, KC_NO}, \
  52. { KC_##K0A, KC_NO, KC_##K0C, KC_##K0D, KC_NO, KC_NO, KC_##K0G, KC_NO, KC_NO, KC_##K0J, KC_##K0K, KC_##K0L, KC_##K0M, KC_##K0N, KC_##K0O, KC_##K0P} \
  53. }
  54.  
  55. /* ANSI valiant. No extra keys for ISO */
  56. #define KEYMAP_ANSI( \
  57. K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
  58. K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
  59. K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
  60. K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
  61. K40, K41, K42, K45, K4A, K4B, K4C, K4D \
  62. ) KEYMAP( \
  63. K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
  64. K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
  65. K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \
  66. K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO, K3D, \
  67. K40, K41, K42, K45, NO, K4A, K4B, K4C, K4D \
  68. )
  69.  
  70.  
  71. #define KEYMAP_HHKB( \
  72. K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\
  73. K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
  74. K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
  75. K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \
  76. K40, K41, K42, K45, K4A, K4B, K4C, K4D \
  77. ) KEYMAP( \
  78. K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
  79. K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
  80. K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \
  81. K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
  82. K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \
  83. )
  84.  
  85. #endif
Add Comment
Please, Sign In to add comment