lpad.c 441 B

123456789101112131415161718
  1. // Copyright 2023 Laneware Peripherals
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "quantum.h"
  4. #ifdef 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) { /* First encoder */
  8. if (clockwise) {
  9. tap_code(KC_VOLU);
  10. } else {
  11. tap_code(KC_VOLD);
  12. }
  13. }
  14. return true;
  15. }
  16. #endif