keymap.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. Copyright 2021 Jay Greco
  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 layer_names {
  16. _BASE,
  17. _VIA1,
  18. _VIA2,
  19. _VIA3
  20. };
  21. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  22. [_BASE] = LAYOUT(
  23. KC_F1, KC_F2, KC_F3,
  24. KC_F4, KC_F5, KC_F6
  25. ),
  26. [_VIA1] = LAYOUT(
  27. _______, _______, _______,
  28. _______, _______, _______
  29. ),
  30. [_VIA2] = LAYOUT(
  31. _______, _______, _______,
  32. _______, _______, _______
  33. ),
  34. [_VIA3] = LAYOUT(
  35. _______, _______, _______,
  36. _______, _______, _______
  37. )
  38. };
  39. void matrix_init_user(void) {
  40. set_scramble_LED(LED_OFF);
  41. }
  42. bool encoder_update_user(uint8_t index, bool clockwise) {
  43. if (clockwise) {
  44. tap_code(KC_VOLU);
  45. } else {
  46. tap_code(KC_VOLD);
  47. }
  48. return true;
  49. }