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.

34 lines
1.3 KiB

  1. /* Copyright 2020 Sergi Meseguer <zigotica@gmail.com>
  2. This program is free software: you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation, either version 2 of the License, or
  5. (at your option) any later version.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program. If not, see <http://www.gnu.org/licenses/>.
  12. */
  13. #include "tapdances.h"
  14. void ios_media(qk_tap_dance_state_t *state, void *user_data) {
  15. if (state->count == 1) {
  16. tap_code(KC_MPLY);
  17. } else if (state->count == 2) {
  18. tap_code(KC_MNXT);
  19. } else if (state->count == 3) {
  20. tap_code(KC_MPRV);
  21. } else {
  22. reset_tap_dance(state);
  23. }
  24. }
  25. qk_tap_dance_action_t tap_dance_actions[] = {
  26. [0] = ACTION_TAP_DANCE_FN(ios_media),
  27. [1] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_SCOLON),
  28. [2] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_COLON),
  29. [3] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC),
  30. [4] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_RPRN),
  31. };