keymap.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* Copyright 2019 Garret G. (TheRoyalSweatshirt)
  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. #define BASE 0
  18. #define FN 1
  19. #define RGB RGB_MOD
  20. #define XXX KC_NO
  21. #define KC_TR KC_TRANSPARENT
  22. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  23. /* BASE
  24. * ,----------------------------------------.
  25. * | DEL | UP | ENTER | | RGB |
  26. * |-------+-------+-------+-------+--------|
  27. * | LEFT | DOWN | RIGHT | | FN |
  28. * `----------------------------------------'
  29. */
  30. [BASE] = LAYOUT(
  31. KC_DEL, KC_UP, KC_ENT, RGB,
  32. KC_LEFT, KC_DOWN, KC_RIGHT, MO(1)
  33. ),
  34. /* FN
  35. * ,----------------------------------------.
  36. * | HU+ | Br+ | Sat+ | | |
  37. * |-------+-------+-------+-------+--------|
  38. * | HU- | Br- | Sat- | | |
  39. * `----------------------------------------'
  40. */
  41. [FN] = LAYOUT(
  42. RGB_HUI, RGB_VAI, RGB_SAI, KC_TR,
  43. RGB_HUD, RGB_VAD, RGB_SAD, KC_TR
  44. )
  45. };
  46. /* Rotary Encoder Settings: */
  47. /* - Current Value = Horizontal Scrolling */
  48. void encoder_update_user(uint8_t index, bool clockwise) {
  49. if (index == 0) {
  50. if (clockwise) {
  51. tap_code(KC_WH_L);
  52. } else {
  53. tap_code(KC_WH_R);
  54. }
  55. }
  56. }