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.

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