logo

qmk_firmware

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

keymap.c (2479B)


  1. /*
  2. Copyright 2023 deddia permana (@depermana12)
  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. #include QMK_KEYBOARD_H
  15. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  16. /*
  17. * ┌─────────┐ ┌─────────┐
  18. * │ mute │ │ MO(1) │
  19. * ├─────────┼─────────┬─────────┼─────────┤
  20. * │ 1 │ 2 │ 3 │ 4 │
  21. * ├─────────┼─────────┼─────────┼─────────┤
  22. * │ 5 │ 6 │ 7 │ 8 │
  23. * └─────────┴─────────┴─────────┴─────────┘
  24. */
  25. [0] = LAYOUT(
  26. KC_MUTE, MO(1),
  27. KC_1, KC_2, KC_3, KC_4,
  28. KC_5, KC_6, KC_7, KC_8
  29. ),
  30. [1] = LAYOUT(
  31. QK_BOOT, _______,
  32. KC_1, KC_2, KC_3, KC_4,
  33. TO(0), TO(2), TO(3), RM_TOGG
  34. ),
  35. [2] = LAYOUT(
  36. _______, _______,
  37. _______, _______, _______, _______,
  38. _______, _______, _______, _______
  39. ),
  40. [3] = LAYOUT(
  41. _______, _______,
  42. _______, _______, _______, _______,
  43. _______, _______, _______, _______
  44. )
  45. };
  46. #if defined (ENCODER_MAP_ENABLE)
  47. const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
  48. [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RM_HUED, RM_HUEU) },
  49. [1] = { ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(RM_SATD, RM_SATU) },
  50. [2] = { ENCODER_CCW_CW(RM_VALD, RM_VALU), ENCODER_CCW_CW(RM_SPDD, RM_SPDU) },
  51. [3] = { ENCODER_CCW_CW(RM_PREV, RM_NEXT), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT)},
  52. };
  53. #endif