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.

98 lines
2.6 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. _QWERTY,
  21. _NAVNUM,
  22. _SYMBOL,
  23. _FUNCT,
  24. };
  25. // == Thumbs
  26. // left hand
  27. #define ESC_HYP MT(MOD_HYPR, KC_ESC)
  28. #define TAB_NUM LT(_NAVNUM, KC_TAB)
  29. #define SPC_SFT MT(MOD_LSFT, KC_SPC)
  30. #define ENT_SYM LT(_SYMBOL, KC_ENT)
  31. // right hand
  32. #define SPC_SFT MT(MOD_LSFT, KC_SPC)
  33. #define BSP_SYM LT(_SYMBOL, KC_BSPC)
  34. #define DEL_WRP MT(MOD_LCTL | MOD_LALT | MOD_LGUI, KC_DEL)
  35. #define NAVLOCK TG(_NAVNUM)
  36. #define SYMLOCK TG(_SYMBOL)
  37. // == QWERTY
  38. // left hand home row
  39. #define A_CTRL MT(MOD_LCTL, KC_A)
  40. #define S_ALT MT(MOD_LALT, KC_S)
  41. #define D_GUI MT(MOD_LGUI, KC_D)
  42. #define F_SHFT MT(MOD_LSFT, KC_F)
  43. // left hand aux
  44. #define W_CTRL MT(MOD_LCTL, KC_W)
  45. #define E_ALT MT(MOD_LALT, KC_E)
  46. #define R_GUI MT(MOD_LGUI, KC_R)
  47. // right hand home row
  48. #define J_SHFT MT(MOD_RSFT, KC_J)
  49. #define K_GUI MT(MOD_RGUI, KC_K)
  50. #define L_ALT MT(MOD_RALT, KC_L)
  51. #define MINSCTL MT(MOD_RCTL, KC_MINS)
  52. // right hand aux
  53. #define U_GUI MT(MOD_RGUI, KC_U)
  54. #define I_ALT MT(MOD_RALT, KC_I)
  55. #define O_CTRL MT(MOD_RCTL, KC_O)
  56. // == OS X default keys
  57. // movement by word
  58. #define BWORD LALT(KC_LEFT)
  59. #define FWORD LALT(KC_RIGHT)
  60. // gui navigation
  61. #define NWIN LGUI(KC_GRV) // Next Window
  62. #define PWIN LGUI(LSFT(KC_GRV)) // Prev Window
  63. #define NTAB LGUI(LSFT(KC_RBRC)) // Next Tab
  64. #define PTAB LGUI(LSFT(KC_LBRC)) // Prev Tab
  65. #define NAVBACK LGUI(KC_LBRC) // Navigate Forward
  66. #define NAVFWD LGUI(KC_RBRC) // Navigate Back
  67. // my personal mappings to window manager commands
  68. #define XALLWIN HYPR(KC_F14)
  69. #define XDESKTP HYPR(KC_F15)
  70. #define XNXTSPC HYPR(KC_F16)
  71. #define XPRVSPC HYPR(KC_F17)
  72. #define XNOTIFY HYPR(KC_F18)
  73. // == UNDERGLOW
  74. #ifdef RGBLIGHT_ENABLE
  75. #define HSV_CAPS 60, 255, 255
  76. #define HSV_DEFAULT 30, 255, 255
  77. #define HSV_SYMBOL 18, 255, 255
  78. #define HSV_NAVNUM 250, 255, 255
  79. #define HSV_FUNCT 238, 255, 255
  80. #define HSV_RESET 180, 255, 255
  81. #endif
  82. #endif