You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.4 KiB

  1. #pragma once
  2. #include "quantum.h"
  3. #include "version.h"
  4. enum my_layers {
  5. _NUMPAD = 0, //Macropad numpad
  6. _NAVKEY, //Macropad nav keys
  7. _MEDIA, //Macropad media controls
  8. _RGB, //Macropad RGB controls
  9. _FN1PAD, //Macropad reset and make commands
  10. _QWERTY = 0, //Qwerty with custom shortcuts and functions
  11. _DEFAULT, //Default ANSI for gaming, enable with FN2+RCtl
  12. _FN1_60, //Function keys, arrows, custom shortcuts, volume control
  13. _FN2_60 //RGB Underglow controls and RESET
  14. };
  15. //Aliases for longer keycodes
  16. #define KC_CAD LALT(LCTL(KC_DEL))
  17. #define KC_LOCK LGUI(KC_L)
  18. #define CA_QUOT LCA(KC_QUOT)
  19. #define CA_SCLN LCA(KC_SCLN)
  20. #define KC_CTLE LCTL_T(KC_ESC)
  21. #define LT_SPCF LT(_FN1_60, KC_SPC)
  22. #define LT_BPCF LT(_FN1_60, KC_BSPC)
  23. #define TD_TESC TD(TD_ESC)
  24. #define TD_TWIN TD(TD_WIN)
  25. #define TD_TCTL TD(TD_RCTL)
  26. #define CA_COPY LCTL(KC_C)
  27. #define CA_PSTE LCTL(KC_V)
  28. enum cust_keys {
  29. KC_MAKE = SAFE_RANGE,
  30. KC_RDP
  31. };
  32. enum tap_dance {
  33. TD_WIN,
  34. TD_ESC,
  35. TD_RCTL
  36. };
  37. // define a type containing as many tapdance states as you need
  38. typedef enum {
  39. SINGLE_TAP,
  40. SINGLE_HOLD,
  41. DOUBLE_TAP
  42. } td_state_t;
  43. // function to determine the current tapdance state
  44. int cur_dance (qk_tap_dance_state_t *state);
  45. // `finished` and `reset` functions for each tapdance keycode
  46. void ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data);
  47. void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data);