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.

117 lines
2.7 KiB

  1. /* Copyright 2021 Ibnu D. Aji
  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 "quantum.h"
  18. enum {
  19. _BASE,
  20. _LOWER,
  21. _RAISE,
  22. _ADJUST,
  23. };
  24. // keycode abstraction
  25. // ABC:
  26. // A: L = left
  27. // R = right
  28. // B: U = upper row
  29. // M = middle row
  30. // L = lower row
  31. // C: P = pinky finger
  32. // R = ring finger
  33. // M = middle finger
  34. // I = index finger
  35. // II = inner index finger
  36. #define LUP KC_Q
  37. #define LUR KC_V
  38. #define LUM KC_C
  39. #define LUI KC_P
  40. #define LUII KC_B
  41. #define LMP KC_R
  42. #define LMR KC_S
  43. #define LMM KC_T
  44. #define LMI KC_H
  45. #define LMII KC_D
  46. #define LLP KC_QUOT
  47. #define LLR KC_J
  48. #define LLM KC_G
  49. #define LLI KC_K
  50. #define LLII KC_X
  51. #define RUP KC_Z
  52. #define RUR KC_Y
  53. #define RUM KC_U
  54. #define RUI KC_L
  55. #define RUII KC_DOT
  56. #define RMP KC_O
  57. #define RMR KC_I
  58. #define RMM KC_A
  59. #define RMI KC_N
  60. #define RMII KC_F
  61. #define RLP KC_SLSH
  62. #define RLR KC_SCLN
  63. #define RLM KC_W
  64. #define RLI KC_M
  65. #define RLII KC_COMM
  66. // thumb keys.
  67. #define TRAISE TG(_RAISE)
  68. #define AL_ENT ALT_T(KC_ENT)
  69. #define SF_BSPC SFT_T(KC_BSPC)
  70. #define CT_ESC CTL_T(KC_ESC)
  71. // home row mods.
  72. #define CTLR LCTL_T(LMR)
  73. #define CTRR RCTL_T(RMR)
  74. #define CT_LEFT LCTL_T(KC_LEFT)
  75. #define CT_SIX RCTL_T(KC_6)
  76. #define SHLP LSFT_T(LMP)
  77. #define SHRP RSFT_T(RMP)
  78. #define SH_HASH LSFT_T(KC_HASH)
  79. #define SH_ZERO RSFT_T(KC_0)
  80. #define ALLM LALT_T(LMM)
  81. #define ALRM RALT_T(RMM)
  82. #define AL_DOWN LALT_T(KC_DOWN)
  83. #define AL_FIVE RALT_T(KC_5)
  84. #define GULII RGUI_T(LMII)
  85. #define GURII LGUI_T(RMII)
  86. #define GU_DLR RGUI_T(KC_DLR)
  87. #define GU_EQL LGUI_T(KC_EQL)
  88. // layer toggle.
  89. #define LW_E LT(_LOWER, KC_E)
  90. #define RS_SPC LT(_RAISE, KC_SPC)
  91. #define ADDDD MO(_ADJUST)
  92. // common shortcuts for windows and linux that i use.
  93. #define NXTTAB LCTL(KC_PGDN)
  94. #define PRVTAB LCTL(KC_PGUP)
  95. #define UPTAB LCTL(LSFT(KC_PGUP))
  96. #define DNTAB LCTL(LSFT(KC_PGDN))
  97. #define NXTWIN LALT(KC_TAB)
  98. #define PRVWIN LALT(LSFT(KC_TAB))
  99. #define CALDL LCTL(LALT(KC_DELT))
  100. #define TSKMGR LCTL(LSFT(KC_ESC))
  101. #define EXPLR LGUI(KC_E)
  102. #define LCKGUI LGUI(KC_L)
  103. #define CONPST LSFT(KC_INS)
  104. #define CLSGUI LALT(KC_F4)