drashna.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. Copyright 2017 Christopher Courtney <drashna@live.com> @drashna
  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. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #ifndef USERSPACE
  15. #define USERSPACE
  16. #include "quantum.h"
  17. #include "song_list.h"
  18. // Define layer names
  19. #define _QWERTY 0
  20. #define _NUMLOCK 0
  21. #define _COLEMAK 1
  22. #define _DVORAK 2
  23. #define _WORKMAN 3
  24. #define _NAV 5
  25. #define _COVECUBE 6
  26. #define _SYMB 8
  27. #define _OVERWATCH 9
  28. #define _DIABLO 10
  29. #define _MOUS 11
  30. #define _MACROS 12
  31. #define _MEDIA 13
  32. #define _LOWER 14
  33. #define _RAISE 15
  34. #define _ADJUST 16
  35. //define modifiers
  36. #define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
  37. #define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL))
  38. #define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
  39. #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))
  40. #ifdef RGBLIGHT_ENABLE
  41. #define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF);
  42. #define rgblight_set_red rgblight_sethsv (0x00, 0xFF, 0xFF);
  43. #define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF);
  44. #define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF);
  45. #define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF);
  46. #define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF);
  47. #define rgblight_set_yellow rgblight_sethsv (0x3C, 0xFF, 0xFF);
  48. #define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF);
  49. #endif
  50. extern bool is_overwatch;
  51. extern bool rgb_layer_change;
  52. enum userrpace_custom_keycodes {
  53. PLACEHOLDER = SAFE_RANGE, // can always be here
  54. EPRM,
  55. VRSN,
  56. KC_QWERTY,
  57. KC_COLEMAK,
  58. KC_DVORAK,
  59. KC_WORKMAN,
  60. LOWER,
  61. RAISE,
  62. ADJUST,
  63. KC_DIABLO_CLEAR,
  64. KC_OVERWATCH,
  65. KC_SALT,
  66. KC_MORESALT,
  67. KC_SALTHARD,
  68. KC_GOODGAME,
  69. KC_SYMM,
  70. KC_JUSTGAME,
  71. KC_GLHF,
  72. KC_TORB,
  73. KC_AIM,
  74. KC_C9,
  75. KC_GGEZ,
  76. KC_MAKE,
  77. KC_RESET,
  78. KC_RGB_T,
  79. KC_SECRET_1,
  80. KC_SECRET_2,
  81. KC_SECRET_3,
  82. KC_SECRET_4,
  83. KC_SECRET_5,
  84. NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
  85. };
  86. #ifdef TAP_DANCE_ENABLE
  87. enum {
  88. TD_D3_1 = 0,
  89. TD_D3_2,
  90. TD_D3_3,
  91. TD_D3_4
  92. };
  93. #endif
  94. #define QMK_KEYS_PER_SCAN 4
  95. #ifdef RGBLIGHT_ENABLE
  96. #define RGBLIGHT_SLEEP
  97. #endif
  98. #endif