tapmods.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* Copyright 2020 Stephen Bush
  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. /* Define a stand-in from dancelayers.h in case tap-dance isn't enabled */
  19. #ifndef TAP_DANCE_ENABLE
  20. # define TD_LAYR XXXXXXX
  21. #endif
  22. /* Misc */
  23. #define HY_ESC HYPR_T(KC_ESC)
  24. #define HY_BSPC HYPR_T(KC_BSPC)
  25. /* Tap Mod Layers */
  26. #define LOWER MO(_LOWER)
  27. #define RAISE MO(_RAISE)
  28. #define NAV MO(_NAV)
  29. #define ADJ_DEL LT(_ADJUST, KC_DEL)
  30. #define LOW_ENT LT(_LOWER, KC_ENT)
  31. #define LOW_SPC LT(_LOWER, KC_SPC)
  32. #define LOW_BSP LT(_LOWER, KC_BSPC)
  33. #define NAV_SPC LT(_NAV, KC_SPC)
  34. #define RAI_BSP LT(_RAISE, KC_BSPC)
  35. #define RAI_ENT LT(_RAISE, KC_ENT)
  36. #define RAI_SPC LT(_RAISE, KC_SPC)
  37. #define RAI_TAB LT(_RAISE, KC_TAB)
  38. /* Miryoku Home-row Mods
  39. NOTE: Uses GACS.
  40. */
  41. // Left-hand home row mods (colemak)
  42. #define HR_A LGUI_T(KC_A)
  43. #define HR_R LALT_T(KC_R)
  44. #define HR_S LCTL_T(KC_S)
  45. #define HR_T LSFT_T(KC_T)
  46. // Right-hand home row mods (colemak)
  47. #define HR_N RSFT_T(KC_N)
  48. #define HR_E RCTL_T(KC_E)
  49. #define HR_I LALT_T(KC_I)
  50. #define HR_O RGUI_T(KC_O)
  51. // Right-hand Numpad
  52. #define HR_4 RSFT_T(KC_4)
  53. #define HR_5 RCTL_T(KC_5)
  54. #define HR_6 LALT_T(KC_6)
  55. // Layout-specific mods
  56. #define TM_VSFT LSFT_T(KC_V) // For Using V in layer combos (e.g., planck)
  57. // GACS (Lower)
  58. #define HR_LBRC LCTL_T(KC_LBRC)
  59. #define HR_RBRC LSFT_T(KC_RBRC)
  60. // Left-hand home row mods (lower)---
  61. // #define HOME_UND LCTL_T(KC_UNDS) // NOTE: Mod-tap restricted to basic keycodes
  62. #define HOME_MIN LSFT_T(KC_MINS)