solo.c 502 B

123456789101112131415161718
  1. // Copyright 2022 Aaron Hong (@hongaaronc)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "quantum.h"
  4. #if !defined(VIA_ENABLE) && !defined(JOYSTICK_ENABLE) && defined(ENCODER_ENABLE)
  5. bool encoder_update_kb(uint8_t index, bool clockwise) {
  6. if (!encoder_update_user(index, clockwise)) { return false; }
  7. if (index == 0) {
  8. if (clockwise) {
  9. tap_code_delay(KC_VOLU, 10);
  10. } else {
  11. tap_code_delay(KC_VOLD, 10);
  12. }
  13. }
  14. return true;
  15. }
  16. #endif