keymap.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. Copyright (C) 2019 Maxr1998 <max.rumpf1998@gmail.com>
  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. enum layers {
  16. DEFAULT
  17. };
  18. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  19. [DEFAULT] = {
  20. { KC_END, KC_UP, KC_MUTE },
  21. { KC_LEFT, KC_DOWN, KC_RGHT }
  22. }
  23. };
  24. void matrix_init_user(void) {
  25. }
  26. void encoder_one_update(bool clockwise) {
  27. if (clockwise) {
  28. tap_code(KC_PGDN);
  29. } else {
  30. tap_code(KC_PGUP);
  31. }
  32. }
  33. void encoder_two_update(bool clockwise) {
  34. if (clockwise) {
  35. tap_code(KC_VOLU);
  36. } else {
  37. tap_code(KC_VOLD);
  38. }
  39. }