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.

121 lines
3.2 KiB

  1. /* Copyright 2019 Matthew Lyon
  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. #ifndef USERSPACE
  17. #define USERSPACE
  18. #include "quantum.h"
  19. enum {
  20. _BASE_MAC,
  21. _OVER_WIN,
  22. _NAVNUM,
  23. _NAVNUM_WIN,
  24. _SYMBOL,
  25. _GAME,
  26. _FUNCT,
  27. _FUNCT_WIN,
  28. };
  29. // == System
  30. #define TOG_WIN TG(_OVER_WIN)
  31. #define TOG_GAM TG(_GAME)
  32. // == Thumbs
  33. // left hand
  34. #define ESC_HYP MT(MOD_HYPR, KC_ESC)
  35. #define TAB_NUM LT(_NAVNUM, KC_TAB)
  36. #define SPC_SFT MT(MOD_LSFT, KC_SPC)
  37. #define ENT_SYM LT(_SYMBOL, KC_ENT)
  38. // right hand
  39. #define SPC_SFT MT(MOD_LSFT, KC_SPC)
  40. #define BSP_SYM LT(_SYMBOL, KC_BSPC)
  41. #define DEL_WRP MT(MOD_LCTL | MOD_LALT | MOD_LGUI, KC_DEL)
  42. #define NAVLOCK TG(_NAVNUM)
  43. #define SYMLOCK TG(_SYMBOL)
  44. // == QWERTY
  45. // left hand home row
  46. #define A_CTL MT(MOD_LCTL, KC_A)
  47. #define A_GUI MT(MOD_LGUI, KC_A)
  48. #define S_ALT MT(MOD_LALT, KC_S)
  49. #define D_GUI MT(MOD_LGUI, KC_D)
  50. #define D_CTL MT(MOD_LCTL, KC_D)
  51. #define F_SFT MT(MOD_LSFT, KC_F)
  52. // left hand aux
  53. #define W_CTL MT(MOD_LCTL, KC_W)
  54. #define W_GUI MT(MOD_LGUI, KC_W)
  55. #define E_ALT MT(MOD_LALT, KC_E)
  56. #define R_GUI MT(MOD_LGUI, KC_R)
  57. #define R_CTL MT(MOD_LCTL, KC_R)
  58. // right hand home row
  59. #define J_SFT MT(MOD_RSFT, KC_J)
  60. #define K_GUI MT(MOD_RGUI, KC_K)
  61. #define K_CTL MT(MOD_RCTL, KC_K)
  62. #define L_ALT MT(MOD_RALT, KC_L)
  63. #define MINSCTL MT(MOD_RCTL, KC_MINS)
  64. #define MINSGUI MT(MOD_RGUI, KC_MINS)
  65. // right hand aux
  66. #define U_GUI MT(MOD_RGUI, KC_U)
  67. #define U_CTL MT(MOD_RCTL, KC_U)
  68. #define I_ALT MT(MOD_RALT, KC_I)
  69. #define O_CTL MT(MOD_RCTL, KC_O)
  70. #define O_GUI MT(MOD_RGUI, KC_O)
  71. // == OS X default keys
  72. // movement by text
  73. #define M_BWORD LALT(KC_LEFT)
  74. #define W_BWORD LCTL(KC_LEFT)
  75. #define M_FWORD LALT(KC_RIGHT)
  76. #define W_FWORD LCTL(KC_RIGHT)
  77. #define M_BLINE LGUI(KC_LEFT)
  78. #define M_ELINE LGUI(KC_RIGHT)
  79. #define M_BPARA LOPT(KC_UP)
  80. #define M_NPARA LOPT(KC_DOWN)
  81. // gui navigation
  82. #define M_NXWIN LGUI(KC_GRV) // Next Window
  83. #define W_NXWIN LALT(KC_TAB)
  84. #define M_PVWIN LGUI(LSFT(KC_GRV)) // Prev Window
  85. #define W_PVWIN LALT(LSFT(KC_TAB))
  86. #define M_NXTAB LGUI(LSFT(KC_RBRC)) // Next Tab
  87. #define W_NXTAB LCTL(KC_PGDN)
  88. #define M_PVTAB LGUI(LSFT(KC_LBRC)) // Prev Tab
  89. #define W_PVTAB LCTL(KC_PGUP)
  90. #define M_NAVBK LGUI(KC_LBRC) // Navigate Forward
  91. #define W_NAVBK LALT(KC_LEFT)
  92. #define M_NAVFW LGUI(KC_RBRC) // Navigate Back
  93. #define W_NAVFW LALT(KC_RIGHT)
  94. // == UNDERGLOW
  95. #ifdef RGBLIGHT_ENABLE
  96. #define HSV_CAPS 55, 255, 255
  97. #define HSV_ERR 0, 255, 96
  98. #define HSV_MAC 250, 255, 192
  99. #define HSV_WIN 250, 192, 128
  100. #define HSV_SYMBOL 235, 255, 255
  101. #define HSV_NAVNUM 20, 255, 255
  102. #define HSV_GAME 40, 255, 255
  103. #define HSV_FUNCT 200, 255, 255
  104. #define HSV_RESET 180, 255, 255
  105. #endif
  106. #endif