keymap.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
  2. * Copyright 2019 Sunjun Kim
  3. * Copyright 2020 Ploopy Corporation
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #include QMK_KEYBOARD_H
  19. // safe range starts at `USER_SAFE_RANGE` instead.
  20. // clang-format off
  21. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  22. [0] = LAYOUT(
  23. C(KC_C), KC_BTN1, KC_BTN3, KC_BTN2, MO(1), KC_BTN4, KC_BTN5, DPI_CONFIG),
  24. [1] = LAYOUT(
  25. RGB_HUI, RGB_MOD, RGB_TOG, RGB_RMOD, MO(1), KC_VOLU, KC_VOLD, QK_BOOT)
  26. };
  27. // clang-format on
  28. #ifdef ENCODER_MAP_ENABLE
  29. const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
  30. [0] = { ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
  31. [1] = { ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
  32. };
  33. #endif
  34. #ifdef RGBLIGHT_ENABLE
  35. void eeconkfig_init_user(void) {
  36. rgblight_enable();
  37. # ifdef RGBLIGHT_EFFECT_TWINKLE
  38. rgblight_mode(RGBLIGHT_MODE_TWINKLE + 5);
  39. # else
  40. rgblight_mode(RGBLIGHT_MODE_BREATHING + 5);
  41. # endif
  42. rgblight_sethsv(HSV_MAGENTA);
  43. }
  44. #endif