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.

50 lines
1.7 KiB

  1. /* Copyright 2020
  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. #include QMK_KEYBOARD_H
  17. // Tap Dance declarations
  18. enum {
  19. F13F19,
  20. F14F20,
  21. F15F21,
  22. F16F22,
  23. F17F23,
  24. F18F24,
  25. };
  26. // Tap Dance definitions
  27. tap_dance_action_t tap_dance_actions[] = {
  28. // Tap once for F13 to F18, twice for F19 to F24
  29. [F13F19] = ACTION_TAP_DANCE_DOUBLE(KC_F13, KC_F19), [F14F20] = ACTION_TAP_DANCE_DOUBLE(KC_F14, KC_F20), [F15F21] = ACTION_TAP_DANCE_DOUBLE(KC_F15, KC_F21),
  30. [F16F22] = ACTION_TAP_DANCE_DOUBLE(KC_F16, KC_F22), [F17F23] = ACTION_TAP_DANCE_DOUBLE(KC_F17, KC_F23), [F18F24] = ACTION_TAP_DANCE_DOUBLE(KC_F18, KC_F24)
  31. };
  32. // Add tap dance item in place of a key code
  33. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  34. /* 2x3 layout
  35. * .-----------------------------.
  36. * | F13/F19 | D14/F20 | F15/F21 |
  37. * |---------+---------+---------+
  38. * | F16/F22 | D17/F23 | F18/F24 |
  39. * '-----------------------------'
  40. */
  41. [0] = LAYOUT_ortho_2x3(/* F13 to F24 */
  42. TD(F13F19), TD(F14F20), TD(F15F21),
  43. TD(F16F22), TD(F17F23), TD(F18F24)
  44. ),
  45. };