logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

keymap.c (607B)


  1. // Copyright 2022 Markus Knutsson (@TweetyDaBird)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include QMK_KEYBOARD_H
  4. // Defines names for use in layer keycodes and the keymap
  5. enum layer_names {
  6. _BASE
  7. };
  8. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  9. [_BASE] = LAYOUT(
  10. KC_MPLY,
  11. UG_NEXT, UG_VALU, UG_TOGG,
  12. KC_MPRV, KC_MPLY, KC_MNXT
  13. )
  14. };
  15. bool encoder_update_user(uint8_t index, bool clockwise) {
  16. if (index == 0) {
  17. if (clockwise) {
  18. tap_code(KC_VOLU);
  19. } else {
  20. tap_code(KC_VOLD);
  21. }
  22. }
  23. return false;
  24. }