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.

140 lines
6.1 KiB

  1. /* Copyright 2022 DOIO
  2. * Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #include QMK_KEYBOARD_H
  18. // OLED animation
  19. #include "./lib/layer_status/layer_status.h"
  20. // Each layer gets a name for readability, which is then used in the keymap matrix below.
  21. // The underscores don't mean anything - you can have a layer called STUFF or any other name.
  22. // Layer names don't all need to be of the same length, obviously, and you can also skip them
  23. // entirely and just use numbers.
  24. enum layer_names {
  25. _BASE,
  26. _FN,
  27. _FN1,
  28. _FN2
  29. };
  30. // enum layer_keycodes { };
  31. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  32. /*
  33. 1 2 3 4 Ply TO1
  34. 5 6 7 8
  35. 9 0 Ent
  36. Mut
  37. Fn2
  38. ! @ # $
  39. % ^ & *
  40. ( )
  41. */
  42. /* Row: 0 1 2 3 4 */
  43. [_BASE] = LAYOUT(
  44. KC_1, KC_2, KC_3, KC_4, KC_MPLY,
  45. KC_5, KC_6, KC_7, KC_8, TO(_FN),
  46. KC_9, KC_0, KC_UP, KC_ENT, KC_MUTE,
  47. MO(_FN2), KC_LEFT, KC_DOWN, KC_RIGHT
  48. ),
  49. /*
  50. */
  51. /* Row: 0 1 2 3 4 */
  52. [_FN] = LAYOUT(
  53. _______, _______, _______, _______, _______,
  54. _______, _______, _______, _______, TO(_FN1),
  55. _______, _______, _______, _______, _______,
  56. _______, _______, _______, _______
  57. ),
  58. /*
  59. */
  60. /* Row: 0 1 2 3 4 */
  61. [_FN1] = LAYOUT(
  62. _______, _______, _______, _______, _______,
  63. _______, _______, _______, _______, TO(_FN2),
  64. _______, _______, _______, _______, _______,
  65. _______, _______, _______, _______
  66. ),
  67. /*
  68. SpiSpd TO0
  69. SaiSad
  70. TogModHui
  71. VaiHudVad
  72. */
  73. /* Row: 0 1 2 3 4 */
  74. [_FN2] = LAYOUT(
  75. RGB_SPI, RGB_SPD, _______, QK_BOOT, _______,
  76. RGB_SAI, RGB_SAD, _______, _______, TO(_BASE),
  77. RGB_TOG, RGB_MOD, RGB_HUI, _______, _______,
  78. _______, RGB_VAI, RGB_HUD, RGB_VAD
  79. ),
  80. };
  81. #ifdef OLED_ENABLE
  82. bool oled_task_user(void) {
  83. render_layer_status();
  84. return true;
  85. }
  86. #endif
  87. #ifdef ENCODER_MAP_ENABLE
  88. const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
  89. [_BASE] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
  90. [_FN] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
  91. [_FN1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
  92. [_FN2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
  93. };
  94. #endif