2022-04-13 05:50:38 +00:00
|
|
|
// Copyright 2022 Aaron Hong (@hongaaronc)
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
2023-02-19 07:55:12 +00:00
|
|
|
#include "quantum.h"
|
2022-04-13 05:50:38 +00:00
|
|
|
|
|
|
|
#if !defined(VIA_ENABLE) && !defined(JOYSTICK_ENABLE) && defined(ENCODER_ENABLE)
|
|
|
|
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
|
|
|
if (!encoder_update_user(index, clockwise)) { return false; }
|
|
|
|
if (index == 0) {
|
|
|
|
if (clockwise) {
|
|
|
|
tap_code_delay(KC_VOLU, 10);
|
|
|
|
} else {
|
|
|
|
tap_code_delay(KC_VOLD, 10);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
#endif
|