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.

109 lines
3.2 KiB

  1. /*
  2. Copyright 2020 Dan White <opensource@bluetufa.com>
  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. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #pragma once
  15. #include QMK_KEYBOARD_H
  16. enum layers {
  17. _QWERTY_MAC,
  18. _MOVE_MAC,
  19. _QWERTY_LINUX,
  20. _MOVE_LINUX,
  21. _ADJUST,
  22. _CONFIG
  23. };
  24. enum CustomKeys {
  25. CS_RIGHT = SAFE_RANGE,
  26. CS_DOWN
  27. };
  28. #define OS_POP LCTL(KC_F10)
  29. #define MAC_POP LCTL(KC_UP)
  30. #define MAC_FRC LGUI(LALT(KC_ESC))
  31. #define OS_COPY LSFT(LCTL(KC_C))
  32. #define OS_PAST LSFT(LCTL(KC_V))
  33. #define MAC_PST LGUI(KC_V)
  34. #define MAC_CPY LGUI(KC_C)
  35. #define KC_BACK LCTL(LSFT(KC_LBRC))
  36. #define KC_NEXT LCTL(LSFT(KC_RBRC))
  37. #define MOVE LT(_MOVE_LINUX, KC_ESC)
  38. #define MOVE_MAC LT(_MOVE_MAC, KC_ESC)
  39. #define ADJUST MO(_ADJUST)
  40. #define CFG_MAC LT(_CONFIG, MAC_POP)
  41. #define CFG_LNX LT(_CONFIG, OS_POP)
  42. #define WD_BACK LALT(KC_LEFT)
  43. #define WD_FRWD LALT(KC_RIGHT)
  44. #define VD_1 LCTL(KC_F1)
  45. #define VD_2 LCTL(KC_F2)
  46. #define VD_3 LCTL(KC_F3)
  47. #define WM_UH LGUI(KC_UP)
  48. #define WM_BH LGUI(KC_DOWN)
  49. #define WM_LH LGUI(KC_LEFT)
  50. #define WM_RH LGUI(KC_RIGHT)
  51. #define WM_MAX LGUI(KC_PGUP)
  52. #define CM_RIGHT LGUI(KC_D)
  53. #define CM_DOWN LGUI(LSFT(KC_D))
  54. /* THESE are not defaults in KDE and must be set manually */
  55. #define WM_VD1 HYPR(KC_1)
  56. #define WM_VD2 HYPR(KC_2)
  57. #define WM_VD3 HYPR(KC_3)
  58. /* IntelliJ / JetBrains shortcuts with Mac keymap */
  59. #define IJ_BACK LGUI(LALT(KC_LEFT))
  60. #define IJ_FWD LGUI(LALT(KC_RIGHT))
  61. #define IJ_UP LGUI(LALT(KC_UP))
  62. #define IJ_DOWN LGUI(LALT(KC_DOWN))
  63. #define IJ_IMPL LGUI(LALT(KC_B))
  64. #define IJ_DECL LGUI(KC_B)
  65. #define IJ_REN LSFT(KC_F6)
  66. #define IJ_USAG LALT(KC_F7)
  67. #define IJ_RUN KC_F9
  68. #define IJ_STEP KC_F8
  69. #define IJ_INTO LSFT(KC_F7)
  70. #define IJ_OUT LSFT(KC_F8)
  71. #define IJ_STOP LGUI(KC_F2)
  72. #define IJ_IMPS LCTL(LALT(LSFT(KC_EQUAL)))
  73. #define IJ_IMPH LCTL(LALT(LSFT(KC_MINUS)))
  74. #define IJ_TOP LGUI(KC_HOME)
  75. #define IJ_BOTT LGUI(KC_END)
  76. #define IJ_FIND LGUI(LSFT(KC_F))
  77. /* MacOS virtual desktop shortcuts */
  78. #define M_VD1 LCTL(KC_1)
  79. #define M_VD2 LCTL(KC_2)
  80. #define M_VD3 LCTL(KC_3)
  81. /* rectangle shortcuts */
  82. #define MM_ULCN LCTL(LGUI(KC_LEFT))
  83. #define MM_URCN LCTL(LGUI(KC_RIGHT))
  84. #define MM_LLCN LCTL(LSFT(LGUI(KC_LEFT)))
  85. #define MM_LRCN LCTL(LSFT(LGUI(KC_RIGHT)))
  86. #define MM_MAX LALT(LGUI(KC_F))
  87. #define MM_LH HYPR(KC_LBRC)
  88. #define MM_RH HYPR(KC_RBRC)
  89. #define MM_UH LALT(LGUI(KC_UP))
  90. #define MM_BH LALT(LGUI(KC_DOWN))
  91. #define MM_LEFT LCTL(LALT(LGUI(KC_LEFT)))
  92. #define MM_RGHT LCTL(LALT(LGUI(KC_RIGHT)))
  93. #define DF_1 DF(_QWERTY_MAC)
  94. #define DF_2 DF(_QWERTY_LINUX)