process_records.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
  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. #pragma once
  17. #include "drashna.h"
  18. #if defined(KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball)
  19. # define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE
  20. #else
  21. # define PLACEHOLDER_SAFE_RANGE SAFE_RANGE
  22. #endif
  23. enum userspace_custom_keycodes {
  24. VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info
  25. KC_QWERTY, // Sets default layer to QWERTY
  26. KC_COLEMAK, // Sets default layer to COLEMAK
  27. KC_DVORAK, // Sets default layer to DVORAK
  28. KC_WORKMAN, // Sets default layer to WORKMAN
  29. KC_DIABLO_CLEAR, // Clears all Diablo Timers
  30. KC_MAKE, // Run keyboard's customized make command
  31. KC_RGB_T, // Toggles RGB Layer Indication mode
  32. RGB_IDL, // RGB Idling animations
  33. KC_SECRET_1, // test1
  34. KC_SECRET_2, // test2
  35. KC_SECRET_3, // test3
  36. KC_SECRET_4, // test4
  37. KC_SECRET_5, // test5
  38. KC_CCCV, // Hold to copy, tap to paste
  39. KC_NUKE, // NUCLEAR LAUNCH DETECTED!!!
  40. UC_FLIP, // (ಠ痊ಠ)┻━┻
  41. UC_TABL, // ┬─┬ノ( º _ ºノ)
  42. UC_SHRG, // ¯\_(ツ)_/¯
  43. UC_DISA, // ಠ_ಠ
  44. NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
  45. };
  46. bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
  47. bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
  48. #define LOWER MO(_LOWER)
  49. #define RAISE MO(_RAISE)
  50. #define ADJUST MO(_ADJUST)
  51. #define TG_MODS OS_TOGG
  52. #define TG_GAME TG(_GAMEPAD)
  53. #define TG_DBLO TG(_DIABLO)
  54. #define OS_LWR OSL(_LOWER)
  55. #define OS_RSE OSL(_RAISE)
  56. #define KC_SEC1 KC_SECRET_1
  57. #define KC_SEC2 KC_SECRET_2
  58. #define KC_SEC3 KC_SECRET_3
  59. #define KC_SEC4 KC_SECRET_4
  60. #define KC_SEC5 KC_SECRET_5
  61. #define QWERTY KC_QWERTY
  62. #define DVORAK KC_DVORAK
  63. #define COLEMAK KC_COLEMAK
  64. #define WORKMAN KC_WORKMAN
  65. #define KC_RESET RESET
  66. #define KC_RST KC_RESET
  67. #ifdef SWAP_HANDS_ENABLE
  68. # define KC_C1R3 SH_T(KC_TAB)
  69. #elif defined(DRASHNA_LP)
  70. # define KC_C1R3 TG(_GAMEPAD)
  71. #else // SWAP_HANDS_ENABLE
  72. # define KC_C1R3 KC_TAB
  73. #endif // SWAP_HANDS_ENABLE
  74. #define BK_LWER LT(_LOWER, KC_BSPC)
  75. #define SP_LWER LT(_LOWER, KC_SPC)
  76. #define DL_RAIS LT(_RAISE, KC_DEL)
  77. #define ET_RAIS LT(_RAISE, KC_ENTER)
  78. /* OSM keycodes, to keep things clean and easy to change */
  79. #define KC_MLSF OSM(MOD_LSFT)
  80. #define KC_MRSF OSM(MOD_RSFT)
  81. #define OS_LGUI OSM(MOD_LGUI)
  82. #define OS_RGUI OSM(MOD_RGUI)
  83. #define OS_LSFT OSM(MOD_LSFT)
  84. #define OS_RSFT OSM(MOD_RSFT)
  85. #define OS_LCTL OSM(MOD_LCTL)
  86. #define OS_RCTL OSM(MOD_RCTL)
  87. #define OS_LALT OSM(MOD_LALT)
  88. #define OS_RALT OSM(MOD_RALT)
  89. #define OS_MEH OSM(MOD_MEH)
  90. #define OS_HYPR OSM(MOD_HYPR)
  91. #define ALT_APP ALT_T(KC_APP)
  92. #define MG_NKRO MAGIC_TOGGLE_NKRO
  93. #define UC_IRNY UC(0x2E2E)
  94. #define UC_CLUE UC(0x203D)