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.

51 lines
1.9 KiB

  1. /* Copyright 2021 imchipwood
  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 "quantum.h"
  18. // change the tapping term to a little bit quicker
  19. #ifdef TAPPING_TERM
  20. #undef TAPPING_TERM
  21. #endif
  22. #define TAPPING_TERM 175
  23. #ifdef TAPPING_TOGGLE
  24. #undef TAPPING_TOGGLE
  25. #endif
  26. #define TAPPING_TOGGLE 2
  27. enum td_keycodes {
  28. TD_REND = 0, // right when tapped, end when double tapped
  29. TD_LOME, // left when tapped, home when double tapped
  30. TD_RSFT_CAPS,
  31. ALT_F2, // F2 when tapped, LALT when held, LALT+F2 when double tapped
  32. CTL_F5, // F5 when tapped, LCTL when held, LCTL+F5 when double tapped
  33. ALT_F7, // F7 when tapped, LALT when held, LALT+F7 when double tapped
  34. DEL_NLCK, // DEL when tapped, NUMLOCK when double tapped
  35. };
  36. typedef enum { SINGLE_TAP, SINGLE_HOLD, DOUBLE_TAP } td_state_t;
  37. int cur_dance(qk_tap_dance_state_t *state);
  38. void altf2_finished(qk_tap_dance_state_t *state, void *user_data);
  39. void altf2_reset(qk_tap_dance_state_t *state, void *user_data);
  40. void ctlf5_finished(qk_tap_dance_state_t *state, void *user_data);
  41. void ctlf5_reset(qk_tap_dance_state_t *state, void *user_data);
  42. void altf7_finished(qk_tap_dance_state_t *state, void *user_data);
  43. void altf7_reset(qk_tap_dance_state_t *state, void *user_data);