logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

tap_dances.h (1546B)


  1. /* Copyright 2024 Vaarai
  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. /* Tap dances definitions */
  19. enum tap_dances {
  20. TD_SFT_CAPSW,
  21. TD_NAV_ACCENT,
  22. TD_NUM_ACCENT,
  23. TAP_DANCE_ACTIONS_COUNT /* Utility to get TD_xxx count */
  24. };
  25. /* Accented letters */
  26. typedef enum {
  27. ACCENT_NONE,
  28. ACCENT_LEFT,
  29. ACCENT_RIGHT
  30. } accent_state_t;
  31. extern accent_state_t accent_state;
  32. extern tap_dance_action_t tap_dance_actions[TAP_DANCE_ACTIONS_COUNT];
  33. void dance_shift_capsword_finished (tap_dance_state_t *state, void *user_data);
  34. void dance_shift_capsword_reset (tap_dance_state_t *state, void *user_data);
  35. void dance_nav_accent_finished (tap_dance_state_t *state, void *user_data);
  36. void dance_nav_accent_reset (tap_dance_state_t *state, void *user_data);
  37. void dance_num_accent_finished (tap_dance_state_t *state, void *user_data);
  38. void dance_num_accent_reset (tap_dance_state_t *state, void *user_data);