logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

keymap.c (8032B)


  1. /* Copyright 2024-2025 Grigory Avdyushin
  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. #include QMK_KEYBOARD_H
  17. enum my_layers {
  18. _BASE = 0,
  19. _LOWER,
  20. _RAISE,
  21. _NAV,
  22. };
  23. #define LOWER MO(_LOWER)
  24. #define RAISE MO(_RAISE)
  25. #define NAV MO(_NAV)
  26. #define OSM_LSFT OSM(MOD_LSFT) // One Shot Right Shift
  27. #define KC_SFT_Z SFT_T(KC_Z) // Left Shift when held, Z when tapped
  28. #define KC_SFT_SL RSFT_T(KC_SLSH) // Right Shift when held, / when tapped
  29. #define KC_SFT_BSLS RSFT_T(KC_BSLS) // Right Shift when held, \ when tapped
  30. #define KC_LWR_SPC LT(_LOWER, KC_SPC) // Lower layer when held, Space when tapped
  31. #define KC_RSE_BSPC LT(_RAISE, KC_BSPC) // Raise layer when held, Backspace when tapped
  32. #define KC_NAV_A LT(_NAV,KC_A) // Navigation layer when held, A when tapped
  33. #define KC_CMD_TAB CMD_T(KC_TAB) // Left Command when held, Tab when tapped
  34. #define KC_CMD_ENT RCMD_T(KC_ENT) // Right Command when held, Enter when tapped
  35. #define KC_CTL_ESC CTL_T(KC_ESC) // Left Control when held, Escape when tapped
  36. #define KC_OPT_OSM_SFT ROPT_T(OSM_LSFT) // Right Option when held, One Shot Shift when tapped
  37. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  38. /*
  39. * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐
  40. * │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │
  41. * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
  42. * │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ;:│
  43. * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
  44. * │⇧/Z│ X │ C │ V │ B │ │ N │ M │ ,<│ .>│⇧/?│
  45. * └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘
  46. * ┌───┬───┬───┐ ┌───┬───┬───┐
  47. * │CTL│CMD│SPC│ │ENT│CMD│OPT│
  48. * └───┴───┴───┘ └───┴───┴───┘
  49. */
  50. [_BASE] = LAYOUT_split_3x5_3(
  51. KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
  52. KC_NAV_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
  53. KC_SFT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SFT_SL,
  54. KC_CTL_ESC, KC_CMD_TAB, KC_LWR_SPC, KC_RSE_BSPC, KC_CMD_ENT, KC_ROPT
  55. ),
  56. /*
  57. * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐
  58. * │ 1!│ 2@│ 3#│ 4$│ 5%│ │ 6^│ 7&│ 8*│ 9(│ 0)│
  59. * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
  60. * │ `~│ │ │ │ │ │ ← │ ↓ │ ↑ │ → │ '"│
  61. * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
  62. * │ ⇧ │ │ │ │ │ │ -_│ =+│ [{│ ]}│ \|│
  63. * └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘
  64. * ┌───┬───┬───┐ ┌───┬───┬───┐
  65. * │ │ │ │ │ │ │ │
  66. * └───┴───┴───┘ └───┴───┴───┘
  67. */
  68. [_LOWER] = LAYOUT_split_3x5_3(
  69. KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
  70. KC_GRV, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_QUOT,
  71. KC_LSFT, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_SFT_BSLS,
  72. _______, _______, _______, _______, _______, _______
  73. ),
  74. /*
  75. * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐
  76. * │ F1│ F2│ F3│ F4│ F5│ │ F6│ F7│ F8│ F9│F10│
  77. * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
  78. * │ │ │ │ │ │ │ │ │ │ │ │
  79. * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
  80. * │ │ │ │ │ │ │ │ │ │ │ │
  81. * └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘
  82. * ┌───┬───┬───┐ ┌───┬───┬───┐
  83. * │ │ │ │ │ │ │ │
  84. * └───┴───┴───┘ └───┴───┴───┘
  85. */
  86. [_RAISE] = LAYOUT_split_3x5_3(
  87. KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
  88. _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
  89. _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
  90. _______, _______, _______, _______, _______, _______
  91. ),
  92. /*
  93. * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐
  94. * │ │ │ │ │ │ │HOM│ │ │END│ │
  95. * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
  96. * │ │ │ │ │ │ │ ← │ ↓ │ ↑ │ → │ │
  97. * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
  98. * │ │ │ │ │ │ │PUP│ │ │PDN│ │
  99. * └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘
  100. * ┌───┬───┬───┐ ┌───┬───┬───┐
  101. * │ │ │ │ │ │ │ │
  102. * └───┴───┴───┘ └───┴───┴───┘
  103. */
  104. [_NAV] = LAYOUT_split_3x5_3(
  105. _______, _______, _______, _______, _______, KC_HOME, _______, _______, KC_END, _______,
  106. _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______,
  107. _______, _______, _______, _______, _______, KC_PGUP, _______, _______, KC_PGDN, _______,
  108. _______, _______, _______, _______, _______, _______
  109. )
  110. };