keymap.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* Copyright 2023 @ Keychron (https://www.keychron.com)
  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. // clang-format off
  18. enum layers {
  19. BASE,
  20. FUNC,
  21. L2,
  22. L3
  23. };
  24. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  25. [BASE] = LAYOUT_numpad_6x5(
  26. KC_MUTE, MO(FUNC), KC_ESC, KC_BSPC, KC_TAB,
  27. MC_0, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
  28. MC_2, KC_P7, KC_P8, KC_P9, KC_PPLS,
  29. MC_3, KC_P4, KC_P5, KC_P6,
  30. MC_4, KC_P1, KC_P2, KC_P3, KC_PENT,
  31. MC_5, KC_P0, KC_PDOT),
  32. [FUNC] = LAYOUT_numpad_6x5(
  33. RGB_TOG, _______, KC_MUTE, KC_VOLD, KC_VOLU,
  34. MC_1, RGB_MOD, RGB_VAI, RGB_HUI, KC_DEL,
  35. MC_2, RGB_RMOD, RGB_VAD, RGB_HUD, _______,
  36. MC_3, RGB_SAI, RGB_SPI, KC_MPRV,
  37. MC_4, RGB_SAD, RGB_SPD, KC_MPLY, _______,
  38. MC_5, RGB_TOG, KC_MNXT),
  39. [L2] = LAYOUT_numpad_6x5(
  40. _______, _______, _______, _______, _______,
  41. _______, _______, _______, _______, _______,
  42. _______, _______, _______, _______, _______,
  43. _______, _______, _______, _______,
  44. _______, _______, _______, _______, _______,
  45. _______, _______, _______),
  46. [L3] = LAYOUT_numpad_6x5(
  47. _______, _______, _______, _______, _______,
  48. _______, _______, _______, _______, _______,
  49. _______, _______, _______, _______, _______,
  50. _______, _______, _______, _______,
  51. _______, _______, _______, _______, _______,
  52. _______, _______, _______)
  53. };
  54. #if defined(ENCODER_MAP_ENABLE)
  55. const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
  56. [BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
  57. [FUNC] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) },
  58. [L2] = { ENCODER_CCW_CW(_______, _______) },
  59. [L3] = { ENCODER_CCW_CW(_______, _______) }
  60. };
  61. #endif // ENCODER_MAP_ENABLE