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.

65 lines
1.6 KiB

  1. /* Copyright 2020 Guillaume Gérard
  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 QMK_KEYBOARD_H
  18. #include "greatwizard.h"
  19. typedef struct {
  20. bool is_press_action;
  21. uint8_t state;
  22. } tap;
  23. enum {
  24. SINGLE_TAP = 1,
  25. SINGLE_HOLD,
  26. DOUBLE_TAP,
  27. DOUBLE_HOLD,
  28. DOUBLE_SINGLE_TAP,
  29. TRIPLE_TAP,
  30. TRIPLE_HOLD
  31. };
  32. enum {
  33. #ifdef TAP_DANCE_LALT_GIT
  34. TD_LALT_GIT,
  35. #endif
  36. #ifdef TAP_DANCE_LSFT_CAPS
  37. TD_LSFT_CAPS,
  38. # ifdef LAYERS_PROGRAMMER
  39. TD_PG_LSFT_CAPS,
  40. # endif
  41. #endif
  42. };
  43. uint8_t cur_dance(qk_tap_dance_state_t *state);
  44. #ifdef TAP_DANCE_LALT_GIT
  45. void lalt_finished(qk_tap_dance_state_t *state, void *user_data);
  46. void lalt_reset(qk_tap_dance_state_t *state, void *user_data);
  47. # define TD_LALT TD(TD_LALT_GIT)
  48. #endif
  49. #ifdef TAP_DANCE_LSFT_CAPS
  50. # ifdef LAYERS_PROGRAMMER
  51. void pg_lsft_finished(qk_tap_dance_state_t *state, void *user_data);
  52. void pg_lsft_reset(qk_tap_dance_state_t *state, void *user_data);
  53. # endif
  54. #endif
  55. #ifdef TAP_DANCE_LSFT_CAPS
  56. # define TD_LSCP TD(TD_LSFT_CAPS)
  57. #endif